My name is Rick and I really need your help.
While building a form that helps end-users report complaints, I'd like my form to automatically make a casenumber by combining two fields.
I've tried figuring scripts out on my own, with the 'help' function, searching forums but no salvation yet.
I look forward to your reaction!
Solved! Go to Solution.
You can use either one for your requirement. FormCalc is handiest as it includes a concatenation function that can join multiple fields into a separate field.
If the two fields are 'fullName' and 'location' the script in the calculate event of the caseNumber field could be:
$ = Concat(fullName, "/", location)
this.rawValue = fullName.rawValue + "/" + location.rawValue;
Either of these should achieve what you want.
Thanks a lot for your help! Still, it isn't working properly. The form doesn't execute the script when I send it, leaving te field saying "0". This is my script: this.rawValue = Datum.rawValue + "/" + Organisatie.rawValue
Here is a sample where the reference number is the full date and time, down to the second. https://acrobat.com/#d=7MTJmmhWCVSfQQir3XwxXQ
Here is a sample of a random number generator. It creates a 4-digit random number of a click event, but you can extend this. https://acrobat.com/#d=iVdJ1rAWKPL7qXj8zLs9yg