dataSourceConfigVar() function defines a config variable whose values are dynamically populated by a data source — either an inline data source function or a reference to a data source in a registered component. This is useful for config variables whose valid values depend on the customer’s account data (e.g., a list of available projects, channels, or mailboxes).
A data source config var can be defined in two ways:
- Data source definition — an inline function with a
performhandler that fetches and returns values dynamically. - Data source reference — a reference to a data source action defined in a component from the
componentRegistry.
Function signature
Parameters
An object describing the data source config variable.
Return type
The same data source config variable definition object passed in, unchanged. Used for type inference.
Examples
Related
configPage()— The page that contains this data source config variable.configVar()— For static config variables that don’t require a data source.connectionConfigVar()— For connection config variables.componentManifest()— Register components whose data sources can be referenced.
