Publish the inspection layer

As a public works officer, you manage geographic data on hydrants in Naperville in addition to tables for inspection information and observed violations. First, you'll relate the hydrants layer to the inspection tables using a relationship class, so information added to the tables is automatically associated with the hydrants. Then, you'll publish your layer from ArcGIS Pro to ArcGIS Online to share with your workforce.

Download and explore the data

First, you'll download the hydrant inspection data and familiarize yourself with its contents.

  1. Open ArcGIS Pro.
  2. If prompted, sign in using your licensed ArcGIS account.
    Note:

    If you don't have access to ArcGIS Pro or an ArcGIS organizational account, see options for software access.

    ArcGIS Pro opens. It contains a list of project templates under the heading Blank Templates. If you've created a project before, it'll include a list of recent projects under the heading Recent Projects.

  3. Under Blank Templates, click Catalog.

    Choose the Catalog template

    The Catalog template creates a project with no maps associated. This option is best if you're planning to open an existing map.

  4. In the Create a New Project window, name the project Hydrant Inspections.

    By default, the project is saved to the ArcGIS folder, located in the Documents folder on your computer's C drive. To save the project elsewhere, browse to a different location.

  5. Make sure the Create a new folder for this project box is checked and click OK.

    Create a new project

    The project opens and displays the Catalog view. In this view, you can manage and browse data.

    Default project view

    Now you'll begin adding data for your project. The hydrant data you already have is shared with you in ArcGIS Online. You'll search for and load this data in ArcGIS Pro.

  6. In the Catalog pane, click Portal and click ArcGIS Online. In the search box, type hydrant inspection owner:Learn_ArcGIS and press Enter.

    Search

    Tip:

    If you've used ArcGIS Pro before, your interface may be arranged differently. If necessary, open the Catalog pane by clicking the View tab and in the Windows group, click Catalog Pane.

    Note:

    If your organization doesn't allow you to search outside of it, you won't get results. You'll need to go to the ArcGIS Online group Manage a Mobile Workforce and download the Hydrant Inspection Data map package by Learn_ArcGIS. In your blank project in ArcGIS Pro, on the Insert tab, in the Project group, click Import Map and browse to the downloaded file.

  7. Right-click the Hydrant Inspection Data search result and choose Add and Open.

    Add and open the Hydrant Inspection Data package

    The map package is downloaded and extracted to a geodatabase. A map tab named Layers is added to the project. It has one layer, Hydrants, and two stand-alone tables, Inspections and Violations, that are in the map package. The Hydrants layer is a point layer showing hydrant locations in Naperville, Illinois. The tables are for hydrant inspections and for violations observed during inspections. You'll explore the data in more detail before proceeding.

    Tip:

    If you don't see hydrants on the map, right-click the Hydrants layer and choose Zoom to Make Visible.

  8. In the Contents pane, right-click the Hydrants layer and choose Attribute Table.

    Attribute Table

    The attribute table opens. It contains information about each hydrant, such as its unique facility identification number, its flow rate, and whether it is operable.

  9. Close the attribute table. In the Contents pane, right-click the Inspections table and choose Open.

    The Inspections table only has field names. There is no data because there have been no inspections. The fields indicate the common elements an inspector checks, such as water pressure and necessary maintenance. There is also a field for the hydrant's unique facility identification number.

  10. Close the Inspections table and open the Violations table.

    Like the Inspections table, the Violations table is empty except for field names.

  11. Close the Violations table.

    Each hydrant may have multiple inspections over time, and each inspection may uncover multiple violations. These relationships can be managed in ArcGIS Pro using relationship classes. A relationship class contains properties that define how objects in one item relate to objects in another item. The map package you opened already contains one relationship class, which you can find in the geodatabase where the data is stored.

  12. In the Contents pane, right-click the Hydrants layer and choose Properties.
  13. In the Layer Properties: Hydrants window, click Source to see the path to the geodatabase created for the map package. Click the Data Source drop-down menu and point to the Database column. Select the file path up to the name of the geodatabase (shown in the image below), press Ctrl+C to copy it, and click OK.

    Database path

    By default, the package is downloaded to Documents\ArcGIS\Packages in a folder starting with HydrantInspectionData. Inside that folder, the v103 folder contains the geodatabase. You'll copy the folder path through v103, for example, C:\Users\YourName\Documents\ArcGIS\Packages\HydrantInspectionData_8C75EB5F-53B1-455E-AB22-D6450E1A88EC\v103.

  14. On the ribbon, click the Insert tab. In the Project group, click Connections, point to Database, and click Add Database.

    Add a connection to a database

  15. In the Select Existing Geodatabase window, paste (or browse to) the folder where the geodatabase was created for the map package. Select hydrantinspections.gdb and click OK.
  16. In the Catalog pane, click the Project tab, expand the Databases section, and expand the hydrantinspections geodatabase.

    hydrantinspections database

    The geodatabase contains four items: the layers and tables you explored earlier, and a relationship class called InspectionToViolations. As the name indicates, it establishes a relationship between the Inspections table and the Violations table. The tables can be managed individually while remaining related. In ArcGIS Field Maps, these relationships can be used to display related data automatically.

