I would like to timestamp a field (Test_Completed), but only if it hasn't already been timestamped and only if a different field (Actual_result) has content.
I found a forum answer about timestamping a field, and have tried to modify it to include my conditions, but I am not too good with JavaScript! This is what I've done, can anyone help??
<SCRIPTLANGUAGE="JavaScript">/* Declaration and initialization */Stamp=newDate();var v_TimeStamp;Hours=Stamp.getHours()Mins=Stamp.getMinutes();/* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */
v_TimeStamp=(''+(Stamp.getMonth()+1)+"/"+Stamp.getDate()+"/"+Stamp.getFullYear()+' '+Hours+":"+Mins);if('[@field:Actual_result]'==='input.length >1'&&'[@field:Test_Completed]'===""){
document.getElementById("EditRecordTest_Completed").value=v_TimeStamp;}</SCRIPT>
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.
Question
NikkiC
Hi there,
I would like to timestamp a field (Test_Completed), but only if it hasn't already been timestamped and only if a different field (Actual_result) has content.
I found a forum answer about timestamping a field, and have tried to modify it to include my conditions, but I am not too good with JavaScript! This is what I've done, can anyone help??
Many thanks
Nikki
Link to comment
Share on other sites
4 answers to this question
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.