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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (6,123)