Create a relationship class

The geodatabase already includes a relationship class between the Inspections and Violations tables. You also want to relate the Hydrants layer to the Inspections table. That way, information about inspections can be accessed by selecting individual hydrants.

  1. In the Catalog pane, right-click the hydrantinspections geodatabase, point to New, and choose Relationship Class.

    New relationship class

    The Create Relationship Class geoprocessing tool opens in the Geoprocessing pane. In this pane, you'll set the parameters of the relationship class.

  2. For the Origin Table, click the drop-down arrow and choose Hydrants. For the Destination Table, choose Inspections.
  3. Next to Output Relationship Class, click Browse.
    Browse for Output Relationship Class

    The Output Relationship Class window appears.

  4. Under Project, click the Databases folder and double-click the hydrantinspections geodatabase. For Name, type HydrantToInspections.
    Note:

    You cannot use spaces when naming relationship classes.

    Output Relationship Class dialog box

  5. Click Save.
  6. For Cardinality, choose One to many (1:M).

    Cardinality describes how many objects in the origin class can relate to how many objects in the destination class. Relationships can be one to one, one to many, or many to many. Because each hydrant can have many inspections, the cardinality is one to many.

    In the next step, you'll set the attribute field in the origin and destination that the relationship will be based on (called a key field) in order to associate the right hydrant with the right inspection record. You should choose a field that has a unique value for every feature and will have the same value in both the origin and the destination. Generally, an ID field will work. When you looked at the Hydrants and Inspections tables, both tables had a field for the unique facility identification number of the hydrant. You'll use these Facility ID fields as your keys.

  7. If necessary, for the Origin Primary Key field, choose FACILITYID. For the Origin Foreign Key field, choose FACILITYKEY.
    Note:

    The fields have different names here than in the tables because the tables use aliases to make the field names more readable.

    The FACILITYID field contains a unique identification number for each hydrant.

    Create relationship class parameters

  8. Click Run.

    The new relationship class is added to the geodatabase.

    New relationship class is created

    The Hydrants layer and Inspections table are now related. By extension, the Hydrants layer is indirectly related to the Violations table, because the Violations table is already related to the Inspections table. Field Maps supports this kind of relationship nesting up to three levels.

    Before you publish the Hydrants layer and its related tables, you'll confirm the relationship on the map.

  9. Save the project, then exit and restart ArcGIS Pro, and open the project.
  10. On the ribbon, click the Map tab. In the Selection group, click Attributes.

    Attributes pane button

    The Attributes pane opens.

  11. In the Attributes pane, click Select one or more features and click the center of any hydrant on the map to view its attributes.

    Attributes pane

    The Attributes pane shows the attribute data of the selected feature.

  12. Near the top of the Attributes pane, under Hydrants, click the arrow next to the five-digit identifier to expand it.

    Relationships

    The relationships of the feature are listed. Currently, the hydrants only show the name of the table to which they are related. If there were any inspections for that hydrant, you would be able to see them here.

    Note:

    If the arrow does not display, save the project, close and restart ArcGIS Pro, then re-open the project and continue.

  13. Close the Attributes and Geoprocessing panes.
  14. Click anywhere in the white space of the map to clear the selection.
  15. Save the project.

Publish the data

Now that you've created a relationship class, you'll publish the Hydrants layer, as well as the Inspections and Violations tables, to ArcGIS Online. Make sure your related tables are in the table of contents before you publish your layer. That way, both tables will be published along with the Hydrants layer.

  1. In the Contents pane, right-click the map (titled Layers) and click Properties.
  2. In the Map Properties window, on the General tab, ensure the Allow assignment of unique numeric IDs for sharing web layers box is checked.

    Check ox to allow assignment for web layers.

    To publish your data, you must allow the assignment of unique numeric IDs.

  3. Click OK.
  4. In the Contents pane, click Hydrants.
  5. On the Share tab, in the Share As group, click Web Layer.

    Share As Web Layer

    The Share As Web Layer pane opens. You can use this pane to set the parameters of your web layer before you publish it. You'll want to make sure your web layer is published with feature access instead of tiled mapping in order to preserve the individual hydrant features. You'll also confirm that editing is enabled so your mobile workers can edit the layer.

  6. For Name, type Hydrants and add your name at the end (use underscores; spaces are prohibited in the name).
    Note:

    The name must be unique within your organization. If you use a name that someone else in the organization has already used, you'll receive an error message.

  7. Verify that Layer Type is set to Feature.
  8. Near the top of the Share As Web Layer pane, click Configuration.
  9. Under Layer(s), next to Feature, click Configure Web Layer Properties.

    Configure Web Layer Properties button

  10. Under Operations, check Enable editing and allow editors to and Enable sync. Verify that Add, Delete, and Update are selected.

    Share As Web Layer Configuration tab

    Checking these boxes allows mobile workers to edit the features (including the table data) of your published feature class.

  11. Click Publish.

    Publish

    Messages along the bottom of the panel show the publishing status. After a minute or two, a message tells you the web layer has been published successfully.

    Tip:

    It's recommended that you click Analyze before publishing a web layer. This gives you a chance to view and resolve warnings and errors that may impact the publication process.

  12. Close the Share As Web Layer pane.
  13. Save the project and close ArcGIS Pro.

You've downloaded your hydrant data and the tables for inspections and violations. You also related those tables to the hydrants using relationship classes. After that, you published the layer and the tables to ArcGIS Online.


Create a map for inspections

Previously, you published a layer for fire hydrant inspections to ArcGIS Online. Next, you'll add that layer to a web map. Then, you'll configure the layer's pop-up so mobile workers have access to important inspection information. You'll share your layer and map so mobile workers can access them. Finally, you'll configure the forms that workers will use when performing hydrant inspections.

Add the layer to a map

Before you can send the field crew to inspect hydrants, you need to add your hydrants layer to a web map.

  1. If necessary, sign in to your ArcGIS organizational account.
  2. At the top of your organization's home page, click Content.

    When viewing your content, the My Content tab includes two items titled Hydrants with your name. One is a service definition that contains the drawing specifications for your published service. The other is a feature layer you can add to a map.

  3. Click the title of your Hydrants feature layer to view its item page.

    Open item page

    On the item page, you'll see the information about the layer, including the summary you provided when publishing the layer in the previous section.

  4. Click Open in Map Viewer.

    Open in Map Viewer

    A map containing the layer opens. Zoom to the Hydrants layer if necessary.

    Default map

    Note:

    Your default extent may differ from the example depending on your monitor size and resolution.

    There is one layer in the Layers pane: the Hydrants_yourname layer.

  5. Point to your Hydrants layer. Click Options and choose Rename.

    Rename layer

  6. Rename the layer Hydrants and click OK.
  7. On the Contents (dark) toolbar, click Tables.

    There are two tables in the Tables pane: Hydrants yourname - Inspections and Hydrants yourname - Violations.

  8. In the same way you renamed the hydrants layer, rename the Hydrants yourname - Inspections table to Inspections and rename the Hydrants yourname - Violations table to Violations.

    Rename tables

Configure the layer's pop-up

Next, you'll configure the pop-up of the Hydrants layer to show data from the Inspections table.

  1. Zoom in on the map so individual hydrant features become distinguishable. Click any hydrant to view its pop-up.

    Default pop-up

    The pop-up shows the attribute information for the Hydrants layer. The formatting is okay, but there's some information mobile workers won't need to see.

  2. Close the pop-up.
  3. In the Layers pane, click the Hydrants layer.
  4. On the Settings (light) toolbar, click Pop-ups.

    The Pop-ups pane appears.

    Pop-ups pane
  5. Click Title, and type Facility ID: (including the trailing space) before the field value to give it context.

    Pop-up title

  6. Click Fields list and remove the OBJECTID and GlobalID fields.

    Configure Attributes

  7. Click any hydrant to view its updated pop-up.

    Customized pop-up

Save and share the map

Now that you've created the map, you'll save and share it. To ensure you only share it with your mobile workforce, you'll create a group to which you can invite specific members.

  1. On the Contents toolbar, click Save and open and choose Save As.

    Save As

  2. For Title, type Hydrant Inspections and Violations.
  3. For Tags, type hydrants, inspections, violations, Naperville, and Illinois.
  4. For Summary, type A map of fire hydrants and hydrant inspection information in Naperville, Illinois.

    Save Map

  5. Click Save.

    The name change is reflected on the map. Now that your map is saved, you'll share it with your workforce. First, you'll exit the map and create a group. Groups allow you to choose who sees the group's content, so you can ensure only your workforce has access to the information.

  6. At the top of the map, click the Home menu and choose Groups.

    Home menu

    The Groups page opens, which shows the groups (if any) of which you are a member.

  7. Click Create group.

    Create group

    A new page opens, allowing you to set the parameters of your group.

  8. Name your group Naperville Hydrant Inspectors. For the summary, type Content for hydrant inspectors in Naperville, Illinois. Add search tags that describe the group's content and geography, like the ones you used for the map.

    Group Details

    Tip:

    Optionally, you can drag or upload a thumbnail image. Logos or crests of the town or department with which the group is associated are good options for thumbnails.

  9. For Who can view this group, click Only group members.

    Who can view this group

    By making your group private, only users you invite can join and view the group's content. Accept the default for the remaining questions.

  10. At the bottom of the page, click Save.

    The group is created. It has no items and no members other than you. If you want to invite members to the group, click Invite Users at the top of the page.

    Tip:

    If using ArcGIS Online, you can invite members from both inside and outside your ArcGIS Online organization. As long as your mobile workers have ArcGIS Online accounts, you can invite them to your group.

    Next, you'll share your web map with the members of the group.

  11. On the blue ribbon, click the Content tab.
  12. Click Add items to group.

    Add items to group

  13. In the Add items to group window, check the boxes for the Hydrant Inspections and Violations web map and the Hydrants_YN feature layer.

    Select items to add to group

  14. Click Add Items.
  15. In the Content pane, for the Hydrant Inspections and Violations web map and the Hydrants_yourname feature layer, click the Sharing level: Owner and shared with groups button.

    Share items with group

  16. On the ribbon, click Overview.

    Verify group details and content

  17. In the Overview pane, verify the group details and recently added content.

    The Hydrant Inspections and Violations web map title and Hydrants layer are now accessible through the group.

Configure the forms

Next, you'll configure the forms mobile workers will use when performing hydrant inspections using the Field Maps Field Maps Designer web app.

  1. In the Overview pane, click the Hydrant Inspections and Violations web map to open the item details page.
  2. Click Open in Field Maps Designer.

    Open in Field Maps Designer button

    The map's Overview page opens in the Field Maps Designer web app.

  3. Click Forms to open the Forms page.

    Content button

  4. Expand Tables and click the Inspections table.

    Inspections table

    The blank form canvas opens. This is where you'll configure the form that mobile workers use when performing inspections in the Field Maps mobile app.

    Form builder and Fields list

  5. On the Form builder, scroll down to the Fields list.

    Fields list

    The Fields list shows all the fields that can be used as form elements in the form. For this exercise, it includes the fields contained in the inspections table.

    Tip:

    While this tutorial uses existing fields to build the form, you can also build the form by adding new form elements. When form elements are added to the form, they are also added as fields to the layer. To learn how to build forms with form elements, see the Build forms in ArcGIS Field Maps blog post.

  6. To organize the form, drag a Group form elements onto the form canvas.

    Add groups to the form

  7. Click the first group element.

    The Properties pane appears.

  8. In Display name, type Inspector information.
  9. Repeat steps 6 and 7 for the other group element, naming it Hydrant information.

    Add display names for each group.

  10. From the Form builder, drag the Inspector and Inspection Date fields into the Inspector information group.
  11. Drag the 12 remaining fields into the Hydrant information group.
    Note:

    You can drag fields one at a time, or press Ctrl and click to select multiple fields and drag them all of them at once. Your form should match the image below.

    Add fields to the form.

  12. Click the title of the form to edit it.

    The Properties pane appears.

  13. In the Properties pane for the Form title, type Hydrant inspection:.
  14. Click the Add field { } button and add the Facility ID field to the form title.

    Edit the form title.

  15. On the survey, in the Inspector information group, click the Inspector form element.

    The Properties pane appears.

  16. In the Properties pane, for Display name, type Inspector Name.
  17. Check the Required checkbox.

    Require Inspector Name

  18. In the Hydrant information group on the form, click the Chains Req'd? field.
  19. In the Properties pane, click the drop-down menu for Input type and choose Switch.

    Switch input type

    This allows mobile workers to use a switch in the form to provide a yes or no value. You have the option to edit the switch values, but for this tutorial keep them as yes or no.

  20. Repeat steps 17 and 18 for the following fields: Paint Req'd?, Marker Req'd?, Lubrication Req'd?, Stamped?, Greased?, and Drain?.
  21. Click the NOTES field.
  22. In the Properties pane, change the Display name to Provide additional notes.
  23. Change the Input type to Text - Multiline.

    The form preview shows what the form will look like in the Field Maps mobile app. The form should look like the following:

    Completed form.
  24. Click Save to map to save the form.

    Save the form

    When mobile workers perform hydrant inspections in the mobile app, this form will appear. Next, you'll create the form used for hydrant violations.

  25. From the Forms pane, under Tables, click the Violations table.

    The blank form canvas opens.

    Blank form canvas

    The violations table is simpler than the inspections table, so you'll convert the existing pop-up to configure the form instead of building it using the Fields list.

  26. In the center of the form canvas, click Convert pop-up.

    Convert pop-up

    The pop-up for the violations table is converted into a form.

  27. Click the title and in front of the text, add Violations.

    Violations form

    The title is updated.

  28. Click Save to save the form.

You've created a web map to collect inspection records, shared the map with your mobile workforce, and configured the forms used to complete hydrant inspections.


Inspect a hydrant

Previously, you created a map to collect hydrant inspection information. Next, you'll use ArcGIS Field Maps to test how your map functions in the field by adding an inspection and a violation to a hydrant feature.

Open the map in ArcGIS Field Maps

ArcGIS Field Maps allows you to remotely edit data in a shared map. Because it can be accessed from a mobile device, mobile workers can input the results of their on-site inspections directly into your GIS, eliminating pen and paper from the process. First, you'll download and open Field Maps and open the Hydrant Inspections and Violations map.

  1. Open ArcGIS Field Maps on your Android or iOS device.
    Note:

    If you don't have the Field Maps mobile app, you can download it for free from the App Store or Google Play.

  2. If you aren't signed in, sign in to your ArcGIS organizational account.

    After you sign in, the Maps list appears. If you only have a few maps, the Hydrant Inspections and Violations map may be easy to locate in the list. If you have many maps, it may be more difficult. In case the map is not easy to locate, you'll access the map through the Naperville Hydrant Inspectors group.

    Note:

    Your experience may differ depending on whether you use the Android or iOS version of Field Maps. The steps and images here are for Field Maps on an iPhone.

  3. Scroll to the bottom of the Maps list and find the Groups section. Tap Naperville Hydrant Inspectors.

    Groups

    A list of maps shared with the group opens. Only the Hydrant Inspections and Violations map is in the group, so it is the only map listed.

    Maps in the Naperville Hydrant Inspectors group

  4. Tap the map to open it.

    If you have location services turned on, the map opens to your current location, regardless of the map content. You're probably not in Naperville, so you'll navigate there.

  5. Tap the Search button.
  6. Type Naperville in the search bar and tap Search.

    Search results

    Naperville, Illinois, is the first search result.

  7. Tap the result for Naperville to zoom to the center of the city.

    Naperville, Illinois

  8. In the panel at the bottom of the map, tap the close button to close the search results and tap Cancel in the search panel to close it.

Add an inspection to a hydrant

Now that you've opened your map and navigated to Naperville, you'll perform a mock inspection of a hydrant.

  1. Tap any hydrant on the map.

    The tapped hydrant is selected on the map. A panel opens, showing the pop-up information you configured for the hydrant layer.

    Hydrant feature

  2. Swipe up on the panel to view more of the hydrant's details.

    Details of the hydrant

    The details include the information in the feature's attributes and actions you can take with the feature. Below the attribute information and before the actions is a section titled Related that includes inspections.

  3. Tap Inspections to view existing related inspection records or create new ones.

    Inspections

    The panel shows a button to add an inspection as well as a list of inspections related to the hydrant you've selected. Since there aren't any inspections yet, none are listed.

  4. Tap Add.

    The Inspections form you configured in the Field Maps web app opens and its title includes the ID for the hydrant you selected. Swipe up to view the form in full screen.

    Inspections form

  5. Tap the Pressure (PSI) field.

    The field becomes editable.

  6. Enter a value of 60 (a standard PSI value for fire hydrants) and tap Done.
  7. Add data to the other fields and turn switches on or off. (You may have to scroll down to see some of the fields, including Provide additional notes.) Be sure to add your name to the Inspector Name field, since it's required.

    Completed inspection

    This is a test, so the values you add aren't important. Most fields require only a yes or no.

  8. Tap Submit to send the updates.
    Note:

    For Android users, tap the checkmark button to send the updates.

    You return to the map. The hydrant feature is still selected and the new inspection form is displayed.

    Inspection added to the hydrant

  9. Close the inspection form and close the Inspections panel to see the hydrant's details again. Scroll down to the Related section and tap Inspections to view the inspections on the hydrant.

    The inspection appears as part of a list, marked by its date. If you add more inspections, they will be organized chronologically.

    Recent inspection shows in the inspections list

Add a violation to your inspection

You published your hydrants layer to also include a table for violations observed during inspections. The Violations table does not have a direct relationship to the Hydrants layer, but it is indirectly related to it through the Inspections table. Next, you'll add a test violation to the hydrant.

  1. On the list of the hydrant's inspections, tap the inspection you just added.

    Recent inspection

    The inspection's form and available actions display in the panel. All of the values you entered for the inspection are shown. Below the attribute information and before the actions is a section titled Related that includes violations.

  2. Tap Violations to view existing related violation records or create new ones.

    Violations

    The panel shows a button to add a violation as well as a list of violations related to the inspection you've tapped. Since there aren't any violations yet, none are listed.

  3. Tap Add.

    The Violations form you configured in the Field Maps web app opens.

  4. Fill out the four fields (it doesn't matter what you enter).

    Violations form

  5. Tap Submit.
    Note:

    For Android users, tap the checkmark button to submit the violation.

    You see the new violation as well as information about the inspection and the hydrant to which it is related.

In this tutorial, you converted a fire hydrant inspection process from a paper form to a digital one. First, you created a relationship class between a layer of fire hydrants in Naperville, Illinois, and an empty table with fields for inspection data. Then, you published the layer to ArcGIS Online and used it to create a web map. You then used the Field Maps web app to configure the forms for inspections and violations. Finally, you opened the web map in the Field Maps mobile app and added a test inspection and violation. The inspection you added was automatically updated to the web map. You can access the data through both Field Maps and the original web map in your ArcGIS organization.

You can find more tutorials in the tutorial gallery.