Apr 12 2022 04:44 PM
Hello,
I am trying to have a SharePoint List update from a form input using a flow. I can get the form to update the list just fine, but cannot find a way to have the unique ID (in the Title column) for that entry to increment by a letter value.
The unique ID for an entry consists of a letter, the date in yyMMdd format, and the order of entries on that day denoted by a letter (A, B, etc.) For example, for today (4/12/22) the ID should display T220412A, as it is the first entry on 4/12/22. If there is a second entry on 4/12/22 it should input T220412B, so on and so forth. I would like the letter increment to refresh every day to start with A for the first entry. Tomorrow should be T220413A.
I have defined an array variable as VarAlpha that contains each letter of the alphabet. I have also defined an integer variable, i which is set to 0. I have an increment variable section to increase the i value for each entry, but cannot find a way to put them all together. I either cannot get it to display any increment past A or I get 26 entries from the array (one for each letter in the alphabet).
Ideally the flow would work like this:
Step 1: Input form data into appropriate cell in Sharepoint List - Done
Step 2: Check Title column to see if this is the first entry on today's date T220412.
Step 3: If it is the first entry add an A to the end of T220412 making it read T220412A.
Step 4: If it is not the first entry add a B to the end of T220412 making it read T220412B for the second entry that day. (Entry 3 is C, Entry 4 is D, etc,)
Step 5: On a new day reset the letter increment back to A and start the process again for each new form submission.
Ideally, I would like to avoid any business with a calculated column or referencing the ID. I like the flow inputing the values so I can change them if need be. If you need more info feel free and thanks for the help!
Apr 12 2022 11:10 PM
Hi @John_Doe1234 , if the objective of using a character to maintain the order in which items were created on any given day have you considered using the utcNow() expression and posting the date and time into the list item? You could then filter by day and sort them in order of creation.