Configuring a Summary Description Formula

The Summary Description Formula field allows the user to specify a formula that will dynamically populate a label composed of information in a submission. This allows the user to see a summary of the most important information on a submission without having to open the submission for viewing.

The Summary Description formula is configured on the Component Types lookup edit screen for program component forms, and on the Form Details screen for all other form types.

The text composed by the formula displays on different screens depending on the type of form:

  • for Program Component forms, the summary label is displayed in the Summary column of a program components list screen (for example, on the Site Details > Program Components list page)

  • for all other forms (Applications, Service Requests, Complaints, etc.), the summary label, if configured, is displayed on the following screens:

    • Submissions - All,

    • Submissions - Inbox,

    • Submission Detail (right sidebar),

    • Site - Dashboard, and

    • Site - Submissions List

This page describes how to configure this field.

Editing the Summary Description Formula

The Summary Name Formula field configuration for a Component Type is shown below. As mentioned previously, this field is also available on the Form Details screen.

There are three options for configuring this field:

Option #1: Leave field blank

Depending on the display context, leaving the summary name formula field blank will result in one of three behaviors:

  1. Blank label is displayed - This is the case for non-program component submissions shown on the Dashboard, Submissions - All, Submissions- Inbox, Submission Detail, and Site - Submissions screens.

  2. The label and value of the first control on the form is displayed - This is the case for program component list screens. For example, if the first field on the form is "Tank ID" and the value of that field on a particular form is "T-02", the Summary field will display "Tank ID: T-02". Note that this option does not support grid controls. So if the first field on a form is a grid control (i.e., a table), one of the two options listed below should be used instead.

Option #2: Specify a basic custom formula

This option allows the user to create a simple formula consisting of (1) one or more text strings; (2) one or more tags corresponding to fields on the component form; or (3) a combination of both. For example, the user can specify a formula of Outfall ID: `OUTFALL_ID`; Outfall Type: `OUTFALL_TYPE`. Assuming the form contains fields with the tags OUTFALL and OUTFALL_TYPE, containing values of "001" and "Pipe", respectively, this formula would populate the Summary field as follows: "Outfall ID: 001; Outfall Type: Pipe". Note that, to use this formula, text strings should be entered exactly as they should appear, while references to tags should be wrapped in backtick ( ` ) characters.

Option #3: Specify an advanced custom formula

To take advantage of the powerful formula builder available within the nFORM form designer, users can create a formula within a hidden field on the component form and then reference the tag of that field in the Summary Description Formula field. For example, suppose the user would like the Summary field to display a count of all the rows in the Pollutants table on the component form. The basic formula builder described in #2 above does not support aggregate functions like Count(), but the nFORM form builder does. So the user could do the following:

  1. Add a Calculated control to the program component form and check the "Hidden" checkbox. (Or, if the user would like the control to appear on the form, it can be left visible.) For the purposes of this example, assume the user specifies a tag of "POLL_COUNT" for this control.

  2. Add the necessary formula to the control to count the rows in the Pollutants table. For example, this formula counts all the rows in the POLLUTANTS table where the POLLUTANT field is not null: count(lookup(`AIR_POLLUTANTS`.POLLUTANT!=null,`AIR_POLLUTANTS`.POLLUTANT)). Publish the revised form.

  3. Back on the Edit Component Type page, in the Summary Description Formula field, reference the new Calculated control, such as: Number of pollutants: `POLL_COUNT`. If there are three rows in the POLLUTANTS table, this will display "Number of pollutants: 3" in the Summary field on the Program Components list page.

Related pages