Comfill

The Comfill control lists a set of related records for a user to choose a value from. You determine the list of possible values by creating a link record entry for the Comfill control's Input field and specifying the related database field whose values you want to list in a link record line entry. You can also use the link record to associate a Comfill control with a particular search form if you want to allow users to search for related records.

Example Comfill controls

Example Comfill control associated with a search form

Example partial query in a Comfill control

Example query results from a partial query in a Comfill control

The benefits of a Comfill control are listed below.

  • The system only has to display one page's worth of options at a time. It takes less system resources to display a partial list than the full list of options. The longer the list of options is, the more efficient it is to display the list in pages.
  • Users can type in partial option values to search for options that match the partial value. For example, typing an "S" in the Contact field and clicking the Fill button shows a list of contacts that begin with the letter S.
  • You manage the list of possible values by updating the related records linked to by the fill. For example, as you add, update, or remove contact records any fill linking to contact records will automatically pick up these changes.

The costs of a Comfill control are listed below.

  • You must create a link line entry and a query for each Comfill control.
  • You must create a search form if you want the fill functionality to use it.

Since Comfills depend upon link queries, 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, keep in mind that it takes more effort to design and maintain a search form for each fill. You may want to limit search forms to circumstances where you want to provide users with more than one way to search for related records. If one field is sufficient to find the related records, you do not need to add a search form to the Comfill control.

In general, a Comfill is best used in the following circumstances.

  • There are enough options to display that the control can display them on multiple pages.
  • The list of options changes frequently and you want the control to always have access to the most recent changes.

If you have a limited number of options to display, consider using a Combo Box control instead where you can display all the options at once in a drop-down box. Also, if you do not expect the data to ever change or to change infrequently, consider using a global list to make the data available to any application that needs it.

Related concepts

Selecting values from options in a control
Combo Box

Related references

Web parameter: comfillAutoComplete