Hi @Gao, it looks like Table1 does not exist. The previous step did not output any data which is why Response had an error. You'll need to receive data for this to work. And even if you do not receive data, you still need to have the same JSON structure in your data.
@Mr-Dang-MSFTThanks for the reply, I'm sorry for not being too descriptive. Yes I am aware that table1 doesn't exist. Question is how do you catch the error from flow into powerapps by not outputting the json error string into powerapps. more in terms of explicitly displaying a user friendly response back stating for example "you have no records".
@KroonOfficeSol may have an answer here as well.
In PowerApps, the blank response will result in a default error that says something to the effect that there was no response.
The answer is fairly simple, you just have to insure there is a record returned from your stored procedure. You can do this by adding an UNION ALL SELECT statement to your Select query, returning a row with only NULLS. Null should be matching the columns in the select statement.
Basically Flow gets at least one record and so has the schema and the result to return, so the error won't occur.
Then in PowerApps you remove the last row with this formula.
Leaving an empty well structured collection, when you don't have records returned.
Made a video on this topic, see Learn PowerApps | 22 | PowerApps - Flow - SQL Server - import Dynamic Data
Btw: You just have to use three components: PowerApps, SQL, Request.
A nice trick for when the ResultSet.Table1 is not in your dynamic options for the request is to:
Hope this helps,
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand