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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The requested operatio...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 142

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

 

 

I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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 Profile Picture
    142 on at

    @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

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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 Profile Picture
    142 on at

    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

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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 Profile Picture
    142 on at

    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard