Jump to content

Recommended Posts

In a table i have 12 columns like "Proof_for_Placement(File Filed)", "Document_Remarks_Placement(Text Field)",  "Document_Upload_Date(Date Field)" etc. So i have created a coding if users upload a file in "Proof_For_Placement" the automatically "New" status will be taken in "Document_Remarks_Placement" filed and Timestamp will be captured in "Document_Upload_Date" filed. 

<script type="text/javascript">

function addTimestamp (fileInputId, timestampInputId) {
 var fileInput = document.getElementById(fileInputId);
 fileInput.addEventListener('change', function () {
 
  if (fileInput.files.length !== 0 ){
    document.getElementById(timestampInputId).value = '[@cbTimestamp*]';
   }
 
 });

};
function addDocStatus (fileInputId, docstatusId) {
 var fileInput = document.getElementById(fileInputId);
 fileInput.addEventListener('change', function () {
 
  if (fileInput.files.length !== 0 ){
    document.getElementById(docstatusId).value = 'New';
   }
 
 });

};

addDocStatus('EditRecordProof_For_Placement', 'EditRecordDocument_Remarks_Placement');
addTimestamp('EditRecordProof_For_Placement', 'EditRecordDocument_Upload_Date');
addDocStatus('EditRecordWorking_Proof_1st_Month', 'EditRecordDocument_Remarks_1st_Payslip');
addTimestamp('EditRecordWorking_Proof_1st_Month', 'EditRecordWorking_Proof_Submitting_Date');
addDocStatus('EditRecordWorking_proof_2nd_month', 'EditRecordDocument_Remarks_2ndPayslip');
addTimestamp('EditRecordWorking_proof_2nd_month', 'EditRecordWorking_proof_Submitting_Date_2');
addDocStatus('EditRecordWorking_proof_3rd_month', 'EditRecordDocument_Remarks_3rdPayslip');
addTimestamp('EditRecordWorking_proof_3rd_month', 'EditRecordWorking_proof_Submitting_Date_3');

</script>

Now i want a different code for different process.

Like if someone checked the documents or file in "proof_for_placement" and changed the status of "Document_Remarks_Placement" manually then "Document_Upload_Date" will be taken as the timestamp.

 

Since i have zero coding language, i am not able to build the code.

Link to post
Share on other sites
  • 3 months later...

Hi @Tanmoy,

As per my understanding, you would like to stamp the time in  Document_Upload_Date field when the Document_Remarks_Placement was modified manually. For this, you don't need to have JavaScript. In the table level, you can enable the Stamp on Update option. Please make sure that the Data Type is Timestamp.

image.thumb.png.706c468770a7ea5767b3a6160646880f.png

 

Hope this helps.

 

-kristina :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...