Use a stored procedure with a data source

A stored procedure is a script available in a relational database that performs a specific function in that database. See your RDBMS documentation for details on stored procedures.

When you add a data source, you can include stored procedures, and thereby make them available to your App. Designer creates an XML representation of both the IN and OUT parameters of the selected stored procedure. These are then available for mapping.

Add a stored procedure to a data source

The Add Procedure button is available when the Data Source panel is showing details of a relevant data source, for example a SQL Server database. Click Add Procedure, and then, in Name, select the stored procedure, and click Apply. Type ahead is also available. Once added, stored procedures are listed in the Data Sources panel at the same level as tables.

Add a button to trigger a stored procedure

Once you have made a stored procedure available, you can use it with a Button object with Action set to Procedure. This lets you select the data source and procedure. Once a procedure is selected, click the icon next to Procedure, and map its parameters. You can also add scripting to read and handle any values returned by the stored procedure.

Article last edited 20 February 2017