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 / Cancel flow if SQL DB ...
Power Automate
Unanswered

Cancel flow if SQL DB unreachable?

(0) ShareShare
ReportReport
Posted on by 21

I have a flow that triggers on a pretty short timer. It is set to cancel if the SQL query returns no results, but if the server goes down the flow keeps running and returns a null value instead and causes my flow to fail.

 

Does anyone have a better technique than what I've come up with that could handle both Nulls and 0 len?

 

flow1.jpgflow2.jpg

Categories:
  • PrasadAthalye Profile Picture
    on at

    You can just add a check to see if its not null. Add this as first condition. Make sure to use Null as an expression by typing it in Expression section. Below is an example. If you are writing positive condition for error then use equal to.

     

    PrasadAthalye_0-1625232320694.png

     

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

    You could add a Coalesce() function inside the length() to provide an empty string or array if the returned value is null.

  • funkyman50 Profile Picture
    21 on at

    Thanks to both of you! I'll try the coalesce() add-in first because that'll be easier to plug in.

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