Change variable by pressing a button

Dear App-builders,
Is there a way or workaround to set several variables in APPs after pressing e.g. an execution button?

Use Case: In our case the Graph Visualizer is based on two variables, after setting the first variable, the Graph Visualizer already starts compiling and hence, is quite slow as it has to handle a large number of combinations. After setting the second variable, this number of combination would be highly decreased and would lead to a necessary performance increase.

Hello Tim,
maybe you can think about building a custom component for this.

Your are talking about “setting variables at execute button” but you also talk about “setting a first variables”. How do you set those variables? Via a Execute Button? Because I only know about setting variables via different elements like “VariableSingleSelect” and not via an execute button?

So if you could elaborate a little bit more, so I can understand better, I could mayve put it to future improvements to Product Management.


I am being a little bit more precious on the background to make the issue more feasible to you:
The Graph Visualizer is based on 2 filters in our app that can both be set in two separate filter elements. In the usual case, the user would set both variables and then expects the Graph Visualizer to compile. This would work fast as the Graph Visualizer would only need to plot one smaller Graph.
The issue is now that the Graph Visualizer already starts compiling after the first filter is set. As there may be > 25 different combinations, if the second filter is not yet set, the Graph Visualizer compiles > 25 graphs and hence, is quite slow.
A solution would be to have e.g. 2 filters that can be set, then have an execution button (or something the like, e.g. trigger button) that assigns the values to the variables and as a consequence have the Graph Visualizer react to the set filters.
Abstractly speaking, filters are not set right in the moment when they are selected but later once another button is pressed (Thinking of e.g. if you book a flight, you are first inputting all your data like Abflughafen, Ankunft, Zeit, etc. and the have a button to start the search).


1 Like

This problem might be resolvable by now. There is a new option to update app variables (with variablesToBeUpdated) via an execution button. I hope this will help you in the future.
Here’s the docu: