Skip to main content

Parameters

Parameters allow SQL queries to be parameterized so that users can pass their own values in at run time. These are passed into WHERE clauses in SQL statement before being passed to the database. A Stitch may 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 is multi-select.
Default ValueEnter the default value for the parameter if Requited has been selected. Optional unless the selected Type is multi-select- if so the default value 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, or when a custom column is added to a database table during CSV upload.


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.