Announcements
I create a Flow to run a query against Azure MS SQL table in the form of Response. If I don't add a condition to check for empty result, the Flow fails with "error parsing". So I added a condition to check and only proceed to the Response if there are rows returned. For the condition of no result, I simply do nothing. This results in the "bad gateway" error because the receiving end doesn't get any response back. I'm looking for a way to handle the no result in a way that the receiving end gets an empty list.
Hi,
In your schema, allow for null values like this:
"YourKey": {"type": ["number","null"]}
Thanks but where do I enter that?
In your response body JSON schema
Changing "type": ["number","null"] results in Powerapps complains of invalid json syntax. After some research I was able to get rid off the Condition and handle the empty issue in the Response body. Basically if the result is empty, hardcode a json string with empty items.
@{if(empty(body('Execute_a_SQL_query_(V2)')?['resultsets']), json('{"type": "array","items": {}}'), body('Execute_a_SQL_query_(V2)')['ResultSets']['Table1'])}
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 409 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 252 Most Valuable Professional