cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Patching a LookUp field: The right side of the Equal operator must be a constant value

As the title says I am patching a LookUp field in CDS. I have not had a problem with this before.

 

1) I am creating an offline collection which collects some details for a new record plus the GUID of a related entity and the GUID for another related entity.

 

2) The first LookUp to be patched works. I create a GUID on the device for the related entity. Upload the related record first with the GUID then do a patch for the next entity and relate it with the GUID:

 

Shift: LookUp(Choices('Shift Activities'.Shifts), UID=new_shiftGUID)

 

3) Then the other related entity already has a record in the system so I get the system generated GUID

 

4) Within the same patch I try to update the LookUp field for this second related entity:

 

Campaign: LookUp(Choices('Shift Activities'.Campaigns), Campaign=new_campaignid)

 

5) While the record is patched, it does not complete the Campaign LookUp field. Instead, using monitor I get the following error:

 

"message": "The right side of the \"Equal\" operator must be a constant value."
 
6) If I put the field value in a text box with this formula:
First(colOfflineShiftCollection).new_campaignid
 
7) Then do another text box to Look Up the campaign based on the string:
LookUp(Campaigns, Campaign=GUID(Label26.Text)).Name

 

😎 It works and I can reference the Campaign

 

9) Similarly, if I patch the LookUp field using the value from the text box the Patch works fully!

 

10) What is going on? Why can't I patch this LookUp field?

3 REPLIES 3
Highlighted
Helper II
Helper II

Re: Patching a LookUp field: The right side of the Equal operator must be a constant value

Some additional information:

 

When looking at monitor, the request is the following:

 

Highlighted

Re: Patching a LookUp field: The right side of the Equal operator must be a constant value

Highlighted
Helper II
Helper II

Re: Patching a LookUp field: The right side of the Equal operator must be a constant value

Sorry I'm not sure what you mean by your reply. If you are suggesting that the second URL is the correct one then yes I agree, this is my point. PowerApps is not constructing the URL in this way, it is constructing the first one. I don't know why it is doing this and I can't see a way around it and so I am getting the problem I initially posted about.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,047)