<< Click to Display Table of Contents >> Navigation: Enterprise > Widgets > Web Forms > Web Forms Configuration > Web Forms Filtering |
To facilitate easier data entry, the Web Forms widget can be configured to filter the content of forms and subforms within a Collect template by a single field (e.g., Location). The Collect template must contain a "Filter Form" with the field that will be used to apply the filtering. For example, when entering drilling and laboratory data for a geotechnical borehole, the user would select/enter the borehole ID into the Filter Form field and the subsequent tabs (forms) would only display records for that borehole location. After the user clears the location ID from the filter field, all records will display in the data form.
A Collect geotechnical template is designed with a "Location Filter" form used to filter many geotechnical laboratory test data forms. The database has also been configured to use the "Location" field on the "Location Filter" form to restrict the display and data entry for designated laboratory test data forms (see Configuration section below). A Data Form based on this template has been created in the Web Forms widget.
Three boreholes have been added to the data form in the Web Forms Grid Entry screen.
The user selects the "Location Filter" tab and then clicks the drop-down for the Location field. The three borehole IDs are available in the drop-down. The user chooses B-2.
The user then selects the "Atterberg - D4318" tab. Only records for B-2 will be displayed. If the user adds new record(s), the Location field will automatically be populated with "B-2".
If the user selects the "Location Filter" tab and clears the Location field drop-down, then all records will display in any of the associated laboratory test data forms.
EQuIS system and reference table entries are used to enable form filtering during data entry in the Web Forms widget. Configuration of the filtering functionality is specific to each Collect template with information added to the RT_GROUP and RT_GROUP_MEMBER tables. Records must be added to the ST_GROUP_TYPE, RT_GROUP, and RT_GROUP_MEMBER tables as described below.
For the forms filtering to work, GROUP_TYPE = collect_webforms_filter must be added to the ST_GROUP_TYPE table. Add an appropriate description.
In the RT_GROUP table, create a new group for each desired Collect template by defining the following fields:
•GROUP_CODE: [User defined] – The GROUP_CODE should help identify which Collect template is being used.
•GROUP_TYPE: Must be “collect_webforms_filter”.
•GROUP_DESC: [User defined]
•GROUP_OWNER: [ID of the Collect template] – This is found in ST_COLLECT_FORMS.COLLECT_FORMS_ID.
•FACILITY_ID: Must be blank to ensure usage in all facilities. Can be facility specific for a facility-specific Collect Template.
For each GROUP_CODE defined in the RT_GROUP table (i.e., a specific Collect template), a record will need to be added to the RT_GROUP_MEMBER table for the form that will be the filter and each form that will be filtered. Define each record as follows:
•GROUP_CODE: [User defined] – Must match the GROUP_CODE in the RT_GROUP table.
•MEMBER_CODE: [Template form name] – Form name in the template that will either be the filter or will be filtered. This is case sensitive (i.e., must exactly match form name as defined in the template).
•REPORT_ORDER: [“-1” or "1"] – Defines which form is being used to filter and which forms will be filtered.
•Filter Form: “-1” defines that this is the form used to filter
•Forms that will be filtered: “1” defines that this form will be filtered by the other defined form
•REMARK: [Field name] – Defines the field that will be the filter or be used to filter the form (e.g., Location). This is case sensitive (i.e., must exactly match field name as defined in the form).
Copyright © 2023 EarthSoft, Inc • Modified: 30 Mar 2023