cancel
Showing results for 
Search instead for 
Did you mean: 

Allow Setting null value to the lookup field in Microsoft Dataverse connector

One of the feature gaps between Microsoft Dataverse (legacy) connector and Microsoft Dataverse connector is the ability to set the null value to the lookup field.

 

When we set the null value to the lookup field in Microsoft Dataverse connector, the flow fails with the following error.

 

 

 

An error occurred while validating input parameters: Microsoft.OData.ODataException: The 'odata.bind' instance or property annotation has a null value. In OData, the 'odata.bind' instance or property annotation must have a non-null string value.

 

 

 

 

It is important when we want to clear multiple lookup fields in one API call (without multiple Unrelate records actions), or the most common issue for me is passing the GUID from another step which is an optional lookup field (so that the value may/may not be null)

If the lookup field is polymorphic for both source and target records, it will be good if we can check the entity type in the expression and fill null/the target record OData ID accordingly into the right field.

 

One of the examples is Setting the Primary Contact in the screenshot below with the GUID value of "Primary Contact (Value)" which can be empty from the source data. Microsoft Dataverse connector cannot handle this kind of scenario and it will be great if we can use a null check expression for that case.

 

 

 

if(empty(triggerOutputs()?['body/_primarycontactid_value']), null, triggerOutputs()?['body/_primarycontactid_value'])

 

 

 

Flow Value Set.png

 

CC: @Audrie-MSFT 

Status: New
Comments
StephaneSeguin
Frequent Visitor

@microsoft 

Why are is this still not fixed? This post is 1 year old and we still have the same issue.

 

The more I use Flow the more I regret Classic Workflow that was working very well.

 

 

elmars
New Member

Fully agree. This workaround for Updating existing record to clear out Lookups, adds too much boiler logic and extra steps which also makes flows run slower in the end 😞

prodaptiv
Regular Visitor

Use an if empty expression with a concat like below.

if(empty(variables('ContactGUID')),null,concat('contacts(',variables('ContactGUID'),')'))

elmars
New Member

Hi @prodaptiv,

 

thanks. Now I can confirm this that setting "null" during Update method clears out the reference/lookup value! very great news indeed! Tested in version 9.2.21053.00135

 

And this works now both for Create and Update. Thank you MS! 😌

NielsL
Helper V

Are there any plans on fixing this? This is such as hassle working with lookups in the new'ish Dataverse connector.

LinnZawWin
Kudo Kingpin

I just noticed that we can now set the null value to the lookup column in the Microsoft Dataverse connector. Good job, team. 👏👏👏