cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Delegable Error message on non-unique submitted values

Howdy folks, I'm building a submission form for parts manufacturing based on a SharePoint list, and need to prevent duplicate parts from being submitted. I built my current method based on the sample provided by @RandyHayes in this post:


https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-check-that-a-field-value-is-unique-be...

 

My issue is that I'm getting a delegation warning on the CountRows function used in the check. I'd like to be able to walk away from this list and not have it poop out five years from now when there may be >500 parts in the database to search, so I'm looking for an alternative to CountRows that can be delegated.

 

Does anyone have suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Champion
Community Champion

Re: Delegable Error message on non-unique submitted values

Hi @ctishman ,

CountRows are certainly non-delegable.

One approach you might try is to use a Lookup to set a Variable based on finding the value in the current data set. If it is blank, then no record exists. So if you were looking for a PartNumber ,the list is Parts the input box NewPart and you had a PartDescription in the list.

Set(
   vExist,
   Lookup(
      Parts,
      PartNo = NewPart.Text,
      PartDescription
   )
);
If(!isBlank(vExist) . . . it exists

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

1 REPLY 1
Community Champion
Community Champion

Re: Delegable Error message on non-unique submitted values

Hi @ctishman ,

CountRows are certainly non-delegable.

One approach you might try is to use a Lookup to set a Variable based on finding the value in the current data set. If it is blank, then no record exists. So if you were looking for a PartNumber ,the list is Parts the input box NewPart and you had a PartDescription in the list.

Set(
   vExist,
   Lookup(
      Parts,
      PartNo = NewPart.Text,
      PartDescription
   )
);
If(!isBlank(vExist) . . . it exists

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,091)