Skip to main content

Master URL Parameters with ArcGIS Mobile Apps Part 1

Looking for an effective way to link field workflows when working with multiple ArcGIS mobile apps? Search no further than universal app parameters!

Part 1: Field Maps, Workforce and QuickCapture Integrations

During my October 14th webinar, I showed how to configure URL parameters for various mobile workflows including ArcGIS Field Maps, ArcGIS Workforce, ArcGIS QuickCapture, ArcGIS Survey123 and ArcGIS Dashboards. In blog part 1, I’ll go over Field Maps, Workforce and QuickCapture integrations while part 2 will be about Survey123 and Dashboard integrations. You may also watch the webinar recording again for the demonstrations on how to replicate similar integrations for your own workflows. 

Using mobile app integration gives you the best of both worlds: it allows you to choose the ideal ArcGIS field app to help your mobile crew complete their work on-the-go, and it also allows for integration of multi-app workflows. URL links and parameters are one method for app integration, using a well-known protocol for apps to communicate with each other. They can be used to simplify field operations and maximize the efficiency of your mobile crew by directly providing the maps, forms and projects they need to complete their work as well as configure further actions that save time spent on each task.

For each of the webinar demos, I’ve used templates available in ArcGIS Online to create my data capture projects and associated layers. These ready-to-use templates provide a good starting point as you can easily modify the fields in the data layers, as well configure survey or project settings to suit your own needs. If you are already using your existing feature layers, maps, surveys and projects, use my examples as a guideline for setting up your app links.

Remember syntax counts when using the URL links and parameters! Also make sure your maps, layers, surveys and projects are shared with all of your mobile users who need them for successful app integration. The app links will also work while disconnected, provided the mobile users first download all maps, surveys, projects and data before going offline.

Using URL links for ArcGIS Field Maps Integrations

By sharing a link directly to your map through an email, text message, web page or another app, you can make it easy for your mobile workers to open the right map and get started on their tasks in Field Maps. In the webinar demo, I used a feature layer template from ArcGIS Online called “Restaurant Inspections” to create the layers used in my Field Maps demo. To use this template, go to your Content and select New Item > Feature layer > From Template – this one is under the Public Safety templates.

To construct a link to open the Field Maps mobile app on iOS or Android, start with the basic link structure:

https://fieldmaps.arcgis.app/

Add the item id of the map you want the link to open using the item id parameter. To find the map id, once you have logged into your ArcGIS Organization (Online or Enterprise portal) go to My content and select the map you will use with Field Maps. Click on it to bring up the item details page. You will see the item id in the url of your address browser, note that when you construct the link you will capitalize id to add the itemID parameter.

Screenshot of the My Content portal

An example for how to find the map itemID = 1c97bb437f7c422ba04de30011029424 from your ArcGIS Organization map item details.

There are many other parameters that are optional with Field Maps but one you’ll likely want to use is referenceContext. This is used to specify action to be performed in the app upon opening, as Field Maps can be used not only in editing capacity, but in read-only mode (as you could Explorer) as well as just for tracking location.

There are several options to use with referenceContext: open, center, search, add feature, update feature and track. I showed in the demo how to modify the basic Field Maps link using a number of these parameters to complete the following actions:

Construct the following link, with the parameter referenceContext=open, to create a link to open the map in the Field Maps mobile app. Note that on the mobile device, the map will open for the currently signed-in user or if not signed in, provide the opportunity for them to sign in.

https://fieldmaps.arcgis.app/?referenceContext=open&itemID=1c97bb437f7c422ba04de30011029424

To center the map to open on a specific set of coordinates use the referenceContext=center parameter with the coordinate pair: 

https://fieldmaps.arcgis.app?referenceContext=center&itemID=1c97bb437f7c422ba04de30011029424¢er=43.21648,-79.75408

To start location tracking automatically use the parameter trackingON with referenceContext=track. You don’t need to provide an item id unless you want to direct the user to open a map, as with Field Maps users can just turn on tracking without opening a map:

https://fieldmaps.arcgis.app/?referenceContext=track&trackingOn=true&trackingDuration=120

With the Field Maps url link and parameters you can initiate data collection by using the referenceContext=updateFeature parameter. Add featureSourceURL to provide the feature layer for editing as well as featureAttributes to specify the attribute if you are going to pass attributes from one app to another.  

https://fieldmaps.arcgis.app?referenceContext=addFeature&itemID=48318c458d8340f8b239d712985c8de1&featureSourceURL=https://services.arcgis.com/ld3ZUQ1nPsV3RdE7/arcgis/rest/services/CommunityGardenMap_WFL1/FeatureServer/0

For more details about all of the parameters available for Field Maps, how to reconstruct your link if your ArcGIS organization is in Enterprise portal, and examples of other workflows, consult the documentation.

Using URL links for ArcGIS Workforce Integrations

ArcGIS Workforce provides integration with multiple ArcGIS field apps. As the owner of a Workforce project, you can choose which ArcGIS apps are integrated and how they will work together by configuring app linking for assignments managed by the project. This allows the user to start from the mobile Workforce app, select their assignment to initiate work, then tap on the link(s) which take them to the additional app to complete data collection or other types of work. App integration within Workforce is configured by the Dispatcher web app which creates a URL link and stores that scheme in the project JSON file for each assignment integration you configure. With the new version of Workforce that was released in August 2020, you can modify url links that are stored in the Assignments integration table to alter the parameters as well as add integrations to your own apps.

