cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Steveo1
Level: Powered On

How to check if value is null with new condition parameters

Before Flow was updated to allow multiple condition parameters, I could put something like the following inside a condition:

@(not(empty(items('Apply_to_each')?['PHONE'])))

How do I do this in the current paradigm?

Phone is not empty.pngPhone is not empty.

1 ACCEPTED SOLUTION

Accepted Solutions
Steveo1
Level: Powered On

Re: How to check if value is null with new condition parameters


@RobElliott wrote:

In the condition try adding an expression of PHONE is not equal to null. For the right hand box, click in it and go over to the right, select the Expression tab and type null and then select it to put it in the box.

Rob
Los Gallardos


Thanks for your input, Rob.  I should have given a bit more context.  My data source is a group of Visual Foxpro .dbf tables which I'm accessing through a SQL linked server.  In the data, these string values return from the SQL connector as empty strings rather than null.

 

Edit:  I've figured out how to do what I originally intended.  Using length is effective, but to me empty() is a bit cleaner and should also cover an unforseen null condition.  

empty(items('ForEachRow')?['CELLPHONE'])

Empty = false.png

I've decided to handle this by checking if the length of the string is greater than zero. That is working well, but I miss the advanced mode under the conditions.

length(items('ForEachRow')?['PHONE'])

If Phone Exists.png

 

 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to check if value is null with new condition parameters

In the condition try adding an expression of PHONE is not equal to null. For the right hand box, click in it and go over to the right, select the Expression tab and type null and then select it to put it in the box.

Rob
Los Gallardos

Steveo1
Level: Powered On

Re: How to check if value is null with new condition parameters


@RobElliott wrote:

In the condition try adding an expression of PHONE is not equal to null. For the right hand box, click in it and go over to the right, select the Expression tab and type null and then select it to put it in the box.

Rob
Los Gallardos


Thanks for your input, Rob.  I should have given a bit more context.  My data source is a group of Visual Foxpro .dbf tables which I'm accessing through a SQL linked server.  In the data, these string values return from the SQL connector as empty strings rather than null.

 

Edit:  I've figured out how to do what I originally intended.  Using length is effective, but to me empty() is a bit cleaner and should also cover an unforseen null condition.  

empty(items('ForEachRow')?['CELLPHONE'])

Empty = false.png

I've decided to handle this by checking if the length of the string is greater than zero. That is working well, but I miss the advanced mode under the conditions.

length(items('ForEachRow')?['PHONE'])

If Phone Exists.png

 

 

View solution in original post

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!

Users Online
Currently online: 384 members 6,515 guests
Please welcome our newest community members: