I need to create a control number of sorts on my form based on an identifier in another dropdown. I was thinking something where depending on the item they choose in Request Type it takes those acronyms and put them in the Control Number field then adds the date and time of request.
Any idea how to accomplish this? I have attached an example.
Thanks in advance!
Solved! Go to Solution.
A calculated value should be able to do that for you using the 'If' runtime function. You can configure the function to prefix the control with the relevant acronym based on what is selected in your drop down, then add the date and time after.
It should look something like this:
If(equals(RequestType,"Change Request - CNN"),"CNN-"+Current Date,"ISS-"+Current Date)
You may want to form that date into another format using the formatDate function
@hejones50 Thanks! After much playing around (since I am not that great with functions) I got it to display as: CCN-05-20-2020-1:04 P5 - I guess P5 is PM? Can't seem to get seconds yet. I would very much like to put the ID on it too.
Here is what I have in my calculated value:
@hejones50 Here is what I finally went with which my client likes:
If(equals(RequestType,"Change Request - CCN"),"CCN."+formatDate(Current Date,"MMddyyyy-")+formatDate(Current Time,"HH:mm"),"ISS."+formatDate(Current Date,"MMddyyyy-")+formatDate(Current Time,"HH:mm"))
that produced this: CCN.05212020-08:21 or this: ISS.05212020-08:21
Thanks for getting me in the right direction and then this post for the formatDate stuff.