Problem using app variable in query

OS info

Problem description

When updating an app variable value in a dynamic event and using it as input to a query, the query uses the previous variable value, not the updated value.
What am I doing wrong here?

Steps to reproduce

  1. Create a query server action with a GET-variable. Create a Server Connect that uses that server action. Create an App-variable and set it to some value. Create a button with a click dynamic event.
  2. In the button click event set two actions;
    (2.1) Set the value of the variable to a value that differs from the current variable value, ex. set variable.value = variable.value*2.
    (2.2) Add a Server Connect load action and use the variable as input parameter.
  3. Now, when testing this page click the button and the query will be executed. Problem is that it will use the previous value of the variable even though this was changed in step 2.1 above.

See the animation for a better explanation.
I’m new to Wappler and any help or suggestions are most appreciated.

Community Page
Last updated: