Event's Filter Condition in/use another Event's Filter Condition Results

Hi All,

Could you please help me below with below Automation Event set up, I’m trying to but can not figure out how to put loop in loop in Automation

For example, we have a table A

Factory Supplier Item
Factory 1 Supplier 1 Item 1
Factory 2 Supplier 1 Item 2
Factory 3 Supplier 1 Item 3
Factory 1 Supplier 2 Item 4
Factory 2 Supplier 2 Item 5
Factory 1 Supplier 3 Item 6
Factory 2 Supplier 3 Item 7
Factory 3 Supplier 3 Item 8

Table A has 3 column : Factory, Supplier, Item

I want to make an Automation, Scheduled Event to send email to Supplier to request the Item

Supplier email (to) is certain, But also in the email I want to CC Factory’s emails

Each Factory has different emails (people)

So I want to things run as :

  • send email to Supplier 1 and CC Factory 1’s emails, mentioning item 1

  • send email to Supplier 1 and CC Factory 2’s emails, mentioning item 2

  • send email to Supplier 1 and CC Factory 3’s emails, mentioning item 3

  • send email to Supplier 2 and CC Factory 1’s emails, mentioning item 4

  • send email to Supplier 2 and CC Factory 2’s emails, mentioning item 5

… so on

Thank you

Sounds like you want to send a separate email per row.

Do you have this turned on?

1 Like

Hi Tee,

Sr not fully indicate the situation

Factory Supplier Item
Factory 1 Supplier 1 Item 1
Factory 1 Supplier 1 Item 2
Factory 1 Supplier 1 Item 3
Factory 2 Supplier 1 Item 4

For example if the table is like above

I want to send 2 emails

  • send email to Supplier 1 and CC Factory 1, to request Item 1,2,3

  • send email to Supplier 1 and CC Factory 2, to request item 4

and so on if the table grows…

1 Like

In that case the only way I can think of is to create a table listing unique combinations of Factory and Supplier and create a bot on this.

How is your original table created? Could you not make it into a parent - child configuration? or make Item into an ENUMLIST rather than having separate rows per Item?

2 Likes

In that case the only way I can think of is to create a table listing unique combinations of Factory and Supplier and create a bot on this - → Could you please give me some more detail or instruction …?

How is your original table created? Could you not make it into a parent - child configuration? or make Item into an ENUMLIST rather than having separate rows per Item? → Yes I keep them in 1 table as below for easy view

Let’s call a table with unique combinations of Customer and Factory Table A and your table Table B. This way Table B logically becomes a child table of Table A with the Customer/Factory combination as the referential information.

Create a scheduled bot on Table A and set ForEachRowInTable and then you can write a template to list related rows in Table B (list of items) to each row in Table A (unique Customer Factory combination).

A template example:

<<[Customer].[dereference as required] >>

<<[Factory].[dereference as required]>>

<<[etc.]>>

<<Start: SELECT(Table B[id], AND([Factory] = [_THISROW].[Factory], [Customer] = [_THISROW].[Customer]))>>

<<[item]>>

<>

2 Likes

Hi Tee,

Let’s call a table with unique combinations of Customer and Factory Table A

→ What do you mean by this ? Do I need to create another Table A also the same data of table B?

Sorry If I don’t get you

You have to be able to loop through a list of unique customer/factory combinations somehow to send one email per that combination.

My proposal is to create a new table I arbitrarily named Table A. If you already have a table/list that you can loop thru, then you can use that. Your customer/factory/item table cannot be directly looped thru for your purpose. From looking at the column names, you are creating it from requests of some kind. Again, if you can create a table not in the current format but a parent-child or items with ENUM, then it can be used.

2 Likes