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

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

@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

7 REPLIES 7
rsaikrishna
Dual Super User
Dual Super User

@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.

TesDA
Responsive Resident
Responsive Resident

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.

@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

 

 

@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

@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!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





This worked perfectly !

k8bobate
New Member

I'm trying to do something similar, but pull each non-empty column into an email. The flow first has the Insert Row, then Get a Row, and now I only want to Get a Column if it is not empty. Do I need to create this conditional expression for each and every column?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,337)