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

Delegation Issue - concatenate in lookup function

Hello.

 

I have a delegation issue, when having a compoite ID. The primary key is made up of "coloum_a, coloum_b" as a composite key on my SQL server.

 

In PowerApps, I need to lookup if a specific composite key is already existing, so I use both ID's from the app and combine them in concatenate(coloum_a, coloum_b) and get a delegation warning.

 

How can I avoid this delegation warning? 

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Delegation Issue - concatenate in lookup function

@Daniel_ 

Yes, if you want to avoid delegation issues and your datasource is over 2000 records and you cannot perform a delegable query to it, then you will need to gather all of the records in a local collection and filter/query against that.

The challenge will be how many records and what unique column can be used to "split" the delegable queries to the data source.

For example, if you have an autoincremented integer ID column in your datasource (I assume this is SQL) you can use that to cast multiple collections based on the ID (let's say they are all sequential) - 

Collect records where ID<2000, then records where ID>=2000 and <4000, etc.  There are many examples of this on this forum, so if you need some more specifics on it, search for them and if no luck...post back and we can continue to explore the options.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
6 REPLIES 6
Super User
Super User

Re: Delegation Issue - concatenate in lookup function

@Daniel_ 

Concatination and other various functions will cause delegation issues as you are seeing.  A quick workaround for this is to assign a variable with the concatenated value and then use that variable in your lookup.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Daniel_
Level: Powered On

Re: Delegation Issue - concatenate in lookup function

Hello.

 

I forgot to mention that I use a gallery, and I don't think a variable at each row will solve this problem.

 

- Daniel

Super User
Super User

Re: Delegation Issue - concatenate in lookup function

@Daniel_ 

In this case, to avoid the delegation issue, you'll need to collect the information into a Collection and use that as the Gallery Items.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Daniel_
Level: Powered On

Re: Delegation Issue - concatenate in lookup function


@RandyHayes wrote:

@Daniel_ 

In this case, to avoid the delegation issue, you'll need to collect the information into a Collection and use that as the Gallery Items.


I have the gallery items from a master data table, and patches the values into a record table.

 

So I assume I would have to collect all the records from the record table into a collection, and use that for lookup and avoid the delegation issue? If so, can you bring an example? Smiley Happy

 

Thanks for your response,

 

Daniel

Community Support Team
Community Support Team

Re: Delegation Issue - concatenate in lookup function

Hi @Daniel_ 

 

More information:

create-update-collection

 

Best Regards.

Yumia

Super User
Super User

Re: Delegation Issue - concatenate in lookup function

@Daniel_ 

Yes, if you want to avoid delegation issues and your datasource is over 2000 records and you cannot perform a delegable query to it, then you will need to gather all of the records in a local collection and filter/query against that.

The challenge will be how many records and what unique column can be used to "split" the delegable queries to the data source.

For example, if you have an autoincremented integer ID column in your datasource (I assume this is SQL) you can use that to cast multiple collections based on the ID (let's say they are all sequential) - 

Collect records where ID<2000, then records where ID>=2000 and <4000, etc.  There are many examples of this on this forum, so if you need some more specifics on it, search for them and if no luck...post back and we can continue to explore the options.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 550 members 6,009 guests
Please welcome our newest community members: