cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Draax
Level 8

The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Hello,

 

Ive been trying for hours to make PowerApps propperly patch to Dynamics 365 (CDS).

However im getting an error I cant make sense of and hoping for some input.

Error im getting:

 

The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property.

 

My code:

Patch(Ordrar, Defaults(Ordrar), {Name: "Powerapp2", 'Price List': Gallery1_1.Selected.'Price List', 'Prices Locked': false, 'Transaction Type': Gallery1_1.Selected.'Transaction Type', Status: 0,'Order ID': 7 , Owner: Gallery1_1.Selected.Owner, '_customerid_type': Gallery1.Selected.User, '_customerid_value': Gallery1.Selected.User  })

Gallery1 = Dynamics Users


The errors occur when i try to patch a lookup field and i cant figure out why or how to fix it.

 

This is the fields im trying to patch:
Potential Customer and Your reference.

Screenshot_dynamics1.png



 

Any input are highly appriciated!

-Draax

 

 

6 REPLIES 6
Dual Super User
Dual Super User

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Hi @Draax 

 

To Patch the data in a Lookup field can you try out the below expression:
 
Patch('Data Source',Defaults('Data Source'),{Name:"test",LookUpCol:{Id:LookUp(DataSource2,Name = "test").ID,Value:LookUp(DataSource2,Name = "test").Name}})
 
Here, I am creating a new record in my datasource and the lookup column name is "LookUpCol" which is a lookup field to DataSource2 and this way you can send the data using a patch command. Please make the modifications as per the highlighed part into your Potential Customer field.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Draax
Level 8

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

@yashag2255 thanks a lot for your reply!

Unfortunally im reciving a new error:

 

 

dynamicserror.png


Ive googled this error howerver i cant find much related to PowerApps.

 

The code im now using:

Patch(Orders, Defaults(Orders), {Name: "Powerapp10", 'Price List': Gallery1_1.Selected.'Price List', 'Prices Locked': false, 'Transaction Type': Gallery1_1.Selected.'Transaction Type', Status: 0,'Order ID': 11+1, zync_yourreference: {Id:LookUp(Users,'Full Name' = "test") ,Value:LookUp(Users,'Full Name' = "test").'Full Name'} })

 

Draax

Dual Super User
Dual Super User

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Hi @Draax 

 

Regarding the first error, you have not passed the ID for the Lookup field, hence it is giving an error, please modify your expression as:
Patch(Orders, Defaults(Orders), {Name: "Powerapp10", 'Price List': Gallery1_1.Selected.'Price List', 'Prices Locked': false, 'Transaction Type': Gallery1_1.Selected.'Transaction Type', Status: 0,'Order ID': 11+1, zync_yourreference: {Id:LookUp(Users,'Full Name' = "test").ID ,Value:LookUp(Users,'Full Name' = "test").'Full Name'} })
 
Second error reflects that the formula is missing a required attribute, 'Role Label', you need to pass all the required attributes in the Patch formula. Please add a value for 'Role Label'.  If you don't want to add data to this field, you make it not-required in the entity configuration. Once it is unchecked for Required, you need to refresh the connector and try again with the same formula.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Draax
Level 8

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Thanks for your reply,


I feel like im doing some small but stupid mistake, however the "ID" is marked red and it seems like the datasource does not contain an ID.

Screenshot_dynamicsID.png

 

 

-Draax

Dual Super User
Dual Super User

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Hi @Draax 

 

The way data gets patch differs as per data source. This differs for the same entity if added directly as CDS entity or as an entity in DYnamics 365 environment. Although they are same but expects a different schema throughout.
 
If you have added the data source as Common Data Service, you can use the expression:
Patch(Ordrar, Defaults(Ordrar), {Name: "Powerapp2", 'Price List': Gallery1_1.Selected.'Price List', 'Prices Locked': false, 'Transaction Type': Gallery1_1.Selected.'Transaction Type', Status: 0,'Order ID': 7 , Owner: Gallery1_1.Selected.Owner, zync_yourreference = Lookup(Users, 'Full Name' = "test")})
 
 
Else, if it is added as Dynamics365 connector, you can use:
Patch(Ordrar, Defaults(Ordrar), {Name: "Powerapp2", 'Price List': Gallery1_1.Selected.'Price List', 'Prices Locked': false, 'Transaction Type': Gallery1_1.Selected.'Transaction Type', Status: 0,'Order ID': 7 , Owner: Gallery1_1.Selected.Owner, zync_yourreference = Lookup(Users, 'Full Name' = "test").Users})
 
This dynamics365 connector expects a GUID value, hence we need to pass that. The Highlighted part contains the name of attribute which holds this value, please replace this with the actual value as per your entity.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Draax
Level 8

Re: The requested operation is invalid. Server Response: Ambiguous binding is present. Resolve by sending lookup_type property

Thanks for your patiance, 

I found one major issue. I was trying to patch a User into a Contact field.. Took some time for me to figure that out.

 

However to make things simple i have a gallery with my orders and a button to update the contact from a dropdown with this code:

 

Patch(Orders, ThisItem, {zync_yourreference: Dropdown4.Selected})

(Dropdown 4, Items = Contacts)

 

Doesn't give me any error but neither does it patch the contact to the order.
I also tried to add ... Dropdown4.Selected.Contact but its will give me an error that its looking for an record not a guid.

 

Im completley stuck.

 

-Draax

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,342)