web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Posted this Q yesterda...
Power Automate
Answered

Posted this Q yesterday - but I think I overcomplicated it so trying this again: my flow is sending empty tables to people who don't have any SP list items that meet the criteria I've filtered for. How do I avoid this?

(0) ShareShare
ReportReport
Posted on by 109

For example, one item I'm filtering for is anywhere where the "Feedback Status" column is equal to "Completion Email Sent & Meeting Suggested" only if the "Created" date is greater than 14 days at the time the flow runs.

 

However, after running the flow it appears that if a user has a SP list entry with "Feedback Status" = "Completion Email Sent & Meeting Suggested" that's less than 14 days old that the time the flow runs, and they also don't have any other SP list items that meet the criteria I'm filtering for, they get an empty table.

 

How can I avoid that? Below is my filter query + the empty table users got.

 

me95_0-1690567836675.png

 

 

me95_1-1690567957380.png

 

It seems if they have SP list items in the above FeedbackStatuses but they don't meet the date requirements I'm filtering for, they get an empty table. It should be noted that users who do NOT have SP list items in the above FeedbackStatuses did NOT get an empty table. They simply did not get an email, which is great.

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,197 Most Valuable Professional on at

    Add a Condition before you send the email and check the length() of the array for the records found. If its zero then there are no records and you shouldn't send the email.

  • me95 Profile Picture
    109 on at

    Hi @Pstork1 thanks for the input. So I would add the length action before the 'Send an Email' action? That said, I imagine there will always be records found. I'm just trying to avoid it sending empty tables to those users who don't have any records. For example, when I triggered the flow yesterday, several people got tables with the correct info, I'm just trying to avoid sending empty tables to those users who don't have any list items which match the criteria i'm filtering for

     

    me95_0-1690568610601.png

     

  • Pstork1 Profile Picture
    69,197 Most Valuable Professional on at

    Yes you would add the Condition there and then place the Send an Email in the Yes side of the Condition if the Condition is length(tablearray) > 0. That way the Email is only sent if you have data in the table.

  • me95 Profile Picture
    109 on at

    Thank you @Pstork1 appreciate the help here. What am I supposed to put in the parentheses of my length expression? I tried some of the ouputs but it keeps saying my expression is invalid. I also tried just writing tablearray like you had, and that didn't work either...sorry, newbie here.

     

    me95_0-1690575196404.png

     

  • Verified answer
    Pstork1 Profile Picture
    69,197 Most Valuable Professional on at

    IN the left side of the condition just add the length() function and insert the output that holds the array of the table you are going to send.  Don't put the >0 there.  The greater than is in the center operations dropdown and 0 goes in the right side of the condition.

  • me95 Profile Picture
    109 on at

    I'm an idiot, this worked, thank you! @Pstork1 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard