Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 16

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

 
  • Alf Profile Picture
    16 on at
    Re: Error filtering data using an array to generate a Table to be Emailed

    @DamoBird365 

     

    Can I PM you?

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Error filtering data using an array to generate a Table to be Emailed

    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 😉

  • Alf Profile Picture
    16 on at
    Re: Error filtering data using an array to generate a Table to be Emailed

    @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 Profile Picture
    8,942 Microsoft Employee on at
    Re: Error filtering data using an array to generate a Table to be Emailed

    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 😉

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow