cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Need a unique control number

Jump to solution

Hello,

 

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!

Labels: (1)
Reply
6 Replies
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution

Hi,

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

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution

Another potential option you could explore is using the 'ID' column as this is always unique per item.

Reply
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution

@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: 

If(equals(RequestType,"Change Request - CCN"),"CCN-"+formatDate(Current Date,"MM-dd-yyyy-"+Current Time,"hhmmt"),"ISS."+formatDate(Current Date,"MMddyyyy-"+Current Time,"HHmmss."))

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution
ID from SharePoint is only available after the creation of item, so this won't be possible if this is set on a "New" item
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution

Yup that I knew! Thanks!

Reply
Highlighted
Nintex Newbie

Re: Need a unique control number

Jump to solution

@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.

0 Kudos
Reply