DATABASE Call stored procedure function

Call a stored procedure and return its result set.

Help CentreBuilding Processes

This article describes the RPA Database functionality to call a stored procedure.

For a full list of available functions, please read DATABASE functions.


Description

The Call stored procedure function executes a stored procedure on the database and returns its result set. This is useful for calling pre-defined business logic that resides in the database server.


Setting it up

To use the Call stored procedure function, follow these instructions:

{{popups:rpas/add:action=db-call-procedure}}

Once on a process map:

  1. Navigate to the process where you would like to add the Call stored procedure function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Call stored procedure option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
NameYesText-The alias of a previously opened connection (from db-connect)
ProcedureYesText-The stored procedure name, e.g. "dbo.my_proc" or "my_proc"
ParamsNoArray-An array of input parameter values for the stored procedure
VariableNoTextprocedure_resultVariable name to store the procedure result set

Output variables

VariableTypeDescription
{procedure_result}ArrayThe result set returned by the stored procedure

Errors

ErrorDescription
Connection not foundNo open connection exists with the specified name
Procedure not foundThe specified stored procedure does not exist in the database

Tips

  • Use schema-qualified names for SQL Server (e.g. "dbo.my_proc") to avoid ambiguity
  • Pass parameters as an ordered array matching the procedure's parameter order

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.