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

Community site session details

Session Id : XsK1CmiBQnKDOVwQcHIYLF
Power Apps - Microsoft Dataverse
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 17 Mar 2022 17:04:44 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

Categories:
I have the same question (0)
  • Prakash4691 Profile Picture
    1,332 on 21 Mar 2022 at 22:21:54
    Re: 'in' function delegation issue with Lookup column type in Dataverse

    @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

  • DerekShalShan Profile Picture
    25 on 20 Mar 2022 at 13:37:27
    Re: 'in' function delegation issue with Lookup column type in Dataverse

    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.

  • DerekShalShan Profile Picture
    25 on 19 Mar 2022 at 14:50:48
    Re: 'in' function delegation issue with Lookup column type in Dataverse

    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!

     

  • Prakash4691 Profile Picture
    1,332 on 18 Mar 2022 at 09:23:27
    Re: 'in' function delegation issue with Lookup column type in Dataverse

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics