Reading JSON global variable

Dear One Data community,

I am trying to set multiple values in a variableConfigSingleSelect selector when picking an element of a drop-down menu, and to do that I am resorting to using the following SQL query from a data source. When the user picks an option from the drop-down menu, the value from the ‘value_column’ is then inserted into the following global variable: g_global_var

`  "sql": "SELECT CONCAT(plant_label, \" (\", system_label, \")\") as label_column, to_json(map('value', 1)) as value_column from inputTable"`

Now, I am trying to read the value 'value' contained in the value_column in another element of the page, but whenever trying to do that with the following command, I get a blank value.


However, when reading the whole variable’s content (not the single value element), the output is correctly displayed:



Q: Is there any way to read the value contained in the ‘g_global_var’ ‘value’ field?

Addition to the question:
Several things were tried w.r.t to the question above and it all broke down to the following issue:
Manually, it is possible to add multiple “sub-variables” to be set if one option is selected, e.g. subvar1 and subvar2
Is it also possible to have two or more value_columns:

Or is there any workaround to have some kind of filter that if an option is selected, several variables are set to specific values of a table?

Thanks in advance :slight_smile:

So at the end of the day, I resorted to using a concatenation of the different columns into one single global variable, and passing this variable over to a workflow.

Then, in the workflow I use a small regex with “split” whenever wanting to access the single specific values contained in the global variable. For instance:

split('@g_selector_concat@', '-')[1]