cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

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
Helper V
Helper V

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

9 REPLIES 9
Helper V
Helper V

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.

Helper V
Helper V

Solved. 

 

For whatever reason, those syntaxes weren't working. 

This one did: 

 

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

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?

Frequent Visitor

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

Helper V
Helper V

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

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! 

Frequent Visitor

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).

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (5,375)