In my webinar demo, I started with a Workforce project. I had already added app linking for Navigator, Survey123 and Field Maps. You may find it helpful to start with your app integrations configured as you can modify them to better suit your workflow needs. Once you’ve configured a few app integrations, locate the table where these URL links are stored in your ArcGIS Organization. Browse to My Content and find the folder name for your Workforce Project and click on it to open the details. Workforce stores all the project items – maps, feature layers and tables in this folder. Workforce uses one feature layer to store all of the required layers and tables, click on this feature layer then click on the Assignment Integrations from under tables. View the contents of this layer in the Data tab to see the links that make up this table under the URL Template column. 

Screenshot of Restaurant Assignments template

View the URL Templates for the Assignments Integrations table in your ArcGIS Organization

Note you may have a different number of records in your table, depending on how many assignment integrations you configured. If you have more than one integration per app, you can find the description of associated assignment type in the Assignment Types table – just match the globalID to that listed in the Assignment Type field in Assignment Integrations.

To modify a URL link created by Workforce, copy and paste it from the URL Template field, into Word, Notepad or another document editor. While your link will differ depending on how you set up the app linking in your own Workforce Project, it will be similar to the default link to Field Maps I had for my project:

https://fieldmaps.arcgis.app/?itemID=1c97bb437f7c422ba04de30011029424&referenceContext=addFeature&geometry=${assignment.latitude},${assignment.longitude}&featureSourceURL=https://services.arcgis.com/ld3ZUQ1nPsV3RdE7/arcgis/rest/services/Hamilton_Restaurant_Inspections_test/FeatureServer/0

You can see in my example, the first part uses the basic URL link for Field Maps to open my map with the additional parameter referenceContext=addFeature&geometry to initiate adding a record within the Field Maps app at the same location as the assignment. The &featureSourceURL provides the link to the feature layer to create the new feature in.

In the demo I modified the basic link to Field Maps to add the callback parameter for the Workforce mobile app as well as provide the user with the callback prompt. This prompts the user to return to Workforce once the data collection in Field Maps is completed, a useful addition to simplify your mutli-app workflows. The callback and callbackPrompt parameters are available to use with other ArcGIS mobile apps including Survey123, QuickCapture and Navigator.

https://fieldmaps.arcgis.app/?itemID=1c97bb437f7c422ba04de30011029424&referenceContext=addFeature&geometry=${assignment.latitude},${assignment.longitude}&featureSourceURL=https://services.arcgis.com/ld3ZUQ1nPsV3RdE7/arcgis/rest/services/Hamilton_Restaurant_Inspections_test/FeatureServer/0&callback=https://workforce.arcgis.app&callbackPrompt=Workforce

 

Screenshot of mobile view of Restaurant Inspection demonstration

Using the link to Field Maps from Workforce modified with the callback and callbackPrompt to return the user to Workforce.

As I showed in the webinar, an easy way to modify the records in the URL Template field is to open the Assignments Integration table in the online map viewer – you can edit records the table directly. As soon as you change the URL link in for your assignment integration record, it is available in the Workforce mobile app (the mobile users may need to reload the project on their device to apply this change). 

While our product team is busy working on integrating Workforce into Field Maps, using URL links can help you bridge the gap in your mobile app integrations in the meantime.

Consult the documentation for more information on app integration using the Workforce url links– scroll down to the section about the Workforce feature service - Assignment Integrations table.

Using URL links for QuickCapture Integrations

QuickCapture makes it easy to setup your links to other apps as you can configure a link button directly using the web designer. This allows users to open other apps or web applications from the QuickCapture mobile app by specifying the target URL for the button. You can configure a link button to open a website, open a PDF file that hosted online, open a dashboard from your device’s browser or launch the Survey123 field app or other native apps on your device.

To configure this type of integration, start by accessing QuickCapture designer from the app launcher in your ArcGIS Organization. You’ll use it to create and configure your data capture projects that may be based on your existing data layers or starting with a template that you may modify to better meet your needs. The templates create the project for data capture, associated feature layers, a project map and in some cases a Dashboard as well to display results of your field collection. To re-create the project I showed the webinar demo, open the QuickCapture Designer from your ArcGIS Organization launcher and select Create New project > Start from template and select the “Occupancy Counter” template.

After you create a project, you configure it in the ArcGIS QuickCapture designer using either the graphical interface or a JSON editor. You can configure the buttons to capture attributes as well as configure link buttons. For a link button, select and drag the link button and drop it to the project preview in Designer. Click on the button and on the Link tab, from under Launch options choose to manually define the URL or choose Survey123 field app to select from your surveys to link to. To link to your own dashboard, use the ArcGIS Dashboard url link structure as outlined in the documentation.

Screenshot of linking to a dashboard in ArcGIS QuickCapture

The Occupancy Counter template I used for this demo already has a link button configured to open the associated dashboard.

Stay tuned for my second blog post where I’ll go over more examples of app integrations with ArcGIS Dashboards as well as Survey123.

This post was translated to French and can be viewed here.

About the Author

Sue Enyedy is Esri Canada’s GeoMobility Advocate. She promotes the effective adoption of Esri’s mobile solutions to help organizations connect and optimize their field and office operations using GIS. Sue has worked at the Region of Halton and at Geomatics International during her GIS career. Her passion for geography and GIS started at McMaster University, where she completed bachelor and master of science degrees.

Profile Photo of Sue Enyedy