cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Partha
Level: Powered On

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.

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 76 members 3,951 guests
Please welcome our newest community members: