# Empty Table in Loop - Send alternative email

**URL:** <https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750>\
**Category:** KNIME Analytics Platform\
**Created:** [March 25, 2021, 12:11pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750 "2021-03-25T12:11:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![knightyboy](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@knightyboy](https://forum.knime.com/u/knightyboy)\
**Post date:** [March 25, 2021, 12:11pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/1 "2021-03-25T12:11:20Z")

</div>

I can find a bunch of similar topics covered but for the life of me can’t quite find an answer to this specific issue, apologies if I’m just being stupid.

I have a dataset run once a week checking for errors in processing on one of our systems. Each set of relevant errors will need to be emailed to the person responsible for them. If there are no errors found, I want to email the people who don’t have any with a separate email, so they at least know that we’ve checked for them, not that our checks are broken.

One table of data (‘Dummy Data’) and one table of email address that relate to a name field in the dummy data (‘Email Addresses’)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/9/d/9d995e528bf1f518c8bb2fc5be22bcb7f630bc32.png)

I’ve successfully set up the loop for filtering the data, creating the files (with variable names), and sending out an email to the relevant person, however I can’t seem to quite understand how to use the empty table switch for when there is no data related to that person/email address so that I can create the other email.

I know that I shouldn’t have another Loop End, but I’ve tried End If and connecting it all together and I just can’t quite get it to work.

Appreciate your wise guidance as always.

Many thanks

---

<div class="post-metadata">

**Author:** ![Andrew\_Steel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/andrew_steel/32/4472_2.png) [@Andrew\_Steel](https://forum.knime.com/u/Andrew_Steel)\
**Post date:** [March 25, 2021, 12:57pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/2 "2021-03-25T12:57:09Z")

</div>

Hi @knightyboy,

you could do it this way:

 ![Bildschirmfoto von 2021-03-25 13-55-05](https://forum-cdn.knime.com/uploads/default/original/3X/4/6/465e792ccf557210e7b276a58b6bb44b445603c3.png)

Best regards  
Andrew

---

<div class="post-metadata">

**Author:** ![knightyboy](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@knightyboy](https://forum.knime.com/u/knightyboy)\
**Post date:** [March 25, 2021, 1:09pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/3 "2021-03-25T13:09:34Z")

</div>

Not sure that works unfortunately.

I have one table of all the email addresses and one of the data. The data doesn’t necessarily have all the names that appear in the email addresses file, so not sure how that ‘Reference Row Splitter’ is helping things.

Additionally, in that example, the table would never be empty going into the ‘Empty Table Switch’ because it’s not had a variable filter applied to it yet.

---

<div class="post-metadata">

**Author:** ![Andrew\_Steel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/andrew_steel/32/4472_2.png) [@Andrew\_Steel](https://forum.knime.com/u/Andrew_Steel)\
**Post date:** [March 26, 2021, 7:56pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/4 "2021-03-26T19:56:43Z")

</div>

Hi @knightyboy,

Oh yeah, sorry about that. I have read your request again. Here is another attempt to solve your problem.

![Bildschirmfoto von 2021-03-26 20-55-30](https://forum-cdn.knime.com/uploads/default/original/3X/f/f/ff48d33518fbabc0b4346b0dd2582e83c3644671.png)

I hope it helps.

Best Regards  
Andrew  
[EmailSplitter.knwf](https://forum.knime.com/uploads/short-url/g6eXtMVzNx14JEeZG9CaSvTVW6.knwf) (17.7 KB)

---

<div class="post-metadata">

**Author:** ![knightyboy](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@knightyboy](https://forum.knime.com/u/knightyboy)\
**Post date:** [March 29, 2021, 3:55pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/5 "2021-03-29T15:55:31Z")

</div>

Ahhh, that’s actually such a simple workaround, thank you!!!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 5, 2021, 3:55pm UTC](https://forum.knime.com/t/empty-table-in-loop-send-alternative-email/31750/6 "2021-04-05T15:55:49Z")

</div>

Closed on April 5, 2021, 3:55pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
