web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 'in' function delegati...
Power Apps
Unanswered

'in' function delegation issue with Lookup column type in Dataverse

(0) ShareShare
ReportReport
Posted on by 25

Hi, I was surprised to find this issue with "in" function delegation with my Dataverse for Teams app.

 

My goal is to have multi-choice selections based on Lookup column relationships, using the "in" function to determine whether the Lookup value is in the relevant collection.  In my example below, using "in" with the choice and text columns is OK, but with the Lookup column in the last line of filter criteria there is delegation warning that will be a problem:

Sort(
Filter(
Events,
eventDateStatus = [@eventDateStatus].'External Deadline' || !_vIsExternalDeadline,//Choice column with equality is OK
eventName in colEvTypes.evTypeName || _vAllEventTypes,//Text column in collection is OK
eventDateStatus in colDateStatus || _vAllDateStatus,// Choice column in collection is OK
evTypeLookup in colEvTypes// lookup column in collection -- Not delegable?!
),
eventDate
)

 

DerekShalShan_0-1647535813610.png

 

I definitely have the "Enhanced delegation" setting turned on:

 

DerekShalShan_2-1647536286276.png

 

I also tried GUID values as a potential workaround but still blue underlines. 

 

Is there a workaround or am I missing some other solution?  

 

I am thinking a workaround would be to have a text copy of the Lookup column, but this seems so inefficient I wanted to check here first for any better way, thanks! ;-D

I have the same question (0)
  • Prakash4691 Profile Picture
    1,332 on at

    Hi @DerekShalShan ,

    I think enhanced delegation works only for the same entity. In your case, lookup points to another table so "in" operator will be non-delegable(Even if you try with any text field).

     

    I hope it answers your question, kindly give kudo and accept it as solution.

     

     

    Regards,

    Prakash

  • DerekShalShan Profile Picture
    25 on at

    Thanks, @Prakash4691 , kudos for your input, for sure! I am hoping some further exploration will result in a solution. 

     

    I have found a PowerFx calculated column in the child table can reference various fields of the Lookup record--Here is an example:

    DerekShalShan_0-1647700054682.png

    This is OK when the parent table is acting as a "Choices" table and the "evTypeName" in this case will be unique, but in other situations need to reference the unique record--But the PowerFx formula technique will not work with the GUID --See the red squiggles:

     

    DerekShalShan_1-1647700291680.png

     

    The Text function does not work in this context to convert the GUID into a text string:

     

    DerekShalShan_2-1647700398321.png

    But if an autonumber column is added, this can be used as a unique ID in place of the GUID:

     

    DerekShalShan_3-1647700472455.png

     

    Then, this Autonumber is delegable, no blue underlines:

    DerekShalShan_4-1647701177451.png

     

    HOWEVER, this requires some inefficient extra steps:

    1) Creating an AUTONUMBER column in the Lookup table

    2) Creating Lookup column in child table (needed regardless)

    3) Creating a PowerFx calculated column in the child table that references the Lookup record's Autonumber

    4) The "in" function leveraging the autonumber PowerFx column then appears delegable

     

    Is there a better way? 

    Ie, perhaps to at least use the GUID instead of having to create an autonumber column? 

    Thanks!

     

  • DerekShalShan Profile Picture
    25 on at

    Also, I did find and appreciate this video from @Arslan ...

    https://youtu.be/0c2dO9FPmDg

     

    ....but with Lookup column appears still not delegable:

    DerekShalShan_0-1647782745170.png

    Also, BEWARE: Using "AddColumns" to get the Lookup GUID and applying the "in" function there does not trigger a delegation warning, but there is clearly delegation in my instance when testing by setting the limit to 1.

  • Prakash4691 Profile Picture
    1,332 on at

    @DerekShalShan ,

    This approach will not work for you, two things here.

    1. He is doing it for an option set and those values are static. In your case those are records from another table and it is dynamic.

    2. He tried optionset from same table, in your case lookup points to a different table.

     

     

    Regards,

    Prakash

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard