Data Sources (beta)
Data sources functionality is in beta testing and may be subject to change.
The data source is an attribute of a list field. It allows using collection field values as list field options.
Example
We have a collection of player names called "Team" and want to use names from this collection as available values for a list field named "Captain". Here is how "Team" and "Captain" fields may be specified in project settings JSON.
{
"sections": [
{
"name": "Data Sources",
"properties": [
{
"label": "Team",
"key": "team",
"field": "base_collection"
}
]
},
{
"name": "Fields",
"properties": [
{
"label": "Captain"
"key": "captain",
"field": "player_name_selector"
}
]
}
]
}Here are field definitions from fields JSON.
The source object in player_name_selector specifies to use "Team" collection as a data source.
$$PROJECT_FIELDS.team from source.field is an absolute path to the "Team" collection.
Attribute source.value_key specifies that the field name in the "Team" collection is used to build values for the list.
Restrictions
Only fields of type
listfrom Experience Setup can have a data source.If the field definition has a
sourceattribute then thedataattribute must have an empty array as a value -"data": [].Only collections from Experience Setup can be used as a data source.

