web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a Unique 5 char...
Power Automate
Answered

Create a Unique 5 character Identifier

(0) ShareShare
ReportReport
Posted on by 20

Hi,

 

We have a naming convention for our documents that contains a 5 character reference.

 

A-BCDE-RPT-A48FT-00001

 

The part in bold is what we're looking to generate. We use a SQL stored proc for our on premise environment, I was hoping there might be a similar type of functionality in Power Automate (rather like Excels RAND but with characters too).

 

We aren't worried about it being able to validate that it is truly unique because the rest of the reference should ensure the overall reference is unique, in the unlikely scenario that those 5 characters would be the same randomly generated.

 

I thought I'd ask CoPilot to help and that gave me this promising looking function "generateUniqueIdentifier(5)" but alas, when I run it, it's not recognised (thanks CoPilot).

 

Any thoughts on how to achieve this?

 

Thanks

Categories:
  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @greenawayr 

     

    In power automate, we have guid function to generate the unique identifier. Pls check out if that is useful for you:

    ManishSolanki_0-1706791949681.png

    guid()

     

    Output:

    ManishSolanki_1-1706792035303.png

     

      

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Verified answer
    greenawayr Profile Picture
    20 on at

    Thanks @ManishSolanki I think that will do the job. I can use the GUID and just trim the last 5 characters off the end using substring. It's not guaranteed to be unique, but it's likely to be and that's the main requirement as uniqueness is offered elsewhere in the Reference.

     

    Thanks  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard