Fields
Select Resource Field
The Select Resource Field allows for selecting items from dynamic resources.
This can be used to select items from a dynamic resource such as states, contacts, or Google Sheets.
Basic usage
Adds a selectresource
field to the fields of an action.
This will show all of the states defined in the flow in a select field.
Result
The field will be displayed as a select field as below:
The resultant data will be available in the stubpost.data
as:
This can be substituted with eg. ~~stubpost.data.state_selector
where required.
Parameters
See fields for common field parameters like validation and conditional rendering.
required string
params.resource_name The specific name of the resource you would like to load for selection.
One Of: states
| contacts
| google_sheets
optional
params.dataresourceinterfaceuuid The UUID of the data resource interface that you would like to load for selection.
Google Sheets Interface Uuid: fb856d6a-8e69-4f52-a08a-0a01737196b1
optional
params.details.orgcredentialuuid The UUID of the organization credential that you would like to use to access the resource.
See credentials for more information.
optional object
params.params Additional parameters specific to the resource in question. See examples below.
Examples
These are some more complex examples
Select value from a Google Sheet
This will allow selecting values from the specified Google Sheet.
Parameters (for google sheets example)
required string
params.params.spreadsheet_id The Google spreadsheetId.
required string
params.params.sheet_title The title of the sheet in the Google Spreadsheet.
required string
params.params.filter_column The column that will be used to filter the results and is used as the label
in the select field.
optional string/array
params.params.additional_columns The additional columns that will be included in the result. This can either be an array of strings, or a comma separated string of column names.
If _all
is used, all columns will be included.
optional integer
params.params.cache_expire_seconds Specifies the time, in seconds, to cache data from the sheet before it updates from the sheet.
This could speed up reads as it may not need to read the values from the Googlesheet each time this form is populated.
optional boolean
params.params.use_cache Specifies whether or not to use the cache when populating the select field values.
optional string
params.params.complex_query Allows you to perform more complex queries to filter out data not required in the select field values.
Uses mongodb like queries.
optional integer
params.params.limit Allows you to specify a limit to the number of items retrived to populate the field with.