Jump to content

how to reference field in javascript in tabular 'inline add new' at top of report


Recommended Posts

Hi, I'm trying to use the code below in the footer of a tabular report results section for the 'Inline Add New Record' can use it. The js is code to get the user's computer date/time (not the localization or CB system) and put it in a date/time field. I use this code in submission forms with no issues but don't know how to reference it correctly for a tabular inline add new record. If someone knows how to mod this I'd really appreciate it. 

<SCRIPT LANGUAGE="JavaScript">
 /* Declaration and initialization */
 Stamp = new Date();
 var v_TimeStamp;
 Hours = Stamp.getHours()
 Mins = Stamp.getMinutes();
 Secs = Stamp.getSeconds();

 /* Attach a prefix with digit '0' if the minutes is less than 10. */
 if (Mins < 10) {
   Mins = "0" + Mins;
 }
 
 /* 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 + ":" + Secs);

 document.getElementById("InsertRecordComments_Actual_Submission_Date").value=v_TimeStamp;

</SCRIPT>

EDIT: just found the solution right after posting this. In case anyone needs it, tabular inline add uses 'InlineAdd' instead of 'InsertRecord'. Wish everything was so easy!

Edited by DesiLogi
found solution
Link to comment
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...