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.

View solution in original post

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? 🙂

 

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.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,845)