cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KroonOfficeSol 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
KroonOfficeSol 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
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.
KroonOfficeSol 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

KroonOfficeSol 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
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,291)