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 or ArcGIS Enterprise 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 or an ArcGIS Enterprise named user account.

    If you don't have ArcGIS Pro or an ArcGIS account, you can sign up for an ArcGIS free trial.

    This lesson was most recently tested for ArcGIS Pro 2.7. If you're using a different version of ArcGIS Pro, you may receive different results.

    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 drive C. 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 ArgGIS Online. In the search box, type hydrant inspection owner:Learn_ArcGIS and press Enter.



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


    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.


    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 actual data because there have been no inspections yet. 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. Select the folder the geodatabase is stored in (not including the name of the geodatabase), 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 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 Collector, 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, click Inspections.
  3. Next to Output Relationship Class, click Browse.
    Browse for Output Relationship Class

    The Output Relationship Class window opens.

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

    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.

    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. Collector 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.


    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 actual inspections for that hydrant, you would be able to see them here.


    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. 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 or ArcGIS Enterprise. 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, click Hydrants.
  2. 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.

  3. For the web layer name, type Hydrants and add your name at the end (use underscores; spaces are prohibited in the name).

    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.

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

    Configure Web Layer Properties button

  7. Under Operations, check Enable editing and allow editors to and Enable sync. Under Enable editing and allow editors to, verify that Add, update, and delete features is selected.

    Share As Web Layer Configuration tab

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

  8. Click Publish.


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


    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.

  9. Close the Share As Web Layer pane.
  10. 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 or ArcGIS Enterprise.

Create a map for inspections

Previously, you published a layer for fire hydrant inspections to ArcGIS Online or ArcGIS Enterprise. Next, you'll add that layer to a web map. Then, you'll configure the layer's pop-up to show inspections in chronological order. Finally, you'll share your layer and map so your workers can access them.

Add the layer to a map

Before you can send your 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 all your content, the My Content tab includes two items titled Hydrants_yourname. 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 the Hydrants_yourname 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 lesson.

  4. Click the drop-down arrow next to Open in Map Viewer and choose Add to new map.

    Add to new map

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

    Default map


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

    In the Contents pane are four items: the Hydrants yourname layer; the Topographic basemap; and the Inspections and Violations tables. Their layer names are a little confusing, however. You'll change them to something more readable before continuing.

  5. Point to the Hydrants yourname layer. Click More Options and choose Rename.


  6. Rename the layer Hydrants and click OK.
  7. Rename the Hydrants yourname - Inspections table to Inspections. Rename the Hydrants yourname - Violations table to Violations.

Configure the layer's pop-up

Next, you'll configure the pop-up of the Hydrants layer to show data from the Inspections table. You'll adjust the pop-up's sort options so inspections appear in chronological order.

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

    Default pop-up

    The pop-up shows the attribute information of the Hydrants layer. The formatting is good enough, but there is some information your workforce won't need to see. You also want to make sure you can access related inspections for each hydrant through the pop-up, although currently those tables don't have any records (you'll add records in the next lesson).

  2. Close the pop-up.
  3. In the Contents pane, point to the Hydrants layer. Click the More Options button and choose Configure Pop-up.
  4. For Pop-up Title, type Facility ID: (including the trailing space) before the field value to give it context.

    Pop-up Title

  5. In the Pop-up Contents section, below the list of field attributes, click Configure Attributes.
  6. In the Configure Attributes window, in the Display column, if necessary, uncheck OBJECTID and GlobalID and click OK.

    Configure Attributes

    At the bottom of the Configure Pop-up pane are options for showing related data. Show related data is checked by default. There are also options for how related data is sorted.

  7. In the Related Data section, click Sort Options.

    Sort Options under Related Data

    The Sort Options window opens. You'll sort the inspections data chronologically.

  8. For Field, choose Inspection Date. For Order, choose Ascending.

    Sort Options

  9. Click OK in the Sort Options window. At the bottom of the Configure Pop-up pane, click OK.
  10. 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 share it only with your field workforce, you'll create a group to which you can invite specific members.

  1. On the ribbon above the map, click Save and choose Save As.

    Save As

  2. For the title, type Hydrant Inspections and Violations.
  3. For the tags, add hydrants, inspections, violations, Naperville, and Illinois.
  4. For the summary, type A map of fire hydrants and hydrant inspection information in Naperville, Illinois.

    Save Map

  5. Click Save Map.

    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


    You can drag or upload a thumbnail image. Good ideas for thumbnails are logos or crests of the town or department with which the group is associated. You probably don't have the Naperville city crest, so you can leave the thumbnail blank.

  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 Create Group.

    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.


    If using ArcGIS Online, you can invite members both inside and outside of your ArcGIS Online organization. As long as your field inspectors 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. At the top of the page, click Content.
  12. Click Add Item to Group.

    Add items to group
  13. In the Add Item to Group pane, check the boxes for the Hydrant Inspections and Violations web map and the Hydrants_yourname feature layer.

    Select items to add to group

  14. Click Add Item.
  15. In the Content pane, for the Hydrant Inspections and Violations web map and the Hydrants_yourname feature layer., click the Shared with group button.

    Share items with group
  16. Click Overview.

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

    Verify group details and content

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

You've created a web map to collect inspection records and shared the map with your field workforce.

Inspect a hydrant

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

Download ArcGIS Collector

First, you'll download ArcGIS Collector as a free app on your smartphone or tablet. Collector allows you to remotely edit data in a shared map. Because it can be accessed from a mobile device, field workers can input the results of their on-site inspections directly into your GIS, eliminating pen and paper from the process.

  1. On your smartphone or tablet, find ArcGIS Collector on Google Play the App Store (for iPad and iPhone), or the Microsoft Store (for Windows 10 devices).

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

  2. Download and install the free app.

Open the map in Collector

Next, you'll open the Hydrant Inspections and Violations map in Collector.

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

    After you sign in, a list of your maps opens. If you have only 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.

  3. Scroll to the bottom of the list of maps to see your groups.

    For Android users, tap the Menu button to view your groups.


  4. Tap Naperville Hydrant Inspectors.

    A list of maps in that 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

  5. 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.

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

    Search results

    Naperville, Illinois, is the first search result.

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

    Naperville, Illinois

  9. 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 information about the hydrant.


    For Android users, tap a hydrant once to select it, then tap the pop-up to expand it.

    Hydrant feature

  2. Scroll 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. For Android users, under the Inspections section, you will see options to View an inspection or to add a New inspection.

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


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

  4. Tap Add.

    For Android users, under Inspections, tap New.

    The Inspections form opens. It contains the fields in the Inspections table. Swipe up to view the form 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 Next.
  7. Add data to the other fields. (You may have to scroll down to see some of the fields, including Inspection Date.)

    Completed inspection

    This is a test, so the values you add aren't important. Most fields require only a yes or no. When you add an Inspection Date, the title of the form changes to include it.

  8. Tap Submit to send the updates.

    For Android users, tap the checkmark button to save your inspection and return to the hydrant's details.

    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.

    For Android users, under Inspections, tap View.

    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 inputted for the inspection are shown. Below the attribute information and before the actions is a section titled Related that includes violations. For Android users, the section is titled Violations.

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

    For Android users, under Violations, you can select View to see all existing records or select New to add a new record.


    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.

    For Android users, tap New.

    A form containing the fields in the Violations table opens.

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

    Violations form

  5. Tap Submit.

    For Android users, tap the checkmark button to submit the violation. Then, tap View to review the submission.

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

In this lesson, 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 or ArcGIS Enterprise and used it to create a web map. Finally, you opened the web map in ArcGIS Collector 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 Collector and the original web map in your ArcGIS organization.

You can find more lessons in the Learn ArcGIS Lesson Gallery.