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 - Building Flows
Unanswered

checking if a string variable is null always return false

(0) ShareShare
ReportReport
Posted on by 3,504

I have a SharePoint field named "Prime Mover" of type People/Group >> and it is optional, where i have the following actions:-

 

1) Get the display name of the "Prime Mover"

2) Assign it to a variable

3) Check if this variable is null

 

but even if the user did not enter "Prime Mover" value >> condition (check if the variable is null) will evaluate to false, as follow:-

 

johnjohn123_0-1684856484775.png

 

here is the output when the flow runs:-

 

johnjohn123_1-1684856533078.png

 

 

any advice on this please?

 

Thanks

 

I have the same question (0)
  • Pstork1 Profile Picture
    68,273 Most Valuable Professional on at
    Re: checking if a string variable is null always return false

    String variables by definition are never null. They may be blank, but they aren't null.  Null means the value doesn't exist.  Blank means there is no value in the string.  Its = ""

  • johnjohn123 Profile Picture
    3,504 on at
    Re: checking if a string variable is null always return false

    @Pstork1 so is there an IsBlank() function i can use?

  • Pstork1 Profile Picture
    68,273 Most Valuable Professional on at
    Re: checking if a string variable is null always return false

    No, there isn't an isblank() function. But you can just leave the right side of the condition empty, instead of adding a Null. That will check to see if its an empty string.

  • johnjohn123 Profile Picture
    3,504 on at
    Re: checking if a string variable is null always return false

    @Pstork1 I used Empty() function and set the right side of the condition to "true" .. seems it fixed the issue

  • Pstork1 Profile Picture
    68,273 Most Valuable Professional on at
    Re: checking if a string variable is null always return false

    That will work as well, but it isn't necessary.  You can just leave it blank.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard