cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Level 8

Flow Condition If Field is Blank

Hi all, 

 

Last week I created a Flow with a condition to check if a field is blank. 

The advanced syntax is as such:

 

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

 

This was working for a second, but now it is returning always as True, no matter what. 

Can anyone help me? Has anyone built conditions on If Field is Blank??

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Flow Condition If Field is Blank

Can you try by adding the field i the left hand side of the condition and use the expression null on the right hand side.

View solution in original post

17 REPLIES 17
Super User
Super User

Re: Flow Condition If Field is Blank

Can you try by adding the field i the left hand side of the condition and use the expression null on the right hand side.

View solution in original post

SylvieLet17
Level 8

Re: Flow Condition If Field is Blank

That was so simple. Why are you the FIRST person to mention this option on the entire internet?!

 

Thank you!!

matthewnolan
Level: Powered On

Re: Flow Condition If Field is Blank

Can you explain more of the solution? What exactly was the final solution?

 

Thanks,

Matt

KSL
Level: Power Up

Re: Flow Condition If Field is Blank

This is what I'm trying to find too but cant seem to get it right. Can you publish the condition so we can see how you put it together please?

Super User
Super User

Re: Flow Condition If Field is Blank

what kind of field are you checking?

-KSL
Level: Power Up

Re: Flow Condition If Field is Blank

I am runinng a bit of a SQL sync. A custom SQL table gets the SharePoint List ID value to that we can quickly update the matching rows between the tables periodically. In this flow, I am checking for a value in the SQL List results (SPO ID field (datatype int)) if it's null then I haven't create the row in the SharePoint list yet, so I I will go create it and then update the SQL value with the new row ID. If it has a value, then it already exists and I want to update that row in the SPO list.  So the condition works when it's empty, but when it's not it fails because "The template language function empty expects its parameter to be and object, an array, or a string. The provided value is of type integer. Please see blah blah blah." So I need to change the data type or make it a string, that seems pretty hokey...I must be missing something.

Eric666
Level: Powered On

Re: Flow Condition If Field is Blank

Like proper grammar, double negatives are bad in Flow.  Do a check for null and if the answer is false then build your decisions down the No path in the condition.  This isn't an approval, saying No is not a bad thing.

David_Repka2
Level: Powered On

Re: Flow Condition If Field is Blank

Thank you. It works for me. 

"field name" is equal "null" (as expression)  

Highlighted
BrendanMurphy
Level: Powered On

Re: Flow Condition If Field is Blank

For visual learners, I believe this is what the recommendation is. 

Condition Check if Null.png

 

 

Super User
Super User

Re: Flow Condition If Field is Blank

Please check here or here for a solution.

"Enter your expression on the left side of the row. Then, select Equals to and enter true."

 

So what used to be:

 

Has now become:

If helpful, please mark with thumbs up.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Re: Flow Condition If Field is Blank

Have things changed since this last post because this doesn't work for me.

Here's my flow:

ASD.PNGasdf.PNG

I'm essentially trying to do the if field is blank trick. And it ain't working no matter how many tutorials and guides I've read.

 

Scenario:

My field is in a list in SP. It is blank. I want the flow to send an email if the field is blank and not to if it has something in it.

I have tried the dynamic content way and am now trying the expression way. I first tried:

(a) 'Field' is equal to 'Null' - didn't work

Then I tried the above pictures provided - it won't accept it as you can see from the second picture.

 

Please help. Hair pulling happening.

BrendanMurphy
Level: Powered On

Re: Flow Condition If Field is Blank

Did you try it the way I have it pictured with the List field in the left hand condition (not a formula) and the condition "null" on the right side?  

Re: Flow Condition If Field is Blank

Hi Brendan,

 

Yes have tried that but it's not working, as in it's giving me the 'I don't like 'null' error.

It's a Do Until with the left hand value populated by the list field (not a formula) a condition of 'is not equal to' and the right hand value with the expression 'null'

I've heard that a double negative doesn't work. I have no choice! I cannot put anything into the field by default.

Is there a way to create an expression which gives out a true or false or a yes or no which Flow can valuate on? IF so how?

Thanks

C

javierz
Level: Powered On

Re: Flow Condition If Field is Blank

thank you

 

works for me

javierz
Level: Powered On

Re: Flow Condition If Field is Blank

the answer of


Brendan Murphy


It works well

Jose_Azevedo
Level: Power Up

Re: Flow Condition If Field is Blank

I´m trying to make a flow that creates an item on a sharepoint list after a Form from Forms is submited, and on that form if a field is empty I wanted the flow to make onething but if it had something it had to do something else.

I tried using the Null expression on the condition (Field > Equal to > Null) and it only worked when the condition was false, in other words only when the field wasn't empty.

So I just didn't put the Null expression and left it empty (Field > Equal to > ) just to try, I never really thought it would work but to my surprise it worked like a charm.

tvd_nzi
Level: Powered On

Re: Flow Condition If Field is Blank

Welcome back to preview mode 😀

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 409 members 6,113 guests
Please welcome our newest community members: