Hello,
I know that this question is asked several times. But i have a slightly different requirement.
I wanted to generate a custom ID using Flow, when a new item is created in a SharePoint list. The Custom ID will be written in a SharePoint Column.
The Requirement is like as below:
1. There will be a prefix of ABCDEF then 0000 and then the default ID
2. If the ID is 1 then the Custom ID should be ABCDEF00001
3. If the ID is 212 then the Custome ID Should be ABCDEF00212
Can anyone please help that how to achieve this?
Regards,
Solved! Go to Solution.
Hello @CFernandes & @ScottShearer,
I got the solution in the below link.
I used formatNumber expression and got the custom ID for the list items. However many thanks to both of you for your help and guidance on the request.
Regards,
Akshay
Hi @AkshayManke
Perhaps you might want to create a condition and check it the number is less than 99,
YES -
Hello @CFernandes,
Thanks for the quick reply. However i am unable to corelate the expression with my SP List. Can you please share more details like what i need to add and where? You have given the right example and I tried that using a condition but somehow not getting the desired results and failing at the expression.
Below my Details:
SharePoint List Column: ID
Prefix to be Added as Below:
Till 99 = ABCDEF000099
Till 999 = ABCDRF000999
Till 9999 =ABCDEF009999
Till 99999 = ABCDEF099999
Many Thanks in advance.
Regards,
@AkshayManke I think you might have to nest conditions(use Multiple conditions) in the Power Automate.
Check if less than 99
Check if it less that 999......
I cannot think of a better idea, right now with reference to your scenario(Perhaps our community members might have better ideas)
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Please take a look at my solution below. I could have made it with fewer actions but did it the way I did for clarity.
I have a separate SharePoint list where I store the next ID number that I'll be using and that list has only one row.
The issue you are having is that Power Automate does not have an expression that allows you to take a certain number of characters from the right side of a string. I work around that by using the skip() expression.
Please let me know if you have any questions.
Hello @CFernandes & @ScottShearer,
I got the solution in the below link.
I used formatNumber expression and got the custom ID for the list items. However many thanks to both of you for your help and guidance on the request.
Regards,
Akshay
User | Count |
---|---|
23 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
45 | |
29 | |
26 | |
25 | |
22 |