The expression builder
Build complex interactive prototypes with the help of the expression builder, a comprehensive front end to define expressions used to evaluate results of input data.
It is mainly used for two purposes:
- To build the conditions that an interaction must meet in order to be executed. In this case the expression must be built with Boolean operators (true/false, yes/no).
- To specify a value in a ‘Set Value’ or ‘Set Selection’ event action.
The editing area is very interactive and you can move elements around by drag and drop, and delete them by clicking on the X icon that appears at the top right-hand corner when the mouse is hovering over an item.
Every condition and expression in Justinmind is a combination of Functions and Data sources.
To create your own condition or expression, just drag the functions/constant you need from the tabs and drop them into the editing area.
Do the same with the Data sources, found in the Data panel.
We call ‘Data sources‘ the data elements we can use and manipulate in the expression builder to create expressions and calculations. These elements act as parameters of the expressions:
1) Screen’s Widgets: Some widget properties can be used as parameters in your expression. To use them, drag the widgets from the ‘Screen’ tab of the Expression Builder and drop them into the editing area. Then you may choose one of the following properties:
o Value: the value displayed by a widget on the current screen. Any widget with text (eg. button) will have this property.
o Selected value: the current selected value of a selection component (eg. select list).
o Pos.X relative: the X coordinate of the current widget’s position relative to its closest parent container.
o Pos.X absolute: the X coordinate of the current widget’s position relative to the page.
o Pos.Y relative: the Y coordinate of the current widget’s position relative to its closest parent container.
o Pos.Y absolute: the Y coordinate of the current widget’s position relative to the page.
o Width: the width of the widget in pixels.
o Height: the height of the widget in pixels.
o Angle: the rotation angle of the widget in degrees.
o Is visible: will be true when the widget is visible and false otherwise.
Note: both the X and Y positions, absolute or not, refer to the top-most and left-most positions of the widget respectively.
2) Variables: Variables act as generic containers for data which can be used in expressions.
3) Data Masters: Use a Data Master in an expression to operate with all its records. You can also use the Data Masters’ attributes in order to filter a Data Master among other functions.