Variable transformation: to json list

Dear Apps Devs,

it would be great if you could add a small feature to the variable transformations - the ability to generate a valid JSON list from a filter, for defining the columns of a table or the series for highcharts chart.

There is work-around with existing means that has the drawback that it generates invalid json and throws errors in the console and it doesn’t work on empty selections - otherwise it works.

I have created a simple example here with highcharts: https://internal.onedata.de/apps/builder/apps/98b799a2-5914-4125-a282-2ac725585d08

This is the essential part of the work-around:

        "$series": {
          "type": "object",
          "value": "[{\"name\": {{filters.filter.City.values | list?separator=},{\"name\": }} }]"
        }

Credits go to @Veronika for providing me with the work-around

2 Likes

Yes unfortunatelly I also do not know a way to directly generate a JSON List.
Currently only other outputs are supported like a sqlList (https://internal.onedata.de/apps/apps-docs/odml-documentation/AppBuilder/global/Global.html#variables-from-filter-values).
Therefore I will note that here further demand exists.
Thank you for the input and the use case.

Just one addition:
We often have to choose between column selection workaround (see Adrians input) and the reset all filters button in apps because the reset button will create a table with no columns (selection in workaround filter also cleared). Thus for our project a built in functionality would very much be appreciated as well. :blush:
Intuitively the user would expect the reset filter button to go back to the default column selection.
Kind regards
Magy

1 Like