mcamarco
Scholar

Custom ID: CM123 - DATE (MMDDYY)

I'm trying to generate a custom ID for our Change Management list. I need the number to start from 325 as our old list stops there and automatically create the next. The format will need to be as follows:

 

CM326-MMDDYY

CM327-MMDDYY

 

Each new form filled out will need to create a new custom ID to be populated in the "title" column. How can I create this to show in the form/list?

0 Kudos
Reply
6 Replies
kunalpatel
Collaborator

Re: Custom ID: CM123 - DATE (MMDDYY)

@mcamarco ....is your list brand new? If the first item you create in this list has ID = 1 then you can use calculated action in workflow to add 324+{ItemProperty:ID} which will give you 325 and onwards.

 

Then using build string you can create the custom ID

0 Kudos
Reply
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Custom ID: CM123 - DATE (MMDDYY)

To show in the form:
This Knowledge base article shows you how you can read the previous value in the list and once you have that you can increment it.

Other wise you could have a workflow run after the form is submitted to update the Title by reading the previous vbalue and incrementing it.
This method is better than relying on the item ID because if an item is deleted it could mess up your count.
0 Kudos
Reply
mcamarco
Scholar

Re: Custom ID: CM123 - DATE (MMDDYY)

I do need to be able to show this within the form, as well as populate it on the SharePoint list. If one is deleted, it is okay to continue counting.

 

EX: 

CM325-MMDDYY

CM326-MMDDYY (deleted)

CM327-MMDDYY 

 

What is the article you are referencing @SimonMuntz ?

 

 

0 Kudos
Reply
mcamarco
Scholar

Re: Custom ID: CM123 - DATE (MMDDYY)

The list is not brand new, but I know what number the ID is up to. What function would I use in the workflow & how would I push it to populate into the form? Set feild in current item with the variable/string?

0 Kudos
Reply
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Custom ID: CM123 - DATE (MMDDYY)

0 Kudos
Reply
kris10
Novice

Re: Custom ID: CM123 - DATE (MMDDYY)

How to do you add the custom "CM" to the prefix? I have a similar requirement to add a custom name to each of the IDs.
0 Kudos
Reply