web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stored Procedure Suppo...
Power Apps
Answered

Stored Procedure Support in PowerApps

(0) ShareShare
ReportReport
Posted on by 14

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?

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    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

  • SqueakerJG Profile Picture
    8 on at

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • SqueakerJG Profile Picture
    8 on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

     

  • SqueakerJG Profile Picture
    8 on at
    correct. You can call it, but you can't return a data-set or get a response value.
  • Verified answer
    LynnCaveny Profile Picture
    14 on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard