How do i properly configure this element type?
Given
Table with two columns: “column_name” & “column_label”
Expected result
An element with the name xxxx
. This element is a drop down menu which shows the values from the column “column_label” and takes the values for the column “column_name”.
Bonus question
Which syntax would i have to use to display the plain result as a title of table element
[...]
"$title": {
"value": "{{xxxx}}"
}
I believe data select is the wrong element for this usecase.
With variableConfigSingleSelect you can select values from a column and store them in a variable which then can be used as, e.g., a title.
"id": "select",
"type": "variableConfigSingleSelect",
"source": "dataSource",
"config": {
"variable": "selectValue",
"options": [
{
"origin": "data",
"id": "vals1", // the id for the value set can be arbitrary
"valueColumn": "column_name",
"labelColumn": "column_label"
}
]
}
}
the title then be assigned the selected value with
"$title": {
"type": "string",
"value": "{{selectValue}}"
},
Thank You for the hint Tim.
I do actually need to retrieve a set of rows from the underlying data source. As i understand from the Documentation variableConfigSingleSelect
only allows for a single selection.