cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RealMABN
Helper II
Helper II

Generated number in powerapps needs to be locked in dataverse

Hi all,

We have made a function in our Powerapp that makes it possible to generate the lowest number available in one of our Dataverse column. The problem that we face is that the app is meant to be used by multiple people and at some point we will run into a situation, where two users will have generated the same number and then submitted a Dataverse form with it, when the number should be unique for each record. 

We were thinking about creating a record with number when its generated and then delete the record when we submit the "real" form. But I feel like this is a duct tape solution, and want to hear you guys if you could come up with another solution 🙂

Thanks in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
gabibalaban
Dual Super User
Dual Super User

@RealMABN ,

The  generate number process should be done at submission time, not earlier. The user will be aware about this number after the successful save.     

View solution in original post

VJR
Super User
Super User

 

- If its possible generate the lowest number during the final Submit.

- Another option is during the final submit, have a check function that will check if the newly generated number is already in any of the submitted records column. If yes, find the next lowest available number.

View solution in original post

3 REPLIES 3
gabibalaban
Dual Super User
Dual Super User

@RealMABN ,

The  generate number process should be done at submission time, not earlier. The user will be aware about this number after the successful save.     

VJR
Super User
Super User

 

- If its possible generate the lowest number during the final Submit.

- Another option is during the final submit, have a check function that will check if the newly generated number is already in any of the submitted records column. If yes, find the next lowest available number.

RealMABN
Helper II
Helper II

Thanks for the suggestions. I will try and see if it works for us! 🙂

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.

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 (3,481)