DVD select statements

A DVD select statement changes what controls or values appear on a form based a triggering condition. You determine what controls or values the DVD select statement displays by assigning a condition to each control or value. When the condition is true, the system displays the controls and values. When the condition is false, the system hides the controls and values.

Example DVD select statement where the display condition is false

Example DVD select statement where the display condition is true

The key benefits of a DVD select statement are listed below.

  • The user only sees the controls and values when the appropriate condition applies.
  • The user has a visual indicator that new options or controls are available.

The costs of a DVD select statement are listed below.

  • The more conditions there are to evaluate, the more system resources if takes to display the form.
  • You have to reserve part of the form's screen space to display hidden items.
  • You must create a query for the DVD select statement condition.
  • The only way to change the list of values is to change the value of each individual control of the DVD select statement.

Since DVD select statements depend upon queries for the condition, any inefficiencies in the underlying query will negatively affect your system performance. Following the best practices in How do I write a good query? will reduce this performance impact. In addition, the more conditions you have, the more of the form's screen space you will have to reserve for the controls hidden by the DVD statement.

In general, a DVD select statement is best used in the following circumstances.

  • There are only a few conditions that change the options available on the form.
  • The list of options either does not change at all or changes infrequently.

If you have a lot of conditional data to manage, consider using multiple Comfill controls with recursive fills instead. This allows you to restrict the options displayed in one Comfill control based on the selections in a previous Comfill control. Also, if you expect to frequently add or change the options available to the DVD select statement, you may want to use a Comfill control so that you can add or update the options as records.