Actions are used to react to certain events. If you have selected a control and switch to the “Actions” tab in the “Properties“, you will see all the actions available for this control.
To create an action, click on the “Actions” tab for the selected control element. Then select a click event by clicking on the corresponding lightning bolt icon
.
For example, to assign an action to a control element that is triggered when the mouse button is clicked, select “Clicked“.

In the action editor that then opens, you act in exactly the same way as in the rule editor. It is structured in the same way. Please refer to the article “Rules“.
However, there is one difference. For the“SET_VARIABLE” and“SET_PROPERTY” functions, you will see the following icon next to the value selection:

Additional functions can be selected here. Clicking on this icon opens the “Value adjustment” window.


The drop-down menu is filled depending on the initial value.
If the initial value is a Boolean value, you can only use logical operators such as AND, OR, XOR or NOT are available.
If the value is not a Boolean, you can only use mathematical functions such as ADD, SUB, MUL, DIV or MOD are available.
These additional functions have no effect on the original value, but only change the value that is written to the target.
Another difference to the rules is that the processing of actions is not aborted as soon as a condition of an action is met. All actions are always executed.
The actions can also be assigned rights via the corresponding tab in the properties window.

Actions added to a click event can be recognized by the yellow lightning bolt icon.

Explanation of the commands for actions

CHANGE_LANGUAGE
This command changes the language of the HMI. To be able to use this, translation texts must be created in advance for the desired language.
The language can then be selected at the bottom of the window.
You can find out how to create translation texts in the article of the same name: Translation texts
CLOSE_DIALOG
This command closes a previously opened dialog, which can be selected in the lower part of the window.
CLOSE_PROJECT
If this command is executed, the current project is closed.
EXECUTE_DATABASE_QUERY
This command executes a database query.
You can find out how to create database queries in the article “Database queries“.
LOGOUT
If this command is executed, the currently logged in user is logged out.
OPEN
This command can open a previously created view (with the view manager) or a dialog when the action is triggered.
These can be selected at the bottom of the window.
You can find out how to create views with the View Manager in the article “View Manager“.
PLAY_AUDIO
You can also integrate audio files into QuickHMI that can be played at runtime. This command enables precisely this practical function.
At the bottom of the window, you can choose between the previously integrated audio files.
You can find out how to integrate audio files (as well as image files) into QuickHMI in the chapter “Integrating audio files” or “Integrating image resources“.
SCRIPT
This command executes a previously defined JavaScript function as soon as the action is executed. You can select the previously created function at the bottom of the window.
Everything about JavaScript and HTML can be found in the corresponding articles.
SEND_MAIL
This command is used to send automatically generated mails.
You can find out all about automatically generated e-mails in QuickHMI in the “E-mail function“.
SET_VARIABLE
This command assigns a new value to a variable. The new value is only sent to the data source if the new value differs from the currently known value.
SET_POINTER
This command assigns a new target variable to a pointer. Which variable is assigned to which pointer can be defined at the bottom of the window.
SET_PROPERTY
This command assigns a new value to a property of a component. Which value is assigned to which property can be defined at the bottom of the window.
FORCE_VARIABLE (from QuickHMI 14.4.1)
In contrast to SET_VARIABLE, this function does not check whether the new value to be set differs from the currently known value.
