I'm aware this question has been asked several times, but it seems the functionality of this item has changed recently and none of the solutions people have suggested are working for me.
I have a Flow which is triggered through PowerApps, taking several input parameters (provided by PowerApps) to verify whether 1 or more records matching the parameters already exist in a SQL table.
Execute a SQL query (V2) action:
Execute a SQL query (V2) response:
The issue is that there's no way for me to access the "count" variable in this response. I have tried the "Compose" and "Parse JSON" actions, but neither allow me to input the SQL response body anywhere.
Glad its sorted
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Thanks for the reply.
I tried Option 1, as follows:
which creates the "Schema" in the Parse JSON action. However, for the "Content" I'm not able to put any Dynamic Content from the SQL query action (only PowerApps items show up):
I also tried Option 2 which does work, so I got everything work the way it should now. Thanks.
Hi @alex93jansen ,
Because Table1 is a JSON array, it will try to loop the JSON objects within.
I will provide two options:
Option 1
Add a Parse JSON underneath and copy the above Body into the sample JSON payload
Add a Compose action underneath and go to expressions and paste this in (you may need to tweak Parse_JSON depending on the name of the action in the previous step). What this does is to return the first JSON object in the index and count field.
When you run it, it should return the count
Option 2
You could also try the Get rows (v2) action which will still allow you to apply filters. You can then get the length of the value to get the row count.
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
ankit_singhal
5
Super User 2025 Season 1
Michael E. Gernaey
4
Super User 2025 Season 1
David_MA
2
Super User 2025 Season 1