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

Notifications

Announcements

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

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:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard