Hello,
I'm building a ComboBox that allows users to select values from a table.
The selected value is passed to a variable, which is used by the element above (blue) to generate a thumbnail link.
However, I'm facing an issue:
I can't set the ComboBox value to empty. I would like users to have the option to clear the value directly within the ComboBox.
Is it possible to add an unfilled option to the ComboBox? I’d like to avoid introducing a new button to clear the variable of the link.
After your current setvar, you can add something like ":clear". This will add another option to your combobox to clear the value. You can then do some magic in a page Execute to set another variable based on a regexreplace of that value. If you then use the variable you define on the page rather than the one in the combobox for your eventual control, it will work the way you want it to.
Execute data on the page: "Set|Variable|Screen1ToUse|[regexreplace:clear,[var:screen1],]|SetTrigger=ValueChanged"
Note I did not test this but now "Screen1ToUse" variable should always hold either empty (when clear is clicked or when the variable is not initialized) or one of the table values you selected. Note that if your table entry contains the value "clear" it will also be replaced in this situation and you might want to reword clear into "<clear>" or something else that won't occur in your table.
I added an answer as a response because comments don't allow images.