VARIABLE




VARIABLE Tutorial app showcases

  • How to Capture User input and store the input in a variable.
  • How to set a Variable.
Click here to automatically install VARIABLE Tutorial app in your workspace.


How does VARIABLE App Work?

We set the same variable: v_text in 2 different ways.

Using
  1. Set a Variable.
  2. Input Block#input

set
Set a Variable
 
When the user tap on one of the text block used as button, the 'Set a Variable' action is called to set the displayed variable to either GREAT or COOL
 
Here is the setting associated to the Tap event of the Text Block 'Set Variable to 'GREAT' 



The second action 'Refresh Block' is there to redraw the screen to reflect the change in the variable value.


input
Input Block
 
In that construct we use the Text Input Block to inform the value of the variable.


Text Input saves the tapped text into the variable v_text defined herein




When the user taps 'done' the Done event associated to the Text Input block fires.
We have attached a Refresh Block action to the Done Event to refresh the screen.
 
 
 

Learn more: 
Creating a Variable
Using a Variable
Save a Variable
System Values
Formatters
Expressions