Hello,
I wrote a flow that works very nicely except when the SQL query returns nothing. The attachment named "Flow View Run Mode - Failed due to No Data" illustrates the original issue. PowerApps would receive a 502 Error stating it was a bad connection.
I added a condition to the Flow in order to differentiate if the SQL Query returned a table or not. If it did, send the query results back to PowerApps, otherwise respond to PowerApps with a 400 error. The "Flow Edit Mode Screenshot" attachment shows the flow condition.
This change worked, but I don't like it because it relies on the IfError function in PowerApps which is an experimental function that may go away. It also doesn't explicitly catch the 400 error.
I'd like to find a way to deal with this in Flow, but I can't figure it out. Can I return a blank query with the same schema as if there was data?
User | Count |
---|---|
194 | |
123 | |
87 | |
48 | |
40 |
User | Count |
---|---|
276 | |
165 | |
139 | |
80 | |
76 |