cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mqcp
Resolver I
Resolver I

Delegation warning when Sort() over a lookup column item

I have a table called "Master" that has a lookup column to a table called "All Products". The lookup column is called "Product". In the "All Products" table there is a column called 'Product Name'. Here is the Sort() function that throws the delegation warning. 

 

 

Sort(
    Master,
    Product.'Product Name'
)

 

 

While it seems to be working fine I want to ensure there's no issues as the dataverse tables grow. I've also attempted to use this formula but get a delegation warning as well.

 

 

Sort(
    Master,
    LookUp('All Products', Product.'Product Name' = 'Product Name', 'Product Name')
)

 

 

What's the best way to sort over a lookup column value and avoid a delegation warning?

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@mqcp 

Sort(
     AddColumns(
                Master,"Prodt",Product.'Product Name'
     ),Prodt
)

View solution in original post

2 REPLIES 2
AhmedSalih
Super User
Super User

Hello, @mqcp, Sort, and SortByColumn are both delegable for dataverse but your issue is they are not delegable with a Choice value which in your case is the Lookup Column. Can you filter the data needed by any criteria and load it into a collection that you can use with the sort function? 

 

Regards,

Ahmed

If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.

My Blog: www.powerplatformplace.com

Drrickryp
Super User
Super User

@mqcp 

Sort(
     AddColumns(
                Master,"Prodt",Product.'Product Name'
     ),Prodt
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (6,466)