Skip to main content

Parameters

Parameters allow SQL queries to be parameterized so users can pass their own values in at runtime to filter results. These are passed into WHERE clauses in SQL statement before being passed to the database. A Stitch can have multiple parameters.

Create a Parameter

To create a parameter, navigate to Parameters and click Create.

create parameter


The configuration dialogue box displays.


configure parameter


Parameter Elements

Fill in the fields to create a parameter.


FieldDescription
NameThe name of the parameter field in the database.
TypeSelect data type from dropdown list: string, integer, numeric, data or multi-select. A multi-select requires default values to be supplied (see Default Value).
DescriptionThis description will appear to users when they call a sheet containing the parameter. Can be useful for giving more detailed information on what a parameter is for.
RequiredCheck box to indicate that a default parameter value which can be changed by the user will be applied to the query at runtime. This is optional unless selected Type = multi-select.
Default ValueEnter the default value for the parameter if Required has been checked. Multi-select allows more than one parameter from a list to be chosen. List values should be provided in a JSON array, e.g.:["MS_value1","MS_value2","MS_value3","MS_value4","MS_value5"]

When finished, click `Add` to create the parameter.

The parameter can now be used in Stitch configuration.

Edit a Parameter

Navigate to Parameters and check the box beside the parameter to be edited. Click the Edit button that displays. Make the required changes and click Submit, or Cancel to quit the operation.

Delete a Parameter

Navigate to Parameters and check the box beside the parameter to be deleted. Click the Delete button that displays and Confirm, or Cancel to quit the operation.