There will come times when you will need to create variables to hold some data. For those scenarios, we provide the ability to create and update variables by doing following -

Create variable a. When user clicks some button, update a to b.

Here a and b can be any word or list of words. Please just stick to the structure of "update x to y" to update a variable.

When you click on the "create variable a" sentence, you will see a popup with the setting of what should be the initial value of the variable.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/59232d13-04ff-4808-a709-0697954f7198/Screenshot_2020-10-07_at_8.12.55_PM.png

You can return any valid JS expression from here.

When you click on the second sentence i.e. "When user clicks some button, update a to b.", you will see two tabs - first related to "user clicks some button" and the second related to "update a to b". Go to the "update a to b" settings tab.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c86a3186-e055-4fa5-a1cc-7565a56cbfef/Screenshot_2020-10-07_at_8.14.22_PM.png

In this tab, you will see the setting to create an expression for the new value of your variable. Whatever you return from that expression will become the new value of the variable. You can use any of the appData keys to create an expression here. Below is an example expression.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6a9ab76a-1d80-40a0-a0f8-dcb0a4e3de6d/Screenshot_2020-10-07_at_8.12.33_PM.png