cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

unique value in Text input

 

ppp

1 ACCEPTED SOLUTION

Accepted Solutions
TimRohr
Level 10

Re: unique value in Text input

I've tackled that problem in the past like this:

...add a "check" table, that houses a combo of User, a time stamp, and the proposed Sales Group.

...when the Sales Group is "proposed" write it to the Check table (use Patch() to create a record)

...immediately check it against the Check table; in the case of another record with the same code (another user with the same proposed Sales Group), compare time stamps to determine priority

...if that test passes, check it against the live, main table (housing the unique Sales Group codes)

 

You can perform that validation after the code is generated/proposed and put into the text box (if your logic of code production is automated, this can be a part of the process). If one of the tests fails, delete the record from the Check table, and inform the user they have to select/generate a new Sales Group code.

 

When the record gets written to the live, main table, delete the record from the Check table.

 

You could also have some logic that if there is a record claiming priority for that Sales Group code that actually dates to the previous day (or 2 days ago, or a week, etc.), then you assume that record was orphaned and you delete it.

View solution in original post

1 REPLY 1
TimRohr
Level 10

Re: unique value in Text input

I've tackled that problem in the past like this:

...add a "check" table, that houses a combo of User, a time stamp, and the proposed Sales Group.

...when the Sales Group is "proposed" write it to the Check table (use Patch() to create a record)

...immediately check it against the Check table; in the case of another record with the same code (another user with the same proposed Sales Group), compare time stamps to determine priority

...if that test passes, check it against the live, main table (housing the unique Sales Group codes)

 

You can perform that validation after the code is generated/proposed and put into the text box (if your logic of code production is automated, this can be a part of the process). If one of the tests fails, delete the record from the Check table, and inform the user they have to select/generate a new Sales Group code.

 

When the record gets written to the live, main table, delete the record from the Check table.

 

You could also have some logic that if there is a record claiming priority for that Sales Group code that actually dates to the previous day (or 2 days ago, or a week, etc.), then you assume that record was orphaned and you delete it.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,741)