cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chrisgreen
Level: Powered On

Ambiguous binding present on Patch

Hey all,

New to PowerApps, and thankful for these forums. Great community and the support / tips & tricks have been invaluable in learning the platform.

 

I've spent a ton of time searching this issue, but haven't been able to find a solution. Here's a quick synopsis.

  • PowerApp connected to CDS
  • Custom entity (Approvals) with Notes enabled
  • Data connection to both Approvals and Notes within the PowerApp

I'm trying to give users the chance to add notes to the Approval record they're working with (text input), but I'm running into a snag when my formula runs.

 

Here's my code: 

Patch(Notes,Defaults(Notes),{
    notetext:NotesInput.Text,
    objecttypecode:"approvals",
    _objectid_value: Gallery1.Selected.Approval,
    subject:"New Note Added"
    });

The error I'm getting is:

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

As far as I can tell, I'm sending the right field values, but I haven't been able to make this go away. I've checked the relationship in the CDS and all looks right. All my field names and values have been verified in Excel. When I had a note through a model-driven app, all the values (particularly objecttypecode) match what I'm trying to send.

 

Any thoughts or suggestions, or places to check would be appreciated! Happy to put in the leg work and dig up the solution myself, but I'm stuck and need some hints.

 

Thanks all!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
chrisgreen
Level: Powered On

Re: Ambiguous binding present on Patch

Hi Kris,

Thanks for the link. I had seen that post before with no luck, but it indirectly gave me the answer.

 

When I switched "objecttypecode" to "_objectid_type", I got a different error: "invalid lookup_type value"

 

I noticed that all the examples use "contacts" or "accounts", which led me to look at my custom entity naming schema. Another post I found mentions using the plural of the entity schema name. In the case of Contacts or Accounts, the schema name is "account" and "contact", but the code references "accounts" and "contacts".

 

In the case of my custom entity, I had already made the schema name plural: "approvals" -- As soon as I set my code like:

_objectid_type: "approvalses"

It started working. A little more research to realize that these queries use the "EntitySetName" which gets generated as a plural (my best guess). Confirmed using the metadata browser.

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/browse-your-metadata

 

A lesson in using proper naming conventions.

 

Thanks!

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Ambiguous binding present on Patch

Hi @chrisgreen,

Could you please share more details about the error message on your side?

Based on the formula that you provided, I have made a test, the issue is confirmed on my side.

The user @DChrisPhillips has faced similar issue with you, please check the response from PowerApps Staff @bsimons within the following thread:
https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/How-do-I-update-CDS-Contact-entity-...

Please consider take a try to modify your formula as below:

Patch(Notes,Defaults(Notes),{
    notetext:NotesInput.Text,
    _objectid_value: Gallery1.Selected.Approval,
    _objectid_type: "approvals",  /*<-- Add formula here */
    subject:"New Note Added"
})

then check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
chrisgreen
Level: Powered On

Re: Ambiguous binding present on Patch

Hi Kris,

Thanks for the link. I had seen that post before with no luck, but it indirectly gave me the answer.

 

When I switched "objecttypecode" to "_objectid_type", I got a different error: "invalid lookup_type value"

 

I noticed that all the examples use "contacts" or "accounts", which led me to look at my custom entity naming schema. Another post I found mentions using the plural of the entity schema name. In the case of Contacts or Accounts, the schema name is "account" and "contact", but the code references "accounts" and "contacts".

 

In the case of my custom entity, I had already made the schema name plural: "approvals" -- As soon as I set my code like:

_objectid_type: "approvalses"

It started working. A little more research to realize that these queries use the "EntitySetName" which gets generated as a plural (my best guess). Confirmed using the metadata browser.

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/browse-your-metadata

 

A lesson in using proper naming conventions.

 

Thanks!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Users Online
Currently online: 174 members 6,355 guests
Please welcome our newest community members: