cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Stored Procedure Support in PowerApps

PowerApps doesn’t seem to support the execution of On-Premise SQL Server stored procedures.

 

So, is it possible to interface with an On-Premise web service that connects to the SQL Server and executes the stored procedure, which in turn, returns data?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Stored Procedure Support in PowerApps

Hi @LynnCaveny,

 

You may take a look at the custom connector:

Register and use custom connectors in PowerApps

 

Further, You could take a try to add a flow to execute stored procedure (supports SQL Server stored procedure with on-premise gateway), as currenlty there is no method to get the flow results to the App in PowerApps, you need to connect to the corresponding data directly to check the results in PowerApps.

Start a flow in an app

 

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: Stored Procedure Support in PowerApps

So far we haven't gotten PowerApps approved for our company, but have you tried using a table function.  It's not as good as a stored procedure, but you can pass in parameters and it will return a table.   Here is an example I've used in PowerBI, but I'm thinking it would work int PowerApps:

 

          SELECT *
          FROM POWERBI.TF_PB00002_Open_Activity_List('All')

 

PowerBI looks at it as just another DirectQuery and a table function can contain most of the logic you would normally put in a stored procedure.

View solution in original post

9 REPLIES 9
Highlighted
Community Support
Community Support

Re: Stored Procedure Support in PowerApps

Hi @LynnCaveny,

 

You may take a look at the custom connector:

Register and use custom connectors in PowerApps

 

Further, You could take a try to add a flow to execute stored procedure (supports SQL Server stored procedure with on-premise gateway), as currenlty there is no method to get the flow results to the App in PowerApps, you need to connect to the corresponding data directly to check the results in PowerApps.

Start a flow in an app

 

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Stored Procedure Support in PowerApps

Is this still the case?  No responses (output paramaters or result sets) supported from stored procedures through the gateway connector?

Highlighted
Advocate I
Advocate I

Re: Stored Procedure Support in PowerApps

Bump up - any Idea raised for this? I would like to have the outcome of procedure (table) in powerapps directly. (in collection)

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Stored Procedure Support in PowerApps

Is there a uservoice or something shere we can vote on this? This is a major drawback!

Highlighted
New Member

Re: Stored Procedure Support in PowerApps

we ended up redesigning our solution to not depend on the response in one app, and another we moved the database to AzureSQL which does allow responses from the stored procedures.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Stored Procedure Support in PowerApps

Ah, so I can call the sproc, i just dont get a ressponse? I didn't get that in the conversation above, or the docs.

 

Highlighted
New Member

Re: Stored Procedure Support in PowerApps

correct. You can call it, but you can't return a data-set or get a response value.
Highlighted
Regular Visitor

Re: Stored Procedure Support in PowerApps

So far we haven't gotten PowerApps approved for our company, but have you tried using a table function.  It's not as good as a stored procedure, but you can pass in parameters and it will return a table.   Here is an example I've used in PowerBI, but I'm thinking it would work int PowerApps:

 

          SELECT *
          FROM POWERBI.TF_PB00002_Open_Activity_List('All')

 

PowerBI looks at it as just another DirectQuery and a table function can contain most of the logic you would normally put in a stored procedure.

View solution in original post

Highlighted
Frequent Visitor

Re: Stored Procedure Support in PowerApps

You can get a response value, true or false, but getting the returned data seems impossible. The flow runs from a button in the app and if you examine the flow afterwards, you can see all the returned data in the flow in resultsets table1. But I can't figure how to retrieve it to the app itself. Very frustrating, Microsoft could do so much better.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,617)