Open Workforce Assignment from Field Maps

1167
8
Jump to solution
04-13-2023 09:55 PM
MatthewHoare1
New Contributor II

Hi, 

I have a map which contains a feature which links to a Survey123 form as well as displaying Workforce Assignments from another related activity. Ideally, the user should be able to select the Workforce assignment in the Field Maps map and open it in Workforce. I know there is integration from Workforce to Field Maps, however I cannot find anything describing integration from Field Maps to Workforce. It is possible to open a Workforce assignment from a map in Field Maps? 

Thanks,

Matt.

1 Solution

Accepted Solutions
AndreasHall
Esri Contributor

I am kind of able the reproduce the error. When I use the {GlobalID} I get an identical link when I look at it in my desktop browser, but when I try to open it from Field Maps on my mobile, the link with {GlobalID} does not work. It does not even open Workforce and I get some kind of error message. 

I would recommend you to contact our support services and see if they know what to do. Perhaps they can log it as a bug.

In the future the capabilities of Workforce will be included in the Field Maps application. Perhaps there will be some news about the timeline of this during this summer´s UC in San Diego. (FAQ—ArcGIS Workforce | Documentation)

View solution in original post

8 Replies
AndreasHall
Esri Contributor

Seems like it should be possible if you create a link according to these instructions: Deploy Workforce—ArcGIS Workforce | Documentation

0 Kudos
MatthewHoare1
New Contributor II

Hi Andreas,

That documentation provides the structure to create a link to open the Assignment, however it's not native to the Assignment itself. As in the map I have the Assignment Feature Service, there would need to be a 1) new field created for the link; 2) the link would need to be created by the Dispatcher in one the limited Assignment fields; 3) script to pickup new assignments and generate the link into a new field or override an existing one (i.e. Notes). To be honest none of these seem like great "solutions" and ideally this would be available as standard app integration. Apologies if there are other ways to go about this I have missed!

0 Kudos
AndreasHall
Esri Contributor

Sorry, I´m not that familiar with Workforce, but wouldn´t it be possible to use an Arcade expression in the web map that you use in Field Maps? Then you would use Arcade to create a virtual attribute field and have it populated with the link you need based on the existing attribute values. 

Are you familiar with Arcade? You can read about Arcade in pop-ups here: Pop-ups: Arcade Essentials (esri.com).

0 Kudos
MatthewHoare1
New Contributor II

This is an option I hadn't considered, thank you. Testing it out today I've find that I can indeed open Workforce from Field Maps. However, I can't seem to get it to open the actual assignment, rather it just opened to the list of available assignments. The below is the dynamic link I'm generating:

 

<a href="arcgis-workforce://?portalURL=https://myportal.argis.com/&amp;mapID=Worker_Map_GlobalID&amp;assignmentID=' + $feature.GlobalID + '&amp;assignmentStatus=2&amp;callback=https://fieldmaps.arcgis.app">Workforce Link</a>

 

Could you please check the format of the link and advise what I'm missing to get it to open the assignment, not just the Workforce app.

Thanks,

Matt.

0 Kudos
AndreasHall
Esri Contributor

The following link works for me. It opens workforce and the specific assignment. A good strategy is to first just create a link that opens Workforce. When that works, add a mapID and finally a assignmentID by reffering to the Global ID. I´m not sure you need the portalURL at all.

<a href="https://workforce.arcgis.app?mapID=92a54bce9afa4de9b741f3d2e2cbed23&amp;assignmentID=7a009267-7e91-40a4-9054-ceef26a3211f">Workforce assignment</a>

 

 I did not use Arcade at all to create this. I just added a text element to the pop-up and worked with the source view.

AndreasHall_0-1681473241080.png

 

0 Kudos
MatthewHoare1
New Contributor II

Thanks @AndreasHall .

I am able to open Workforce via the link however, to open the assignment it only seems to work if I hardcode the GlobalID, if I pass it as a parameter then it won't. I have tried creating the link via Arcade as well as via the popup source.

e.g.

This works:

 

 

 

<a href="https://workforce.arcgis.app?mapID=92a54bce9afa4de9b741f3d2e2cbed23&amp;assignmentID=7a009267-7e91-40a4-9054-ceef26a3211f">Workforce assignment</a>

 

 

 

 

This will not:

 

 

 

<a href="https://workforce.arcgis.app?mapID=92a54bce9afa4de9b741f3d2e2cbed23&amp;assignmentID={GlobalID}">Workforce assignment</a>

 

 

 

 

Checking the links in the Desktop web map they both produce the same link, so it seems very odd that when parsing a field parameter it fails.

Any further suggestions or is this a bug with Workforce that it just won't work?

 

0 Kudos
AndreasHall
Esri Contributor

I am kind of able the reproduce the error. When I use the {GlobalID} I get an identical link when I look at it in my desktop browser, but when I try to open it from Field Maps on my mobile, the link with {GlobalID} does not work. It does not even open Workforce and I get some kind of error message. 

I would recommend you to contact our support services and see if they know what to do. Perhaps they can log it as a bug.

In the future the capabilities of Workforce will be included in the Field Maps application. Perhaps there will be some news about the timeline of this during this summer´s UC in San Diego. (FAQ—ArcGIS Workforce | Documentation)

MatthewHoare1
New Contributor II

Thanks @AndreasHall , appreciate your time looking into this for me. I might log a bug for now, but will keep an ear our on what future enhancements maybe coming.

0 Kudos