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

Community site session details

Session Id :
Power Automate
Unanswered

Update a row woes

(1) ShareShare
ReportReport
Posted on by 44
Consider the following scenario, I want to update an entity (eg work order) on a value that is a reference, that is conditionally mandatory.
 
Eg, I have a custom field name change status reason that is conditionally mandatory based on the value of msdyn_systemstatus.
 
Since is a reference, the value is of the form dot_workorderstatusreasons(%GUID%) where GUID is a variable.
 
If I want to clear the value, I simple pass the function null instead of dot_workorderstatusreasons(%GUID%)
 
Where is the catch? If I set a character variable to NULL and pass it on the value of the field then it doesn't work!!!! WHY?
 
Ok, there is a work around to check if I had a guid and depending on this do either a update a row passing dot_workorderstatusreasons(%GUID%) or update a row passing the function null, however this is frankly moronic, since supposedly passing a string variable set to function null should be the same!!!!!
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    52,972 Super User 2025 Season 2 on at
    Update a row woes
    Hi
     
    Let's start at the beginning. You do a fairly good, not great, job of explaining what is wrong.
     
    However, what you don't have is the actual Flow with the actions etc so we can see them. Nor do you have the action to do the update with the Raw Inputs to validate that 1) you didn't accidentally TYPE null into the variable, versus using the expression.
     
    So right now I got nothing since I don't see anything. Now adays this is super common to talk about flows but not actually show them :-) not sure why but hey, provide the info and happy to help
  • menes Profile Picture
    44 on at
    Update a row woes
    It is really simple.
     
    This works:
     
    This doesn't:
     
     
     

    The problem is that a null string is passed as '' and not as null, and these two are not the same, null is no value where '' is empty value


  • Verified answer
    menes Profile Picture
    44 on at
    Update a row woes
    Treating it as object didn't work either, because though it allowed passed NULL object, it didn't allow passing a string value.

    What did the trick is using the following:

    if(equals(triggerBody()?['StatusReason'],''),null,variables('Status Reason'))

    where Status Reason is defined as string with value dot_workorderstatusreasons(triggerBody()?['StatusReason'])

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard