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"))

7 REPLIES 7
Highlighted
Community Support Team
Community Support Team

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 here:(App 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

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.

Community Support Team
Community Support Team

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

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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/

HansHeintz
Level 8

Re: Delegation warning for CDS LookUp using = on GUID

I am having the same issue with a delegation error when LookUp a guid on a guid field, contrary to the table with delegation support table for variables and functions reference above. Your question is very simple so I am disappointed an answer was not possible.

Super User
Super User

Re: Delegation warning for CDS LookUp using = on GUID

I'm in the process of converting an App using the D365 connector to the CDS connector (as a banner now appears on apps using D365 advising conversion to CDS) and I hit the same problems. Could not find any delegable way of doing a filter / look-up based on the GUID 'primary key'.

Fortunately there were other fields (with text data type) that *should* be unique so I was able to filter on those instead (which is delegable).

I notice that you can make an auto-number field, so maybe that could be a work-around as well (make the field and then use that for your filters).

Given that CDS uses GUIDs for all its keys it does seem crazy that there is no way to peform a delegable filter on them.

Lots of other problems with the CDS connector as well - it is generally buggy, working with option sets is very painful and I can't find any way to patch a record with an 'entity type' field (even though the documentation claims that you can) - I'm having to use a hidden edit form in the background as a workaround.

NewcombR
Level: Powered On

Re: Delegation warning for CDS LookUp using = on GUID

I noticed that if I wrap the data source using the disambig function, the delegation warning goes away.

Example:
Lookup([@‘My CDS Entity’], ‘My CDS Entity’.’My CDS Entity’ = varGUID)

I haven’t tried using the GUID() function in the expression... I usually set the record ID as a variable separately.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

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

Community Summit North America

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

Top Solution Authors
Users online (9,538)