This video demonstrates how to add and configure a map applet in a ServiceNow Agent mobile app.
You can skip to any of these topics from the YouTube description for this video.
You can easily add a map applet to a mobile app, allowing users to view locations on a map.
These locations could be suppliers, satellite offices, customer locations, or anything else.
For our example, we are building an app for managers with employees working in satellite offices.
The app contains an applet that displays the current office location of employees assigned to the logged in user, …
…displays more details when we tap on a card...
... and calls the employee’s business phone.
Here’s a mobile app we created using Guided Application Creator in Mobile Studio...
... which we showed you how to do in the first video in our series.
This app has a list applet by default.
Let’s create a new applet, …
…called Locate Employees, …
…with this icon, …
…to display the office location of employees on a map, ...
…using the Map template.
Now we define a data item for the applet’s map screen.
We set up this data item to query the User table, and find users who are managed by the current logged-in user.
Back in the map applet, we select our new data item.
We also need to select the field that determines the location of the items displayed on the map.
Now we can select the fields to display on the data card that appears with each marked location on the map.
For our example, let’s display the employee’s name, …
…title, …
…schedule, …
…and location.
Let’s save the changes to the map screen, and configure the form screen.
This screen opens when the user taps the data card to open the user record.
We have more configuration options here.
Change Pattern allows us to select a different layout for the header.
We want a photo of the employee, so this one looks good.
We can also use the Replicate from primary option to copy all the fields we selected for the map screen.
But we want an employee photo at the top.
Let’s remove the Location field, …
…and select the Photo field in the user record.
Now that we’ve configured the header, we can configure the items to display in the body of each record.
We want the employee’s location, …
…business phone, …
…user ID, …
…and last login time.
Finally, we want to add a smart button so the user can call the employee’s office phone.
We select the business phone field in the user table,...
... and landline for the phone type,…
…and set a condition that it will display only if the business phone field is not empty.
Now let’s add the function to the applet.
We want to add our function to the business phone field.
There’s one last step.
We need to add the applet we just configured to the applet launcher as a new UI section.
We only want to display the applet we just created...
... so let’s delete the UI section created by default when we built the app.
Now let’s see our app in action!
We’ve set up some demo users to test the app – two employees, and their manager.
When we created the application, we created a new role to limit who could access it.
It appears here in the Roles list.
We need to add this role to the user record for the manager to test it.
We start by logging in as the manager and accessing our new mobile app.
And here’s the map applet…
…showing the location of our demo users.
We tap on the data card to open the user record, …
…and call the employee’s business phone using the smart button function.
For more information, please see our product documentation, knowledge base, or podcast.
Or ask a question in the ServiceNow Community.