Call SQL Server stored procedures directly in Power Fx (Preview)
We are excited to announce that you can now directly call SQL Server stored procedures in Power Fx. You no longer need to call a Power Automate Flow to use a stored procedure. This feature is in preview and currently in all regions. This makes development of Power Apps for SQL much easier. And your apps will be faster. The ability to call stored procedures for the SQL connector directly is an extension to the existing tabular model and gives users access to tables, views, and stored procedures. This feature extends our ongoing support of SQL Server as a primary development target for Power Apps.
Getting started
To use this feature, open a Power App and enable the preview switch in ‘Settings / Upcoming features / Preview’. Then, create a new SQL connection to your app. You can add to the existing connector already present in the app. In the table selector, choose the ‘Stored Procedure’ tab and select all of the stored procedures you want to access in your app. Then you can directly access the stored procedure in your app.
This feature is an extension to the tabular model. We allow the ability to execute stored procedures, but we do not allow the ability to run arbitrary SQL. This helps provides an additional level of security. Additionally, you can bind a stored procedure directly to a gallery or table by choose the ‘Safe to use for galleries and tables’ checkbox. See the article Connect to SQL Server from Power Apps for a discussion of how and when to select this option and other details on how to use this feature.