cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KDesai6
Level: Powered On

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
KDesai6
Level: Powered On

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
KDesai6
Level: Powered On

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

Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 344 members 5,270 guests
Please welcome our newest community members: