Pre-Population of New Form
Copyright © 2019 EarthSoft, Inc • Modified: 31 May 2019
This article describes the process of pre-populating forms with data to be available on the Collect Mobile application. Pre-population of data can be added to any template. Select a data mapping template that will be used to create the data. Link a user report with the desired data to the template and map data to the fields available in the template.
Select the Pre Population button in the Form Template Layout window to open the Pre Population dialog. Click the Select Report button to open the Report Chooser and select the desired report. In the image below, the user report "Collect - Field EDD" was selected.
The available report tables are displayed. Select a table to open the Data Mapping window and map data as needed. See the Data Mapping article for details on the data mapping process. Tables that contain pre-population data mappings are highlighted in blue to be easily discernible.
The Clear button can be used to clear all pre-population data mappings.
Note: When populating child form data using the #parent_#id field identifier in a pre-populated mapping, if the parent form does not exist or the #parent_#id field is not defined as a key, the mapper can not create the child row.
When creating a pre-population template, be sure to setup child form population as a linked mapping to the parent form population so that the parent form record is created before the child form record and also make sure the #parent_#id is a key field.
As an example, the following steps demonstrate how to use this feature to pre-populate monitoring locations into a Collect template and form.
1.Create a template. For this example, a Water Level template has been created with the following fields:
2.Create a user report form using the Location Information report from either EQuIS Professional or Enterprise. In this example, a springfield_locations user report was created in EQuIS Professional.
3.In the Form Template Layout page, click on the Pre Population button to open the Pre Population dialog box.
4.Click the Select Report button to open the Report Chooser and select the desired report. In this example, the user report "springfield_locations" is selected. Click OK.
5.On the Parameters dialog box, click the LOAD button to load the report parameters. Click OK.
6.The mapping between the report and template can now be performed. Click on the report table to be mapped. In this example, the report table is V54_Location_info. On the mapping form, select the Target Form from the template and click Add Mapping.
7.Click Add Field and select a field from the form and a value from the report. Extra fields can be added, but in this example, only the SYS_LOC_CODE is added. The example data mapping is show below.
8.On the Forms page, create a new form. In this example, the new form is created using the Water Levels template and titled demo_prepopulation. The User Report button can be used to open a specific user report and add extra filters. In this example, only B-30 and B-31 are selected from the location list. Click OK and Save. Note that the form is now pre-populated with the specific report data.
9.The new form with the pre-populated data will be available for download on a mobile device. In this example, the form demo_prepopulation has two records pre-populated with locations B-30 and B-31.