cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

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
Super User III
Super User III

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,861)