cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KroonOfficeSol
Level 10

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
Level 10

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 Team
Community Support Team

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
Level 10

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
Level 10

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 356 members 4,856 guests
Please welcome our newest community members: