Flags

Flags are boolean (true / false or ON / OFF) variables. An example might be a Flag called Front Door Open which is linked to a magnetic contact sensor. The sensor is either activated or not, representing that the front door is open or not, hence the flag is either ON or OFF.

Flags are typically OFF when the app first starts, unless they are global variables, or the settings option Remember Last Page / Settings is applied, in which case the Flag will have the last known value.

Managing Flags

Flags can be created from the Flags screen - which can be accessed from the Project Settings tab, or where you are asked to select a flag for an operation.

Flags are organised into groups (folders), and it is important to group logical flags together in folders, as you can then perform group operations on them, eg setting a flag group to OFF. Each flag may have a comment / description which could explain the use of the flag.

Flags

Flags also have the following properties:

Adding Flags

To add a flag, first select or create the folder that the flag will reside in, and click Add Flag. Flags must be given a unique name, you can edit the name by single clicking on the flag in the tree view.

Creating Multiple Flags

It is possible to select a flag & duplicate several copies of it, and each copy will be named with an incrementing number at the end, eg:

Duplicating Flags

Setting Flag Values

You can set the value of a flag with an action. Flags can be set to one of the following:

Setting the Flag Value

Setting the flag's value may have an impact on other objects, if the flag is used elsewhere:

Using Flags

Flags are used throughout the solution to perform various tasks, eg:

Highlighting Buttons

If a secondary highlight image / text is associated with the button, you can select a flag which will alter the state of the button whilst the flag is in the ON state. By default, the highlight flag is set to None, but you can choose or create a flag by clicking on None to show the flag setup screen:

Using Flags to Highlight Buttons

Showing / Hiding Page Objects

Any page object, by default, is Always Visible - that is, you can see it on the user interface. This can be changed though, using the page objects Reveal menu option:

Showing / Hiding Objects

Page objects which are not set to Always Visible will only be seen when the specified flag is ON, and will be hidden when the flag is OFF

You can determine the direction, and manner in which page objects appear and disappear using the transition direction and advanced options:

Reveal Options

You can specify the time period that the object should move x pixels, for example moving 1 pixel every 0.001 seconds results in a fast, smooth transition, whereas moving 100 pixels every 1 second will result in a slow, stepped transition.

You also have options for:

Conditional Actions

Flags can also be used in an action list, to determine whether or not to perform a specific action. At the time the action is supposed to execute, the system will evaluate the state of the dependent flag & only execute the action if the flag is currently in the desired state:

Conditional Actions

Advanced Conditional Actions - AND/OR

Occasionally you might want to base actions on whether multiple flags are all ON (AND operation), or based on whether any flags are ON (OR operation). You can use a 3rd flag for this purpose, for example:

OR Operation

You want to execute actions if any particular flags are ON:

Set a flag PerformAction to OFF Set the flag PerformAction to ON dependent on flag Condition1 being ON Set the flag PerformAction to ON dependent on flag Condition2 being ON Set the flag PerformAction to ON dependent on flag Condition3 being ON

You now have a flag PerformAction which is ON if any of the condition flags are ON, and is OFF only if all the condition flags are OFF

AND Operation

You want to execute actions only if all the particular flags are ON:

Set a flag PerformAction to ON Set the flag PerformAction to OFF dependent on flag Condition1 being OFF Set the flag PerformAction to OFF dependent on flag Condition2 being OFF Set the flag PerformAction to OFF dependent on flag Condition3 being OFF

You now have a flag PerformAction which is ON only if all of the condition flags are ON, and is OFF if any of the condition flags are OFF