Hi, I am a complete novice with all of this, so please pretend I'm 5 years old.
I have a Purchase Request form that gets circulated around my company.
A user has the form generator on their desktop and one of the fields is a date/time field that I use to create a "serial number" for traceability.
I've assigned it an action to return a serial number in the following format:
//+ ActionName: DateTimeField1.initialize this.resolveNode("$").rawValue = util.printd("yyyy-mm-dd", new Date()); //- this.resolveNode("$").rawValue = util.printd("yyyymmddHHMMss", new Date());
which provides the following number: 20200421113111 (year 2020, month 04, day 21, hour 11, minute 31, seconds 11). Basically, the "Serial number" is snapshot of when the form was created.
This Purchase Requisition Form also has an "Email Submit Button" that will be used to send the form to the Purchasing Agents in the company.
I want the form to keep the serial number (the snapshot, in this example 20200421113111) in the DateTimeField1 locked down, so when the Purchasing Agent (or anyone else) opens the form in the future, that field always reads that serial number snapshot.
Is this possible?
Also bonus points if when the Email Submit Button is clicked, it actually reads that serial number from the DateTimeField1 location, and saves the file as a .pdf with that serial number as the file name.