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 / Add Condition - Null S...
Power Automate
Answered

Add Condition - Null SQL Query Results

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building condition where if my SQL Query Results are blank then I want it to post a Message to Microsoft teams. If the query is not null then it will create a few files to be dropped to an FTP and a Sharepoint site. When the Query Is empty I need a message posted to Microsoft Teams. When I input a query that produces blank results. I get a failure in the flow. Can anyone shed some light on how I can best do thisflow failure 1.JPGflow Success 1.JPGflow failure 2.JPGflow failure 3.JPG

Categories:
  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you provide detailed configuration of your Table?

    I noticed that although you are input a query that produces blank results, the output of Query Results still contains Values, so the result of Condition is True.

    flow failure 2.JPG

    But because there is no matching value to create CSV table, it leads to such an error.

    I think that in your Condition, you may have to specify which fields have no query results, so that it could be more accurate.

    Please try to specify the judgment in the Condition to the column level. For example, if the column xxx query results are empty, the result will be False.

     

    Best Regards,

    Barry

  • GabrielStJohn Profile Picture
    Microsoft Employee on at

    Hey, @Anonymous!

    Thank you for posting on the Flow Community Forum! It appears as though @v-bacao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • Grant54 Profile Picture
    2 on at

    Can you explain how to "specify the judgment in the Condition to the column level. For example, if the column xxx query results are empty, the result will be False."

     

    I have a query that produces no results like this example, but I can't figure out how to check whether the column "title" is empty.  There is no option in the condition to check whether a column of the result set is empty.  I am only given the option to use as an input to the condition "ResultSets" or "Query Results".  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard