cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnmarlowe
Level: Powered On

Return Multiple Arrays From Stored Procedure through Flow

I have a Flow that executes a SQL Stored Procedure on an On Prem Database via a Gateway. The Stored Procedure returns 2 tables and I've checked that when I execute this in Management Studio, both tables are returned. When I execute this through flow and examine the output body only the first table is shown to be returned in the JSON. Does anyone have experience with returning multiple tables from a SQL stored procedure into Flow? Many thanks Andrew

1 ACCEPTED SOLUTION

Accepted Solutions
SynergyM
Level: Powered On

Re: Return Multiple Arrays From Stored Procedure through Flow

I found documentation on this limitation:

https://docs.microsoft.com/en-us/connectors/sql/ 

 

When invoking a Stored Procedure on an on-premises SQL server, we have the following limitations:

  • Output values for OUTPUT parameters are not returned. You can still specify input values for OUTPUT parameters.
  • Return value is not available.
  • Only the first result set is returned.
  • Dynamics schemas are not supported for result sets.
3 REPLIES 3
Highlighted
SynergyM
Level: Powered On

Re: Return Multiple Arrays From Stored Procedure through Flow

I'm trying to do this same thing as you and getting the same results.  I'm trying to return about 15 queries and 30 output parameters, but only the first query is returned.

 

I'm going off of this article: https://baizini-it.com/blog/index.php/2018/05/10/powerapps-concurrently-returning-variables-and-mult...

 

It sounds like the person in the article is using Azure SQL, so I'm curious if this is a limitation of the On Prem Gateway?

 

SynergyM
Level: Powered On

Re: Return Multiple Arrays From Stored Procedure through Flow

I found documentation on this limitation:

https://docs.microsoft.com/en-us/connectors/sql/ 

 

When invoking a Stored Procedure on an on-premises SQL server, we have the following limitations:

  • Output values for OUTPUT parameters are not returned. You can still specify input values for OUTPUT parameters.
  • Return value is not available.
  • Only the first result set is returned.
  • Dynamics schemas are not supported for result sets.
johnmarlowe
Level: Powered On

Re: Return Multiple Arrays From Stored Procedure through Flow

It had crossed my mind whether the On Prem option had that limitation. Dissapointed, however I was only looking to return one more data set, and not as many as you so I think my dissapointment is probably not as great as yours! at the moment, I'm doing a refresh and collect call to the dataset source through the standard sql connector in powerapps post-flow execution, and the execution time isn't too bad. But if you had to do this for all your datasets that's a massive additional set of executions and driving that much traffic traffic through the gateway will inevitably give your app a performance hit. Hope they're able to extend this feature to the on prem option (and soon).

 

Thanks for your help

Andrew

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: 417 members 4,919 guests
Please welcome our newest community members: