I would like to store an element selection in a variable so that this value is stored and used each time I open the low-code app.
How do I overwrite the variable value from a dropdown component?
How do I use the variable in a GQI query?
Hi Jeroen
Currently it isn't possible to overwrite a variable value using a dropdown component. Do you have a specific use case in mind to have to store this value in a variable before using it in a query instead of using the dropdown value itself in the query? Note that it is possible to configure a default selection on the dropdown component itself.
Variables can be used in a query just as any other data item. When an input can be linked to data, you can click the 'chain' icon. Then a small context menu is opened where you can pick the data item, data type & property to link to the field.


You can indeed use a button to set a variable. Note that this set will only apply for the current app session it is not saved to the app. The variables will have their default values again on the next visit of the app.

So there's no way to store a value to hdd or db directly from an app?
Probably the only way is to go through an element?
Unfortunately the element selection is what we try to save.

There is currently no built-in way to do this. You could however already implement this using some existing features: First create a script that saves the user selection somewhere (HDD, DB, online, …). Triggering this script (from the app) will set the initial selection. Then you can create an ad hoc script that uses the saved selection and outputs this as the first row, followed by all other needed rows. Linking this query to a dropdown & using 'select first item by default' will make sure this item is always selected.
yes, I would like give the user the option to select an element as a permanent selection.
I saw that it's possible to trigger a variable set from a button.
So perhaps a combination of a dropdown and a button can then set the variabl e with the dropdown content.