Field comparisons

Field comparisons use a statement to create a conditional property for a control on a form.

Syntax: FIELD OPERATOR VALUE

  • FIELD is any variable or field name surrounded by brackets, for example, [$x], [name], and so forth.
  • OPERATOR can be =, >, <, <>, or #.
  • VALUE is any quoted string or number.

Note: Field comparisons can also use complex conditions or statements to create a conditional property for a control on a form. You can use | or & to concatenate multiple expressions. For example: [$L.one.click]<>true &[$quantity]>1&[$orderonbehalf.marker]<>true.

Important: In order for a property to depend on a variable (or record field), the variable must be assigned as an input to an object on the same screen. For examples, see Use form dep.g to demonstrate Dynamic View Dependencies.

Use field comparisons

Here are some examples of using field comparisons.

  • Making a certain field visible only when the category of a record equals "network."
    • Assume that the category can be selected via a drop-down list whose Input is defined as $category.
      You can specify the visibility dependency by assigning the following to the Visible Condition property of the field: 
      [$category] = "network"
    • Instead of a variable, a drop-down list can use a record field as input. If the field is named "category," set up the "Visible Condition" as follows: 
      [category] = "network"

  • Adding a DVD visible condition to a field:
    [assignment]#"help"

  • Specifying an inequality comparison:
    [$category] <> "network" (that is, category is not network)

  • Using complex conditions or statements to create a conditional property for a control on a form.
    • [$category]="network"&[$subcategory]="modem"
    • [$category]="network"|[$category]="DEFAULT"
      Complex conditions are true only if both parts of the condition are true.