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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Automate Dataver...
Power Apps
Unanswered

Power Automate Dataverse connector Actions Add a Row and Update a Row - Different syntax for populating lookups with blanks

(1) ShareShare
ReportReport
Posted on by 1,430 Super User 2024 Season 1

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.

 

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @jcfDaniel 

    Does the null work correctly for the first case instead of ''?

    Even including when some lookups are left blank too?

    If so you may want to use the null version consistently if that is the one that is working.

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    It does work and makes sense to use null on both but what really got me was '' not working for the update a row action. I believe there may be a reason for it but I am unaware of what that reason may be.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @jcfDaniel 

    I am not sure of the reason, perhaps one action can implicitly refer the '' as null since the record does not exist yet, and the other cannot do so as it was not internally implemented like that as it cannot convert existing type to empty string, but new record not existing it doesn't exist so it does not make the conversion of string. However it is probably just an unexpected behavior and probably it's because the null one is the correct one to use and not the ''. However I am not 100% sure of the actual reason

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard