Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

IF condition returns false when true expected

(0) ShareShare
ReportReport
Posted on by 9

First time poster and a newcomer to Power Automate but come from a programming background.

 

I'm building a flow to validate and update information in a Sharepoint list - it's for logging and tracking the progress of Asset Purchase Requests but that's largely irrelevant.  Inside the flow is a condition check to make sure all the information needed to advance the status to Requisitioned is present.  If this fails a string of errors is built up to provide the reasons for failure to the user in an email.  The check on the supplier variable is returning a false when it should be true.  My diagnosis is as follows:

 

1. Supplier variable initialised:

Supp var.png

 
 

This is set further on in the flow after Get Item retrieves the Sharepoint List item the flow is running on and an optional input at the beginning of the Flow using Input boxes in the triggering event (For a Selected Item)

Set Supplier.png

 

It is possible for the supplier to be left empty although this causes the validation on the item to fail (legitimately) here:

Validation.png

 

A variable storing all the possible errors is appended to in order to provide feedback to the user about the reasons for the flow failing. In the following, a check on the Supplier variable is made (NB: In this example the Cost price is also 0 so it fails for multiple reasons):

Supp Check.png

However, when I run the flow despite the Supplier variable being set to Null (here we can see it being set by the flow.)

RunSet Supp.png

When the check is made to fill the error message it doesn’t recognise the variable as being set to null and therefore doesn’t populate the error message string variable.

Error Supp.png

The Supplier variable is empty yet the IF supplier = null condition returns false. Help! What am I missing here?

 

  • Verified answer
    JonnyMain Profile Picture
    9 on at
    Re: IF condition returns false when true expected

    Update on this:  I found a workaround.

     

    Instead of checking the value of the variable I can write an expression using the empty() function

    SolutionSupp.png

    So the above expression reads as:

    empty(variables('Supplier')) is equal to true.

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1