cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Continued Contributor
Continued Contributor

Flow Condition "if field is blank" always returning false

Hi all, 

I'm trying to have a Flow check if a field is empty. I used the syntax: @not(empty(triggerBody()?['MyField'])) found in this thread:

https://powerusers.microsoft.com/t5/2017-Flow-Forum-Holiday-Haul/Check-if-sharepoint-field-is-not-bl...

 

But no matter what the condition returns false. 

 

Same with this syntax: @Empty(body('Get_file_properites')['MyField']) found in this thread:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Check-if-a-field-is-blank-in-SharePoint/...

My whole Flow is like this:

 

Flow1.PNG 

Where If Yes an approval process is started, and If No, an email is sent. 

No matter what, the condition runs as false. 

 

Any advice?

Sylvie

1 ACCEPTED SOLUTION

Accepted Solutions
SylvieLet17
Continued Contributor
Continued Contributor

Looks like @Pieter_Veenstra already answered this question for me ages ago and I blanked it all out. Probably trying to forget my traumatic experiences. 

He answers it here: https://powerusers.microsoft.com/t5/Building-Flows/Flow-Condition-If-Field-is-Blank/m-p/136853#M1354...

Solution is:

 

Using Basic Mode, set your field and then use Expression Null in the value field on the right. 

Seems like advanced mode just doesn't work. 


Thanks Pieter (again)

View solution in original post

10 REPLIES 10
SylvieLet17
Continued Contributor
Continued Contributor

Update:

I changed the field from a hyperlink to a single line of text field. 

The Flow now runs both actions after the condition. 

 

So it starts an approval process AND it sends an email. Which is bizarre.

SylvieLet17
Continued Contributor
Continued Contributor

Solved. 

 

For whatever reason, those syntaxes weren't working. 

This one did: 

 

@Empty(item()?['MyField'])

SylvieLet17
Continued Contributor
Continued Contributor

Update: this condition is no longer working. 

 

Now it is only returning as true. 

With the syntax  @Empty(item()?['PublishedVersion'])  it is returning True whether PublishedVersion is empty or not. 

 

Help?

JLam63
Frequent Visitor

Any updates on this? I am currently having the same issue. Always True.

SylvieLet17
Continued Contributor
Continued Contributor

Looks like @Pieter_Veenstra already answered this question for me ages ago and I blanked it all out. Probably trying to forget my traumatic experiences. 

He answers it here: https://powerusers.microsoft.com/t5/Building-Flows/Flow-Condition-If-Field-is-Blank/m-p/136853#M1354...

Solution is:

 

Using Basic Mode, set your field and then use Expression Null in the value field on the right. 

Seems like advanced mode just doesn't work. 


Thanks Pieter (again)

Amazingly I can't get "null" to work for me now. It even pops up in the suggester box but when I click it it says "invalid expression". I did get your initial suggestion (@Empty(item()?['MyField'])) to work though! 

Anonymous
Not applicable

For some reason, the null method does not work for me. I have an Assigned To (people/group column) that breaks my flow if no name is entered, so I am adding a condition to auto assign if null. Unfortunately, the condition always returns False. 

 

condition.png

 

Check for Null works fine for me (Release April 2020).

Anonymous
Not applicable

I tested it on a new flow and it still did not work for me. There seems to be a decent variation of functionality between users on forums when it comes to the person/group columns. I wonder if there is something different with company profiles that causes this?

 

Fortunately, I am no longer relying on the person/group field. I chose to create an array variable with user emails, append my different scenarios, remove any duplicates and convert to a "claims" field format. So far, this has been working wonderfully for me.

 

Best regards,

Alex

vguddanti
New Member

Simply give an empty string means just the quotes ("") instead of null. Works for me though!!

 

Field     equals to       ""

 

Hope this helps!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,058)