cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Apply to Each -> Condition against Null not finding emtpty columns

I have the following flow:

 

List rows present in a table - Excel Business

Apply to Each

   Condition

      If Emp ID is Empty don't do anything

      If Emp ID is not Empty post to SQL

 

I cant get the condition to work correctly, each time it seems to be posting the blank rows to SQL from excel.

 

I have tried:

coalesce(items('Apply_to_each')?['Employee ID'], 'NULL') is equal to NULL
items('Apply_to_each')?['Employee ID'] is equal to Null
I tried both typing in Null to the condition and using null as an expression
items('Apply_to_each')?['Employee ID'] is equal to empty(items('Apply_to_each')?['Employee ID'])
 
in all three I still get all of the empty rows along with all of the Employee IDs.
 
What am I doing wrong?
 
Flow loop condition nulls.jpg
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Apply to Each -> Condition against Null not finding emtpty columns

@TesDA 

 

Ignore my previous reply.

 

Try the following. It WORKED for me.

 

Left condition: empty(items('Apply_to_each')?['Product'])  <--- You can replace Product with your column
Right Condition:  bool('True')

 

8.JPG

 

Regards

Krishna Rachakonda

If my reply helped you solving the issue, please mark the reply as Accepted Solution.

 

View solution in original post

5 REPLIES 5
Highlighted
Solution Sage
Solution Sage

Re: Apply to Each -> Condition against Null not finding emtpty columns

@TesDA 

 

In the place of NULL, you use use null from expression.

 

7.JPG

 

Please give a try and let me know if you have any questions.

 

Regards

Krishna Rachakonda

If my reply helped you solving the issue, please mark the reply as Accepted Solution.

Highlighted
Resolver I
Resolver I

Re: Apply to Each -> Condition against Null not finding emtpty columns

I still get blanks when I use null as an expression.

 

I think this has something to do with the fact that you cant dynamically update the size of the excel table, so you have to include blank rows to account for future additions. Essentially in the List Rows Present in a Table I wasn't able to filter out nulls.

Highlighted
Solution Sage
Solution Sage

Re: Apply to Each -> Condition against Null not finding emtpty columns

@TesDA 

 

Excel table must be defined before it loads into the flow. Table size cannot be changed dynamically.

 

BTW, can you chance your expression from

coalesce(items('Apply_to_each')?['Employee ID'], 'NULL') to  items('Apply_to_each')?['Employee ID']

 

Please give a try and let me know how it works.

 

Regards

Krishna

 

 

Highlighted
Solution Sage
Solution Sage

Re: Apply to Each -> Condition against Null not finding emtpty columns

@TesDA 

 

Ignore my previous reply.

 

Try the following. It WORKED for me.

 

Left condition: empty(items('Apply_to_each')?['Product'])  <--- You can replace Product with your column
Right Condition:  bool('True')

 

8.JPG

 

Regards

Krishna Rachakonda

If my reply helped you solving the issue, please mark the reply as Accepted Solution.

 

View solution in original post

Highlighted
Super User
Super User

Re: Apply to Each -> Condition against Null not finding emtpty columns

@rsaikrishna  is correct!

the right side can also be the expression: true





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

If you like my post please hit the Thumbs Up ?


Proud to be a Flownaut!





Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (8,136)