Adding Sub-Form Fields

The Sub-Form field type allows you to embed a predefined sub-form in an application. Any configuration administrator can use a sub-form in any application. Sub-forms collect data within individual records and display the data in a scrollable grid. Each time a user adds or edits a record in an application, the user can make an entry in the sub-form and view entries that other users have made. For example, if an application contains a sub-form designed to collect user comments, each user who accesses a record in the application can submit a comment in the sub-form and view comments submitted by other users.

To add a sub-form field in an application, you must first create the sub-form that you want to include in the application. After creating the sub-form, you can then select it for an application though the sub-form field.

You can add a sub-form field to an application or questionnaire.

Task 1: Create the field

  1. From your application, go to Designer tab > Layout tab > Objects panel > click Add new.
  2. Select a field type from the drop-down list, enter a name for the field.
  3. Field name guidelines:

    • If possible, keep names under 20 characters. For example, use Description instead of Description of the Asset.
    • Capitalize the first letter of each word in the field name. For example, use Predicted Impact instead of Predicted impact.
    • Avoid redundant wording in field names. For example, using the word Asset is unnecessary in the following series of fields: Asset Name, Asset Type and Asset Value.
    • Use noun-based field names whenever possible. Avoid verb-based field names, for example, Set Asset Name.
    • Do not use the names: Version, Level ID, or Content ID for fields that you add to an application or questionnaire. Field do not display properly with these names.
  4. Select a sub-form from the drop-down list and click OK.
  5. In the General Information section, enter a description.
  6. Note: When you save the field, the system strips any HTML tags <xml>, <form>, <textarea>, <option>, <select>, <meta>, and <body> that you may have inserted in the description because they may constitute vulnerabilities in the system. The following example shows how you can correct the cascading style sheet (CSS) syntax for the <body> tag so that it will function correctly:

    <html>
    <head>
    <style type="text/css">.c0 { font-family: 'Arial' } .c1 { margin: 0px; background-color: #ffe4e1 } </style>
    </head>
    <body class="c0">
    <p class="c1">This is a text field.</p>
    </body>
    </html>

    Note: Do not use absolute positioning in HTML content.

Task 2: Configure options

In the Options section, select all of the following options that apply to this field.

Option

Description

Make this a required field

Designates the field as required and forces users to enter a value when adding or editing a record in the application. An icon indicates required fields to alert users that they must enter a value.

Display last modified data

Displays the date and time of the field’s last update, and the name of the person who made the change.

Make this a searchable field

Makes this field available for display in all search results.

Display this field in global search results

Makes this field available for display in global search results. This option is only available if this field is set as searchable.

Add records in the referenced sub-form from View mode

Determines whether the grid displays the Add New link to allow users to add new records to the related applications from a record in View mode. Users will not have to open a record in Edit mode to create new related records. If a user does not have rights to create records in the related application, the grid does not display the link for that user.

When a user creates a new related record from View mode, that record is selected in the cross-reference field just as it would if it were created from edit mode.

For example, if a user opens a Vendor record in View mode and creates a record in the related Audits application by clicking Add New in the cross-reference field, that new Audit record will be selected in the cross-reference field of the Vendor record, even though the user did not open the Vendor record for editing.

Validate this field when any value changes in the record

Designates that a field is validated whenever any value changes in a record.

If this option is not selected, this field validates only when the value in this field has changed.

Task 3: Determine how the field displays

In the Grid Display Properties section, select how you want the field to display in the record.

Option

Description

Display Fields

In the Display Fields list, you can define the fields of data that display in the Sub-Form field grid of sub-form records.

Sorting

The Primary and Secondary sort options allow you to configure the sorting order of the displayed records.

  1. From the Primary Sort and Secondary Sort lists, select the fields to sort.

  2. Select to sort the fields in ascending or descending order.

Task 4: Set configuration options

In the Configuration section, set the following options:

Option

Description

Minimum selections

Specifies the minimum number of required selections of users or groups for the Dropdown, Checkboxes, Listbox, and Values Popup display control options.

Maximum selections

Specifies the maximum number of required selections of users or groups for the Dropdown, Checkboxes, Listbox, and Values Popup display control options.

Default records display

Determines the number of cross-referenced records that the grid displays. If this option is selected, the grid displays only the first designated number of records. For example, when this option is set to 10, the grid displays only the first 10 records. If the number of records exceeds the default display number, the grid displays a View All link that allows users to view all of the associated records.

Field edit settings

Specifies whether users can edit and delete all records or only the records that they entered in the sub-form field.

Option

Description

Edit Own Records

Allows users to edit or delete entries that they have made in the sub-form field.

Edit All Records

Allow users to edit or delete any entry in the sub-form field, regardless of who enter it.

Field administrators

Designates specific users and groups as field administrators for the sub-form or voting field. These specific users and groups can edit and delete any entry made in the field.

To select the users and groups, from the Field Administrators list, click , and then select the users and groups that you want to designate as field administrators for the sub-form field.

The create, read, update, and delete rights available to a field administrator are dependent on the rights that are in place for the parent object, such as an application or a questionnaire.

If the parent object has only create and read rights, for example, the sub-form field in that object is restricted to those same rights.

Task 5: Configure help text

Field-level help provides additional guidelines and instructions to ensure users enter appropriate information in the field. This Help text displays for users when they add, edit, and view records in the application where the field resides.

Consider the following general guidelines when writing field-level Help:

  • Use short, concise instructions that direct the user to take a specific action. For example, "Enter your name" is preferable to "This field is used to enter your name."
  • Use complete sentences whenever possible.
  • Avoid jargon (unless terms are critical and are familiar to your users).
  • Consider the technical aptitude of your audience, and author your help text at a corresponding level.
  • Use “you” and “your” as if you are speaking directly to the user.
  • Consider posing Help text in the form of a question, for example, "What is your level of interest?"

In the Help text section, do the following:

  1. Select a display option for both edit and view modes.
  2. Option

    Description

    None

    Help text does not display.

    Tooltip Icon

    Help icon displays beside the field in edit and view modes. Click this icon to display the field Help. The application dynamically sizes of the Help box based on the number of characters in the text.

    Field information on help icon hover

    Below

    Help displays below the field in edit and view modes.

    Field information below field

  3. If you are using help text, use the Rich Text Editor to format the text as needed.

Task 6: Configure field access

Access rights determine whether all users or only select users or groups have access to the field.

In the Access section, do the following:

  1. Select Public or Private.
  2. Note: Key fields must be public.

  3. If you selected Private, maximize the pane and click Add to select the users and groups to whom you want to grant access.