Hi,
I have been working with an integration between Dataverse and an ERP system and came across a somewhat unexpected hurdle...
I started to build a flow to add a row to the accounts table whenever a new account is created in the ERP and I had to handle the prossibility that a few lookups may be left empty in the ERP account record and so I used the following syntax:
if(empty(variables('varCountry')), '', variables('varCountry'))
Finished with that flow, I had to build another flow to carry updates made in the ERP account record up to Dataverse and, again, I had to take care that some lookups may be blank. I used the exact same syntax but I got back an error:
The supplied reference link -- -- is invalid. Expecting a reference link of the form /entityset(key).
After some trial and error, I come to the conclusion that I had to give Power Automate a different syntax for the Update a row action:
if(empty(variables('varCountry')), null, variables('varCountry'))
The Add a row action is fine with '' but the Update a row action is not ant it wants null.
Have you ever come by one these nuances that are sometimes difficult to spot?
Regards.