Wiki source code of Bedingung (Wert prüfen)


Show last authors
1 {{figure image="condition-workflow_de.png" clear="h1" width="400"}}
2 The condtion lets you add a branch to your workflow. Depending on the result of the condition, different actions are performed. You can also add a label to each branch of the condition to improve the recognizability of your workflow configuration.
3 {{/figure}}
4
5 {{figure image="condition-settings-simple_de.png" clear="h1" width="400"}}
6 A simple configuration for a condition. A value is compared against another value.
7 {{/figure}}
8
9 {{figure image="condition-settings-advanced_de.png" clear="h1" width="400"}}
10 You can also make use of more complex conditions. In this case, two individual conitions were defined, named //c1// and //c2//. These two conditions are then joined with a custom connection: //c1 or not c2//.
11 {{/figure}}
12 {{content/}}
13
14 Control elements of type //Condition (Check value)// can be used to influence the flow of processing depending on form values and other content by using [[Variables>>doc:Formcycle.UserInterface.Variables]]. These elements allow the workflow to be split into two paths depending on whether a configured condition turns out to be true or false. By using multiple conditions in one condition element and nesting conditions, it is possible to implement even complicated workflows.
15
16 The condition element is placed in the workflow like an action. Initially, the two paths of the element are labeled //Yes// and //No//. However, the labeling of the paths can be changed. This is possible by clicking on the label, adjusting it and confirming with the Enter key or clicking somewhere outside the input area.
17
18 == Configuration ==
19
20 === Condition N ===
21
22 The condition element can check one or more conditions. In each case, a value to be checked, a condition and, if necessary, a value of the condition are required. In the conditions and values [[Variables>>doc:Formcycle.UserInterface.Variables]] are supported, which also allow to check the contents of form fields and the results of previous actions in the same processing chain. Initially, controls of type //Condition (Check value)// have only one condition.
23
24 Conditions each have the following input options:
25
26 ; Value to be checked
27 : The value which should be checked. [[Variables>>doc:Formcycle.UserInterface.Variables]] are used here to determine the value.
28 ; Condition
29 : Condition to be tested. The following options are available for selection:
30 :: empty
31 :: not empty
32 :: equal
33 :: not equal
34 :: contains
35 :: does not contains
36 :: greater than
37 :: greater or equal
38 :: lower than
39 :: lower or equal
40 :: starts with
41 :: does not start with
42 :: ends with
43 :: does not end with
44 :: matches regexp
45 :: does not match regexp
46 ; Value to compare against
47 : The value of the selected condition used for the check. Visible if //empty// or //not empty// was not selected as condition.
48
49 === Adding another condition ===
50
51 Under each last condition there is a button //{{ficon name="plus-circle" /}} Add condition//. After the first click on this button, a field is also visible under the first configured condition, in which the [[link>>||anchor="HLinkingconditions"]] of the conditions can be configured.
52
53 === Deleting conditions ===
54
55 If more than one condition has been configured, conditions can be deleted via the {{ficon name="trash-alt2" /}} icon in the condition's headline.
56
57 == Linking conditions ==
58
59 To link the configured conditions, 3 options are available, one of which can be selected:
60
61 ; All must match (AND)
62 : Alle an diesem Steuerelement konfigurierten Bedingungen müssen zutreffen, damit der //Ja//-Pfad ausgeführt wird. Ansonsten wird der //Nein//-Pfad ausgeführt. Diese Option ist der Standardwert.
63 ; One or more must match (OR)
64 : At least one of the conditions configured on this control must be true for the //Yes// path to be executed. Otherwise the //No// path will be executed.
65 ; Something else
66 : For complicated cases, this option allows to enter any logical links of the configured conditions. The conditions to be used must be inserted as follows:
67 :; cN
68 :: A condition, for example {{code language="none"}}c1{{/code}} or {{code language="none"}}c3{{/code}}. The names of the conditions are always in the heading of the condition. For a better clarity, the names of the conditions can also be changed by clicking on them.
69 ::
70 : In addition to parentheses, the following operators and constants can be used to link the conditions logically:
71 :; not
72 :: Negation, which must precede the value to be negated. For example:
73 :: {{code language="none"}}c1 and not c2{{/code}}
74 ::
75 :: {{code language="none"}}c1 or not (c2 and c3){{/code}}
76 :; and
77 :: AND operation, which is true if both concatenated values are true. For example:
78 :: {{code language="none"}}c1 and c2{{/code}}
79 ::
80 :: {{code language="none"}}c1 and not c2 and c3{{/code}}
81 :; or
82 :: OR operation, which is true, one of the two concatenated values is true. For example:
83 :: {{code language="none"}}c1 or c2{{/code}}
84 ::
85 :: {{code language="none"}}c1 or c2 or not c3{{/code}}
86 ::
87 :; false, true
88 :: These two constants represent the logical values //false// and //true//.
89 :; xor, nand, nor, implies, impliedby, equiv, unequiv
90 :: Represents, in this order, the logical operators [[Exclusive or>>url:https://en.wikipedia.org/wiki/Exclusive_or]], [[Alternative negation>>url:https://en.wikipedia.org/wiki/NAND_gate]], [[Joint negation>>url:https://en.wikipedia.org/wiki/NOR_gate]], [[Logical consequence>>url:https://en.wikipedia.org/wiki/Logical_consequence]], [[Converse>>url:https://en.wikipedia.org/wiki/Converse_(logic)]], [[Material biconditional>>url:https://en.wikipedia.org/wiki/Logical_biconditional]] and non-equivalence.
91
92 The evaluation of the conditions takes place by default from left to right. By using parentheses, the order of evaluation can also be influenced. This could look like the following example:
93
94 {{code language="none"}}(c1 and not c2) or (c2 and (c3 or c4)){{/code}}