cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alf
New Member

Error filtering data using an array to generate a Table to be Emailed

Alright, I have one more for you all and then will leave it for the experts/devs on here. Still working on the alert email for the ambulance check. The current setup is after the items in the lists are created (and deleted, where applicable), the flow will fetch items from the list and was using a filter array to only grab submissions in the last 2 mins and output it to an HTML table to be attached to an email. I can get the flow to function without any errors after a few hours of research but it is not querying what I need it to. I don't know if this is a syntax issue or poor choice in flow layout expressions.

Alf_1-1626979420381.png

 

The expanded filter for time is:

addMinutes(utcNow(), -2, 'yyyy-MM-ddTHH:mm:ss')
but I am returning all items in my current list, not just the filtered ones.
Lastly, is there a way to better display the table so it is more readable than below?
Alf_2-1626980545604.png

Sorry for bugging the forum again but Power Automate is new to me and after working on this for the last 3 days has me wanting to bang my head off the table.

Thank you in advance for any assistance.

 

Alf

 
4 REPLIES 4
DamoBird365
Community Champion
Community Champion

Hi @Alf 

 

Your filter array action is based on the values from get items, yet you are filtering on a value from a form response "submission time"? If you have that value stored in your list, you need to select the dynamic value of that column to filter on, not that of the get form response action?

 

When it comes to formatting the HTML table, take a look at https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_intro

 

On the send email action, change the mode of the body input to HTML and include the header and style from the above link.

 

DamoBird365_1-1626981211426.png

 

 

This allows me to format my table with padding and borders.  Best to experiment until you get what you are looking for.

 

DamoBird365_0-1626981127547.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

 

@DamoBird365Thank you, that was a big help, I was able to correct the HTML output and the query but still running into getting duplicates on the response email. If it helps, there are 8 boxes across the form that are answer boxes that will generate an item if filled out. When the array is dumped into the HTML table, it is creating a duplicate line for each entry.

Alf_0-1626988774746.png

 

Alf_1-1626988805090.png

Alf_2-1626988851024.png

I assumed the filter query would concatenate the data into one line.

DamoBird365
Community Champion
Community Champion

Hi @Alf 

 

I think I need to see your whole flow.  I cannot understand why you are getting items from excel and a form submission.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

@DamoBird365 

 

Can I PM you?

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,200)