I want to send an email body , if there are no row counts for a chart.
If a filter/dataset returns 0 rows, send email.
Solved! Go to Solution.
Hi @ericren,
I would look at using a Count Records tool to get at least one row (it would just be the number zero if there are truly no records) which can then feed into the Email tool to send out an email!
You can customize the body further using a Formula tool or a Report Text tool, but without more info it's hard to know if that's what you are looking for!
-Alex
I have the following set.
Type | Value |
Blue | 4.23 |
Green | 2.23 |
If there are no values greater than 1, there are no rows in the filtered selection.
I'd like the following email output with the chart included.
Email output:
There are no values greater than 1
Type | Value |
Blue | 4.23 |
Green | 2.23 |
Hi @ericren,
The Count Records Tool will create a row no matter what - it will either be the number of rows or it will be 0. I attached an example based on the data you gave.
Let me know if you have any further questions!
-Alex
Thank you, this worked perfect.
How would I attach a 2nd dataset to the email output with same conditions in the first data set.
Attach dataset below to email if the original dataset in this thread returns 0 rows.
Color | Number |
Orange | 3 |
Purple | 2 |
Hi @ericren,
Fantastic! Can you accept that answer as a solution then when you get a chance?
I'm not sure I fully understand the second part - based on the information given and my assumptions, attached is what I am guessing. I converted the Body field into a reporting snippet via a Report Text tool, and I converted the 2nd dataset into a reporting snippet via a Table tool. They need to be put together on the same line so the Layout tool can work - I used an Append Field tool to do this but it'll depend on the data.
-Alex
Will the 2nd data set be read and sent even if there are rows from the first dataset's filtering results?
In the solution I built, yes!
How would you change it so that that 2nd dataset is only sent when the first data set filtered results in 0 rows?
I would do something like this: Solved: Conditional Email Send - Alteryx Community