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

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

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

29 REPLIES 29

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

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

 

Thank you!!

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

 

Thanks,

Matt

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?

what kind of field are you checking?

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.

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.

Anonymous
Not applicable

Thank you. It works for me. 

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

Anonymous
Not applicable

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

Condition Check if Null.png

 

 

AlanPs1
Resident Rockstar
Resident Rockstar

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!


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.

Anonymous
Not applicable

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?  

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

thank you

 

works for me

javierz
Advocate II
Advocate II

the answer of


Brendan Murphy


It works well

Jose_Azevedo
Frequent Visitor

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.

Welcome back to preview mode 😀

@Pieter_Veenstra Do you know if checking for a people field can be used with null?  Source is a sharepoint list but it is failing every time when I try to use the People on the left and the null expression on the right?  Thanks! 

Hi @Anonymous @SylvieLet17 @Jose_Azevedo @Jose_Azevedo ,i dont see any function like null in flow?how did you checked empty or null value in msflow?im trying to compare null and empty values  both after using powequery transofrm from sql.

Thanks in advance.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,618)