cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Filter rows in Excel Online and send html table

Hi All,

 

I have the following flow:

 

IPGeorgiev_0-1604045537596.pngIPGeorgiev_1-1604045554427.png

 

So the first list rows in a table (List rows present in a table 2) uses a table which has just 1 column and each row is the E-Mail address of a specific manager.

 

Then we initialize a variable - htmlTable - Array 

 

Then we want FOR EACH  Manager E-Mail Address to filter another table(Table3) (which has a column showing the managers E-mail address) and send EACH Manager a data only for the rows which he is responsible for in Table 3.

 

Therefore we use a second apply to each (Apply to each 4):

 

IPGeorgiev_2-1604045730671.png

 

Where the condition here plays the role of a filter - where the Managers E-Mail from the List rows present in a table 2 should match the Managers E-Mail in List rows present in a table 3

 

Then we use Append to array variable to write in the initilized variable eaarlier.

 

Then we create the HTML Table and send the E-Mail.

 

Everything works great - however the issue is!!

 

That once the apply to each 3 is applied for a first time the results matches the expectation

 

So this is what happens:

(In List rows present in a table 2 we have 3 rows with 3 different E-Mail of Managers)

 

1. Email number 1 - Has data for Manager 1 in List rows present in a table 2 - ALL CORRECT

2. Email Number 2 - Takes all the content from Email number 1 and adds the data for Manager 2

3. Email Number 3 - Takes all the data from Email Number 1 & Email Number 2 and adds data for Manager 3

 

So in my opinion we can solve this if we add a step after "Send an Email" which somehow resets the HTML table as for each run it just makes the HMTL table bigger and bigger and this results in the above outcome, but if it can be made to always write to a blank html table I will get the result.

 

Any genius around here who has any idea how we might solve this? I am out of ideas.

 

Many, many thanks in advance!


Best regards,
Ivan

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @IPGeorgiev,

 

Please add the set variable action to set the htmlTable to null, after the Apply to each 4 action and try it again:

Screenshot 2020-10-31 143307.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @IPGeorgiev,

 

Please add the set variable action to set the htmlTable to null, after the Apply to each 4 action and try it again:

Screenshot 2020-10-31 143307.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,631)