cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucas_Goncalves
Advocate II
Advocate II

Filter excel file, create a html table and send it by email

Hello, good morning from Brazil 🙂

 

I´m suffering on the last 3 weeks on this flow demmand. I checked google, Reddit, Medium, even here... can´t solve... I can´t sleep, can´t eat, cant be happy.... (Ok, Im joking...)

 

What I´m trying to do:

Trigger: When an item is created in a sharepoint list ( This list has a form where I will imput vendor code, say, 12345)(OK!)

7.png

 

2itemcreated.png

3getittems.png

 

1) List rows present in a table (Properly formated as a table) that has been saved on Sharepoint (file name is FBL1N.xlsx)(OK!)

 

2) Filter this excel with the trigger information (Vendor colum = form imput)(not OK!)

4list.png

3) Create an html table(OK!)

5create.png

 

 

 

4) Style Html table (OK!)

 

[replace(body('Create_HTML_table'), '<table>', '<table border="3" bgcolor="ffffff">')]

 

 

5) Send e-mail with the Styled HTML on it (OK!)

 

 

6styling.png

HTML form on email.png

 

My actual flow:

 

1Overview.png

 

 

What I´m stuck:

 

I cant create the filtered html table. I mean, the e-mail that has been sent on the above flow, is not filtered with the result from the trigger form information.

 

On step 2 (List row in a table) I know that there are a "Filter Query". But when I add the form information, it immediately changes to an "apply to each" and then I cant create html table anymore.

 

 

Are you there, Obi-wan Kenobi? Can you help me? What I am doing wrong? How can I escape the dark side and go to the correct Jedi Flow Pathway?

 

 

28 REPLIES 28

@Lucas_Goncalves 

That's fascinating! And frustrating also!

Where do you have your excel hosted? OneDrive? Sharepoint?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes  Sharepoint 🙂

THanx for the feedback!

It's fascinating! So it looks like depending on the ¿Office 365 license? the pagination limit varies...

LEt's see if I understood the current situation: with the DoUntil approach, you managed to store in a variable called TotalRows the 17,728 rows from your Excel table.

The problem is now with Filter Array, right?

i would do he following:

1.-let's start with the simple filter you managed to run successfully; please select 'Edit in advanced mode' and share the expression displayed

2.-now, let's modify a little bit the simple filter. Get back to 'edit in simple mode'. On the left side, remove 'Title' and add 'Document type' from dynamic content menu. On the right side, type CA. Now, select 'Edit in advanced mode' and share the expression displayed

 

I believe we are close to a happy ending!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes  here you are:

Filtering with title = Vendor code :

@equals(triggerOutputs()?['body/Title'], item()?['Vendor'])

 

Filtering with Document Type = CA: 

@equals(item()?['Document Type'], 'CA')

Hi!

So if we combine both condition rules, we obtain the following expression.

 

@And(equals(triggerOutputs()?['body/Title'], item()?['Vendor']),equals(item()?['Document Type'], 'CA'))

 

You need to click on edit in advanced mode and paste it there.

Give it a try and let us know your progress!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@Lucas_Goncalves 

Any progress on your challenge? Did you finally succeed?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hello @efialttes  had to focus on daily demand here.

 

Will check and test again on the following days. Hope you´re here to still support me! 

@Lucas_Goncalves 

Any progress on your challenge? Did you finally succeed?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi! Sorry for the delay! I´m on a Go live here and an error appeared that is making my mind blow! (I opened an support here: https://powerusers.microsoft.com/t5/Building-Flows/Update-only-newly-added-row-on-excel-into-an-shar...)

Will return to this issue after I solve the above one´s (more urgent!)!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,504)