Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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.

  • me95 Profile Picture
    109 on at
    Re: 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?

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

  • Verified answer
    Pstork1 Profile Picture
    66,829 Most Valuable Professional on at
    Re: 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?

    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
    Re: 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?

    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

     

  • Pstork1 Profile Picture
    66,829 Most Valuable Professional on at
    Re: 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?

    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
    Re: 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?

    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
    66,829 Most Valuable Professional on at
    Re: 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?

    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.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >