cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
monty-psc
Level: Powered On

Delegation warning for CDS LookUp using = on GUID

Per https://docs.microsoft.com/en-us/connectors/commondataservice/#powerapps-delegable-functions-and-ope... , using a LookUp with equal comparison should support delegation for GUID columns.  However, I am only able to make this work without delegation warning using a Dynamics 365 data source.  How do I eliminate the delegation warning when using the CDS connector?

 

My LookUp function is on the Item property of my Display Form.

    LookUp(Accounts, accountid = GUID("my-guid-value"))

4 REPLIES 4
v-yutliu-msft
Level 10

Re: Delegation warning for CDS LookUp using = on GUID

Hi @monty-psc ,

Please check whether you open "Relational data, option sets, and other new features for CDS"

If not, Guid can't be used.

You could open it hereSmiley SadApp settings > Advanced settings.)64_LI.jpg

As the problem about delegation, try to use delegatable functions.

Here's a doc about delegatable funtcions in CDS:

https://docs.microsoft.com/en-us/connectors/commondataservice/

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

 

monty-psc
Level: Powered On

Re: Delegation warning for CDS LookUp using = on GUID

My app does have "Relational data, option sets, and other new features for CDS" enabled. 

 

To recreate the issue,

  1. create a new Canvas App. 
  2. Add a Display Form with the Accounts Entity (as a data source) from the Common Data Service. 
  3. Set the Item property of the Display Form to the following expression;

LookUp(Accounts, Account = GUID("valid-account-guid-from-environment"))

    4. Notice the Delegation warning.

v-yutliu-msft
Level 10

Re: Delegation warning for CDS LookUp using = on GUID

Hi @monty-psc ,

I notice that the GUID function is no-delegable funtion in CDS.

I suggest you use delegable functions to avoid the delegation warnming

Here's a doc about delegable funtions in CDS for your reference:

https://docs.microsoft.com/en-us/connectors/commondataservice/

 

 

Best regards,

Community Support Team _ Phoebe Liu

monty-psc
Level: Powered On

Re: Delegation warning for CDS LookUp using = on GUID

Since the GUID function does not support delegation, I used Set to create a global variable in the OnStart handler for the App.

 

Set(accountGuid, GUID("my-valid-guid"))

 

Then changed my Item property for the Display Form to;

  LookUp(Accounts_1, Account = accountGuid)

Accounts_1 is the CDS connection to Accounts.

 

I still receive the delegation warning.  If I use the Dynamics connection to Accounts, the delegation warning disappears and the app works as expected.

 

Am I doing something wrong?  The GUID type should support delegation per your referenced article @ https://docs.microsoft.com/en-us/connectors/commondataservice/