cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

SQL Execute Stored Procedure - Check if table1 exist

I have a problem with the sql execute stored procedure element in flow, which doesn't return the output parameters and returncode.

 

The issue occurs only when connecting to an on premise sql server through the data gateway and not when using a sql server in Azure.

 

The returned data with Azure

 

{
  "OutputParameters": {
    "outputDec": 880,
    "OutputInt": 1,
    "OutputStr": "SO71774"
  },
  "ReturnCode": 1,
  "ResultSets": {
    "Table1": [{}]

 

The returned dataset with the Data Gateway

{
  "OutputParameters": {},
  "ResultSets": {
    "Table1": [{}]
    

The main issue is that I need to use a condition to determine if 

"Table1": [{}]

 exist in my resultsets. I use a respons request to return the results to PowerApps and if Table1 does not exists my flow (and PowerApp) break. In Azure I can do a Return Select Count (*) and use ReturnCode > 0 in my condition and everything runs fine, but in the case off the data gateway this is not possible. 

 

My question:

Is there a workaround in which I can check if the ResultSets contain the Table1? I this way I can base my condition on Table1 to exists or not.

 

Is there somebody how can help me to find the syntax to check if table1 exist in the condition?

 

btw: I also post a message in the ' find a bug'  part off the forum, see https://powerusers.microsoft.com/t5/I-Found-A-Bug/SQL-Execute-Stored-Procedure-Data-Gateway-returns-... But because this issue is breaking my PowerApp I can't wait on a fix. That's why I want to explore if there is a workaround.

 

Greating Paul

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Execute Stored Procedure - Check if table1 exist

I found a solution to handle this issue. See the solution in the other Threat I posted.

SQL Execute Stored Procedure - Data Gateway - returns no parameters and returncode.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: SQL Execute Stored Procedure - Check if table1 exist

Hi @KroonOfficeSol,

 

I have seen a similar issue on this thread, please check it at here:

https://powerusers.microsoft.com/t5/Building-Flows/Checking-for-empty-stored-procedure-result/td-p/6...

 

Hope it would be a reference for you.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Execute Stored Procedure - Check if table1 exist

I found a solution to handle this issue. See the solution in the other Threat I posted.

SQL Execute Stored Procedure - Data Gateway - returns no parameters and returncode.

View solution in original post

Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Execute Stored Procedure - Check if table1 exist

@v-yamao-msft

 

Hi Mabel,

 

Thanks for your respons. A few days ago I find a answer to my question by myself and it similar to the answer you're refering to. For PowerApps this was not a totally working solutions, this because my formula in PowerApps exspected a result and not given one resulted in an error in the app. So I came up with a workaround to handle the empty respons issue. See my other post for a link if you like to see what I did.

 

Again thanks for your input.

 

Greatings Paul

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (3,613)