Develop > Tailoring > Form creation > Dynamic View Dependencies

Dynamic View Dependencies

Steps taken to ensure better data entry and form usability are critical to a database. This includes visual enhancements and form modifications based on user input. Dynamic View Dependencies (DVD) is a feature of Forms Designer that enables you to display objects and their attributes on a form depending on user interaction.

DVD enables you to create control or layout objects with properties that are evaluated when the form appears to control the appearance of these objects on the form.

You can use dynamic view dependencies to:

  • Dynamically determine the properties of a field based on the DVD condition.
  • Make a field visible only when another field contains a certain value.
  • Dynamically determine the choices in a drop-down list based on the choice in another combo box.
  • Dynamically set the font or color of a field based on the value of another field.
  • Dynamically set the font or color of a field based on its value.

Note: DVD select statements can only be used on text fields.

You create dynamic view dependencies by specifying conditional statements for properties of a control. The three types of conditional statements for a property are described in the following table.

Conditional Statements Syntax Example

Simple expression (Field comparisons):

  • Enable you to specify comparisons of equality or inequality.
  • Evaluate to “true” or “false” at runtime.

FIELD [OPERATOR VALUE]

  • FIELD: Any valid input field or variable enclosed in brackets.
  • OPERATOR: =, >, <, <>, or #
  • VALUE: Any quoted string or number

Note: You can use | or &to concatenate multiple expressions.

For more information, see Field comparisons and Use field comparisons.

  • [$invisible] = 0
  • [$invisible] <> 1
  • [$L.one.click]<>true &[$quantity]>1&[$orderonbehalf.marker]<>true

Value:Display expression (Field value matching)

  • Enable you to specify matching output values for various input values.
  • Return a single value or a list of values when evaluated at runtime.

FIELD ? ValueList : DisplayList

  • FIELD: Any valid input field or variable enclosed in brackets.
  • ValueList and DisplayList: Zero or more comma separated values.

For more information, see Field value matching and Use field value matching.

[$severity]? "sev1","sev2","sev3" : 1,7,2,13

This example returns a value as follows:

  • 1 if $severity="sev1"
  • 7 if $severity="sev2"
  • 2 if $severity="sev3"
  • 13 if $severity is none of the listed "sev" values

Function call (Dynamic functions):

  • Enable you to call a function that evaluates a result dynamically.

FUNCTION(ParaList)

  • FUNCTION: A valid function name (for example, select)
  • ParaList: Zero or more comma separated VALUEs

For more information, see Dynamic functions and Use dynamic functions.

select( "subcategory", "subcategory", "category", [$category] )

This example returns a list of subcategory names from the subcategory table, whose category equals the $category value.

Service Manager includes a form, dep.g, which demonstrates Dynamic View Dependencies.