Tanmoy Posted June 19, 2019 Report Share Posted June 19, 2019 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. Quote Link to comment Share on other sites More sharing options...
cheonsa Posted October 7, 2019 Report Share Posted October 7, 2019 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. Hope this helps. -kristina Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.