cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_NT_
Microsoft
Microsoft

Trying to send emails for only rows with data in table

Goal of my flow: Daily process - Copy data from one file to another and then send emails to people listed in the excel file. New file is provided daily.

Current Issue: Flow gets stuck on condition (at Step 6 listed below) where I want the flow to only send emails to rows with data (not blank rows).

 

Flow Steps

1. Set a variable for later use: "CurrentRow" set to integer 2.

2. Take new excel file and convert raw data into table.

3. List rows in table

4. Copy data to excel template with 'Update a row' action (this uses the "CurrentRow" variable)

5. List rows of new template table

6. For each row that is not blank, send an email to the EmailAddress field.

 

I must make my initial table much larger than needed so it will capture the daily list I get of people to email (list is always less than 50 so my table is set to go to row 100 to be safe). The flow seems to get stuck with the extra empty rows.

 

How do I get my flow to send emails to only rows with data?

 

Flow image:

 

_NT__0-1611268394879.png

 

Condition image:

 

_NT__1-1611268447414.png

 

4 REPLIES 4
Paulie78
Super User
Super User

You don't need the condition, you have to options:

  1. You can add a filter array step after your list rows present in a table OR
  2. You can perform an oData query on your list rows present action to exclude the empty results.

In either case your resulting array will not contain any blanks, so you will be able to proceed to your each loop without the need for a condition.

Thanks for the reply and I like the sound of option 2 (oData query). I tried to use SKUID ne null but it tells me "Expression "SKUID ne null" is not supported." 

Do you know what my oData query would need to be?

_NT__0-1611273993453.png

 

 

Paulie78
Super User
Super User

Try:

SKUID ne ''

Using SKUID ne ' ' got me passed the step but in the next part of the process, it got stuck trying to use the result. This was the resulting error:

_NT__0-1611784821462.png

 

This is the apply to each 4 in edit mode:

_NT__1-1611785295617.png

 

Do you know why it's now stuck and how to get around this?

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,992)