Condition

Parent Previous Next

Condition

The Condition type is used when the user wants to execute the event when a condition is satisfied.


To configure the Trigger Condition, follow the steps below:


1.   In Type ComboBox, select the value Condition.


2.   In the Condition TextBox, insert the expression to be satisfied.


3.   Click the CheckBox to verify the expression inserted.


3.1.   If it is correct, continue to the next step.


3.2.   If not, revise the script inserted.


4.   Configure the Action field by selecting a Service or insert the desired Expression.


graphic



Example:


.     Create two Tags in Tags Document named ConditionTag (integer) and TagIncrement (integer).


                                                                Figure2. Creating Tags.


.     Next, create a Trigger document and name it  TriggerDoc, and then insert a new item.

.     In the item configuration keep the Trigger Type as "Condition", in the Action Type select the value "Expression" and keep the Enable value as "True".

.     In the field Condition, insert the following configuration: @ConditionTag == true. And in the Expression field insert: @IncrementalTag++;


graphic



.     At this point, we will create a new Graphics Document named TriggerTest.

.     In this document create two new TextBox objects.

.     After creating the objects, set the fields Text with the following configuration: @ConditionTag

.     In the first one and in the second one with: @IncrementalTag


graphic



.     Save the modifications and set the TriggerTest document to be the Startup Graphic.

.     Execute the RunTime.

.     Now, every time @ConditionTag's value is one in the TextBox, the tag @TagIncrement will have its value increased by one.


graphic