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
Highlighted
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
Highlighted
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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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