cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yjamous
Helper IV
Helper IV

Unique numbers

Hi

I'm creating an application that has generates a random number and stores this number in the SP list.

Now, I'm trying to figure out how can I ensure the newly generated number is NOT already available in SP List? and if it's available in SharePoint list, I wish to generate a new one.

 

1 ACCEPTED SOLUTION

Accepted Solutions
KennyJ
Resolver II
Resolver II

Hey,

the way I would do this is to user a combination of the date and time as a string. 
Default = Text(Now(), “yyyymmddhhmmss”)

 

this will give you a unique number but also something that you can recognise of you needed to. 

thanks

View solution in original post

2 REPLIES 2
KennyJ
Resolver II
Resolver II

Hey,

the way I would do this is to user a combination of the date and time as a string. 
Default = Text(Now(), “yyyymmddhhmmss”)

 

this will give you a unique number but also something that you can recognise of you needed to. 

thanks

This is CLEVER!

I was thinking to query the SP List after each generation, but this is going to solve my problem and make my life easy and save me a lot of code writing 🙂

Thanks a lot

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,423)