cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Handling empty SQL results in PowerApps/Power Automate

Hi guys,

I am using SQL connector to display sql query result in my Power Apps. I followed instruction here.

SQL result will be stored in collection.

Currently there is a problem, when sql query delivers empty result (e.g. no available rooms for specific time period).

After execution of workflow I see an error message:

 

 

MyFlow.Run failed: { "error": { "code": 502, "source": "europe-002.azure-apim.net", "clientRequestId": "d9854bae-1b83-4923-b4d7-aef88dc19ffd", "message": "BadGateway", "innerError": { "error": { "code": "NoResponse", "message": "The server did not received a response from an upstream server. Request tracking id '08586538655802376888134589145CU140'." } } } }

 

 

I didn't handle the empty sql result in MyFlow.

kirill717_0-1595282211825.png

I think, that I should add a condition like below, but I don't know how to define response for empty sql results:

kirill717_2-1595282569959.png

 

Do you have any idea, what should I add in my workflow/PowerApp to avoid this error?

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Handling empty SQL results in PowerApps/Power Automate

You should add run after to handle the error in case there are no results or it fails https://link.medium.com/jM81t8aSh8

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,393)