cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Flow - Autogenerating two unique numbers

Hello,

 

We already have a flow setup that will create a new job and copy the files needed to the sharepoint site.. This is working great... However, we would like to auto generate two numbers and place in a PDF file/template..

 

Question: I was wondering if someone is willing to help us. This process will need (2) unique numbers: one is a job# and the other is a permit#.. Can we setup a Flow that will auto generate both numbers? and store the numbers into a PDF template that we have created? this PDF file is stored on a sharepoint site.

 

Any help would be greatly appreciated.

 

Thank You,

3 REPLIES 3
Highlighted
Regular Visitor

Re: Flow - Autogenerating two unique numbers

 
Highlighted
Skilled Sharer
Skilled Sharer

Re: Flow - Autogenerating two unique numbers

Hi DougL1

You could use a variation of my Random Password Generator approach to generate the numbers you require. I’d recommend a format that uses 4 or 5 characters to increase the chances that it’s unique.

https://medium.com/@mark_stokes/generating-pseudo-random-passwords-in-microsoft-flow-d7a9c232abe5

To “ensure” it’s unique, I would store the generated values in a list somewhere. Maybe a Excel Spreadsheet or as metadata against the PDF that you generate if you store it in SharePoint. If you do this then you can put your random number generator in a loop that generates a password, gets items from SharePoint that match and if no items are returned then you know it’s unique. Otherwise you just go creating new ones until you find one to be unique.

I haven’t done any PDF generation from Flow so can’t conment on the connectors. Typically you’d generate the document body (probably in a html markup) and send it to some PDF Maker service. This is a bit like my MailChimp example.
https://medium.com/@mark_stokes/creating-and-sending-a-mailchimp-campaign-with-custom-html-from-shar...

Hope this helps.

-Mark
Highlighted
New Member

Re: Flow - Autogenerating two unique numbers

Hi Mark,

 

Thanks for the info... Can you please repost the 2nd link? regarding the PDF file? as I am unable to get the link to work.

 

Thank You,

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 (5,540)