I've got a list in SP2013 that consists of three fields: Category, LastNumber, and NextNumber - we'll call it ListA. All three fields are of type String (Single Line of Text). This list is used by a workflow that automatically assigns ID numbers to items from other lists according to a numeric category number. The workflow on each list does the following steps:
- finds the category on ListA that matches the one on the current item
- sets a field in the current item to the NextNumber value from ListA
- updates the LastNumber value on ListA to the one just assigned
- updates the NextNumber value on ListA to the LastNumber plus one
This process has worked well, but we recently added a new category that starts with a zero, and apparently the increment (step #4) is dropping the zero off the front of the number. This results in a totally different number. All category values are seven digits.
How can I tell SharePoint and/or the the workflow to keep the leading zero?