Call SQL Server procedures directly in Power Fx (GA)

We are excited to announce that calling SQL Server stored procedures in Power Fx is now generally available in all regions. You do not need to call a Power Automate Flow to use a stored procedure making development of Power Apps for SQL easier for authors and faster overall performance for both authors and end users. 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, you need to either create a new SQL connection to your app or already have one in your 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 by referring to the data source name and then ‘dot’ into the specific stored procedure in a Power Fx formula.

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 checking 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.