cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ctishman
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
WarrenBelz
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
WarrenBelz
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (28,479)