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.

View solution in original post

3 REPLIES 3
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.

View solution in original post

Highlighted
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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 254 members 6,374 guests
Please welcome our newest community members: