Start page / Template development / Rules / Comparative expressions / <EQUAL/>

<EQUAL/>: Equals check in dynamic forms

The <EQUAL/> tag can be implemented in the value determination area of the rule definition (or for the definition of a precondition) and is used to compare two logical expressions. The result of the combined logical expression is a Boolean value, which is true when “Expression a” and “Expression b” are equal:

<EQUAL>
Expression a
Expression b
</EQUAL>

The <EQUAL/> tag is used to check a property of the form against a comparison value.

The <EQUAL/> tag contains a certain property of a form element (for instance, the value of an input component) or even of a form (“In which store was the form opened?”), which is queried using a <PROPERTY/> tag.

The comparison value may be a fixed numeric or textual default value or may also refer to a property of a (different) form element.

The following tags can be used to enter a fixed, defined default value:

  • <TEXT/>: used to enter a textual comparison value within an expression of comparison.
  • <NUMBER/>: used to enter a numeric comparison value within an expression of comparison.

Important Performing an equivalence check on a date using the <DATE/> tag within an <EQUAL/> section is not possible. The <GREATER_THAN/> and <LESS_THAN/> operators must be used in this case.

Examples

1) Comparing a form property with a textual default value

VALUE / TEXT:
Compares the value of an input component (<PROPERTY/> tag) with a textual default value (<TEXT/> tag):

<EQUAL>
<PROPERTY source="st_text" name="VALUE"/>
<TEXT>ABC</TEXT>
</EQUAL>

LANG / TEXT:
Compares the current language used by the editor to edit a form (<PROPERTY/> tag) with a default value (language code within a <TEXT/> tag):

<EQUAL>
<PROPERTY source="#global" name="LANG"/>
<TEXT>DE</TEXT>
</EQUAL>

STORETYPE / TEXT:
Compares the current store in which a form is opened by the editor (<PROPERTY/> tag) with a default value (store within a <TEXT/> tag):

<EQUAL>
<PROPERTY source="#global" name="STORETYPE"/>
<TEXT>pagestore</TEXT>
</EQUAL>

2) Comparing a form property with a numeric default value

LENGTH / NUMBER:
Compares the length of the value of an input component (<PROPERTY/> tag) with a numeric default value (<NUMBER/> tag):

<EQUAL>
<PROPERTY source="st_text" name="LENGTH"/>
<NUMBER>3</NUMBER>
</EQUAL>

SIZE / NUMBER:
Compares the number of the entries of an

type input component (<PROPERTY/> tag) with a numeric default value (<NUMBER/> tag):

<EQUAL>
<PROPERTY source="st_list" name="SIZE"/>
<NUMBER>2</NUMBER>
</EQUAL>

3) Comparing two form properties to each other

VALUE / VALUE:
Compares the values from two input components to each other (using two <PROPERTY/> tags):

<EQUAL>
<PROPERTY source="st_value" name="VALUE"/>
<PROPERTY source="st_lowerLimit" name="VALUE"/>
</EQUAL>

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy