Survey123 for ArcGIS is limited to creating only one geometry record for each survey submitted, when attempting to publish a survey with more than one geometry, for instance multiple geopoints or moisture of polygons and points in the same survey, the following error is returned:
Consider the following scenario…
It is necessary to record details of properties in a neighborhood. For this use case, we need to collect the boundary of the parcel, the footprint of the building and the location of the main water taps in the property to measure the water consumption.
To map this case we will start defining the main parcel:
This configuration allows the capture of the parcel boundaries, to capture the footprint of the building we need to add another geoshape that we are going to call building:
The problem with this configuration is that the two (2) geoshapes configured in the same survey, will show this error when trying to publish the survey:
To better understand the issue, let’s take a look on the schema generated by the survey:
Both geoshapes are in the same table which is not possible in the general architecture of the geodatabase. To resolve the issue it is necessary to divide the tables. This is done in Survey123 using the repeat feature.
Repeats are like sub-forms meaning that can be considered like a form within a form that can also be completed multiple times. To add a repeat to our form we need to enclose a set of questions within a begin repeat and end repeat set, as shown below:
The inclusion of the repeat creates a new table (layer) associated with the form that will contain the details of the building, the schema now includes the new table with the geoshape (footprint) and other attributes.
The schema below shows the main layer of the feature service named “MultiGeometry” and an associated layer “rptBuilding” that contains the footprint of the building and the attribute defined.
Survey123 repeats are modeled in ArcGIS as related tables (or related layers if your repeat includes a geopoint, geoshape or geotrace question). In the example of the multigeometry survey above, the information about the parcel is kept in the main layer of a feature service, and the data from the building (footprint, building type) is modeled as a separate, but related table. The relationship between the tables/layers is kept through internally created global IDs.
Additionally we can use the “repeat_count” row in the XLSForm to control how many records must exist within a repeat. In our example, if we set the value for the repeat_count to two (2), the survey will initialize the repeat with 2 empty records.
Now let’s add the points for the water taps as another repeat section in the survey.
The form we just created will allow us to capture the required information about the properties. The final result is displayed in the following image which displays the three (3) linked layers: MultiGeometry, Building Details, and Water taps in the property.