cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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?

JLam63
Frequent Visitor

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

SylvieLet17
Responsive Resident
Responsive Resident

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! 

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

Alexdcave
Frequent Visitor

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,366)