cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Custom Unique Reference Number

Hello,

 

I am trying to update a sharepoint list with a specifically formatted unique reference number using flow in the following format:

 

YYCNNNNNN
  • YY will be the last 2 digits of the year
  • C is a constant
  • NNNNNN represents a 6 digit number

 

Examples over time would be:

19C000001
19C000002
19C000003
[...]
21C003592
21C003593
etc.

I was thinking of using an expression in my 'unique ID' field using the "update item" action in flow. I was wondering how I would assemble the expression, as I am not too familiar with expressions in flow. I would also be interested in hearing if there is a more efficient way of accomplishing my desired outcome.

 

Please let me know.

 

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Custom Unique Reference Number

I ended up figuring it out. I used the 'formateDateTime()' function for the last 2 digits of the year; and a Do Until loop to add 0s to the beginning of the ID until it was 6 digits long. Then I concatenated the first output with the constant and then the second.

View solution in original post

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Custom Unique Reference Number

I ended up figuring it out. I used the 'formateDateTime()' function for the last 2 digits of the year; and a Do Until loop to add 0s to the beginning of the ID until it was 6 digits long. Then I concatenated the first output with the constant and then the second.

View solution in original post

Highlighted
Community Support
Community Support

Re: Custom Unique Reference Number

 

Hi @KDesai6 ,

 

Great! It appears that you have found a solution to your issue!

If so, please click "Accept as Solution" on the reply that describes how you were able to solve your issue!

This makes your post much easier for other members of the community to see and find when looking for a solution!

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (3,392)