Click here to Skip to main content
15,896,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here in my inforpath list, I need to give a ID for all the item, and the ID should be unique, The ID should be like this, 2015000001,201500000002,....,201600000,...,for every year, The ID should be start from 000001 again.
How to get the ID ?
Posted

1 solution

You can rely on the auto generated id from the form library on SharePoint, that will always have starting id with 1.
The only thing you should do is get the id within form data after submitting to library as it is generated only after that.

So, you would go for following steps:
1. create id field in infopath form
2. publish the form by promoting that field as editable in the form library
3. create a very small workflow on item added and set the id field to item id

Thus, you will have auto generated id of each form...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900