cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,179)