Add a subform to a form

Applies to User roles: System Administrator

Subforms enable you to create a form once and then use it in other forms. You construct a subform in the same way as you would a standard form. You display a subform on another form by calling it with a subform widget embedded in the form.

Limitation: If a subform contains only a table, make sure that the table and subform have the same height. This way, a vertical scroll bar will appear for the table if needed when the total height of all table rows exceeds the specified table height. If you specify a table height greater than the subform height, the table rows may overflow outside the subform and overlap other fields on the form. If a subform contains multiple widgets, make sure that the subform height is set to be large enough to hold all the widgets; otherwise overlaps may also occur.

To add a subform to a form:

Follow these steps to add a subform to a form.

  1. Click Tailoring > Forms Designer in the System Navigator, or type fd on the Service Manager command line and then press Enter.
  2. Type a form name and click Search.

    Service Manager opens a list of forms. Click the form you want to update to open it.

  3. Click Design to open design mode.
  4. Add a subform widget, or select an existing subform.

    The properties for the comfill appear in the properties view.

  5. Specify the database field to access in the Value text box of the Input property.
  6. Specify the name of the form you want to display when the user hovers over the comfill in the Subform Format field.
  7. Specify the virtual join field to associate with the comfill in the Subform Input field.
  8. Mark the Subform Enabled checkbox.
  9. Click Web Preview to see what the form will look like in the Web client.
  10. Click OK to see what the form will look like in the Windows client.
  11. Click OK to save your changes.
  12. Open the form using Database Manager to test your changes:
    1. Click Tailoring > Database Manager
    2. Click Search.

      Service Manager opens a list of forms.

    3. Click the form you just created to open it.

Sort the data in a subform

Applies to User roles: System Administrator

You can configure the default sort order of the data that is displayed in a subform. To do this, configure the following two drop-down lists in the Link form of the subform:

  • Sort Field(To/Target)
    Sets the field by which the subform is sorted
  • Sort Order(To/Target)
    Sets the order in which the field is sorted

Note  

  • If multiple links are defined for a field in the Link file of the subform, you must use the first link to define the default sort field and sort order.
  • You cannot sort array fields in Service Manager 9.32. Therefore, you should not configure an array field as the default sort field.
  • You may experience slow performance if you configure a long text field (for example, the Description field) as the default sort field.

Related concepts

Form creation
Forms Designer
Using pop-ups
Using the drawing canvas

Access Forms Designer
Create a form using the Form Wizard
Update a form

Forms Designer controls and tools
Comfill control
Subform control