ArcGIS Field Maps and Survey123 are some of the most common applications users leverage to digitize their inspection processes. Field Maps makes it easy for users to create and edit new features, while Survey123 is often specifically used to publish surveys that serve as digital inspection forms for those individual features. When used in tandem in this way, the strengths of both applications can be available for users in the field. This means all of the more advanced survey functions – including the ability to use JavaScript – can be retained for Survey123 forms, while the simplicity of creating new features can be retained in Field Maps. This post will explain how to link these applications together, to create one all-in-one Web Map users can access in the field.
Getting Started
Launch ArcGIS Pro. Ensure the user has been assigned the appropriate licenses for accessing the desktop software, as well as the appropriate user type and role for publishing to ArcGIS Online or ArcGIS Enterprise.
Create a feature class representing the authoritative features to be inspected, and a data table representing the inspections that will be performed for each feature. Be sure to create GlobalIDs for each of these layers. Additionally, create a GUID field on the data table (we prefer to name this field “Parent_GUID”) – this field value will match the GlobalID of the related parent feature, establishing the link between the two.
Create a relationship class between the parent feature class, representing the authoritative features, and the child data table, representing the inspections that will be submitted through Survey123.
Be sure to set the Origin Primary Key as the parent feature class GlobalID field and the Origin Foreign Key as the child data table GUID field. This will ensure that the GlobalID from the parent feature will be populated into the GUID field in the child data record.
Ensure the web layers have editing enabled and add them to a new Web Map. This map will be used in ArcGIS Field Maps.
With the layer now set up in ArcGIS Online or ArcGIS Enterprise, the Survey123 form can be created. A previously-created survey can be used, or a new one can be designed around the feature layer. The survey must be created using Survey123 Connect for this process to function properly.
In order to open a Survey123 form tied to a specific feature in ArcGIS Field Maps, a new URL needs to be constructed. The Item ID for the Survey123 form will need to be provided, and the GUID field in the inspection form will need to be mapped to the parent feature GlobalID. The general format of the URL is provided below. Additional fields can be mapped by adding “&field” to the URL.
arcgis-survey123://?itemID=<Survey Item ID>&field:<Inspection Form Field Name>={<Parent Feature Field Name>}
For example, in the following link, the Item ID for the survey is provided and the GUID field is mapped to the GlobalID field. The Name field of the feature layer is also mapped, so it will be auto-populated into the inspection entry once it is created: “arcgis-survey123://?itemID=abcdefghijklmno123456pqrstuvwxyz&field:parent_guid={GlobalID}&field:liftStationName={NAME}”
Once this link is built out, it can be used as a hyperlink for text inside the feature’s pop-up in Field Maps. Using this link will ensure that any inspection created from it will always be tied to the specific parent feature.
Once the web map is shared properly, it will be accessible to users in Field Maps. When users select a feature, the pop-up will now have a link that will take the user to a Survey123 form with the mapped fields prepopulated. The inspection entry will also be related to the parent feature in the map.
Taking it a step further…
To track the progress of inspections, a join layer can be created and then symbolized to show only the most recent inspections.
Navigate to the item page of the hosted feature layer in ArcGIS Online. Click “Create View Layer” and then “Joined view layer”.
Choose the parent feature layer as the Target layer and the child data table as the Join layer. When configuring the join, ensure the Target field of GlobalID is mapped to the Join field of GUID. A one-to-one join operation should be used, keeping only the first matching record, and sorting descending by Inspection Date, or any equivalent field. The resulting joined view layer will only show one inspection record on the data at any given time – and it should be the most recent one.
Once the join layer is created, add it to a web map and use the “New to old” symbology option on the Inspection Date or equivalent field to show which features are most in need of inspection. Alternatively, an ArcGIS Arcade expression can be used to create more specific categories.
Because this layer retains all of the fields from the original layer, the pop-up that leads to Survey123 described in the steps in the previous section can be created in this layer instead, allowing inspection crews to see their inspection progress in real-time.
*Note: The process for creating view layers in ArcGIS Enterprise Referenced Feature Services is more complicated, but can still be accomplished using query views created on the underlying Relational Database Management System of choice.