You can operate with data from any data source on your prototype like input widgets, text widgets, Data Grids, Data Lists, Data Masters etc. The most basic and common operations are the arithmetic ones which apply only to numbers. You will be able to operate with either integer or decimal numbers. Notice that the only number formats understood by Justinmind Prototyper are the following:
Integers matching the regular expression: [-+]?(?:(?:(?>\\d{1,3})[@](?=\\d\\d\\d))+(?:\\d\\d\\d)|\\d*).
Examples:
25 (taken as 25)
25,134 (taken as 25134)
25.134.341 (taken as 25134341)
25,134,341 (taken as 25134341)
Decimals matching the regular expression: [-+]?(?:(?:(?>\\d{1,3})[@](?=\\d\\d\\d))+(?:\\d\\d\\d)(?:[#]\\d*)?|\\d*(?:[#]\\d*)?).
Examples:
25,34 (taken as 25.34)
25.34 (taken as 25.34)
25.341 (taken as 25.341)
25.134,34 (taken as 25134.34)
25,134.34 (taken as 25134.34)
To create an arithmetic operation and store or display its result follow the steps:
Select a widget on the screen and follow the steps to create a Set Value action (see Actions).
In the Interactions dialog click on the 'Calculated' button. The Expression Builder will appear.
Create the desired arithmetic expression using numeric functions and the required data.
Press Ok to close the Expression Builder dialog.
Select a widget on the small canvas as the target to display the result of the expression or select a variable to store it.
Press Ok to apply the changes.
You can also use arithmetic operations within a event's condition in order to compare the result with any other data source.