Automatically generating assignments in Workforce

3101
14
07-10-2018 07:08 AM
RPGIS
by
Occasional Contributor III

Hi,

I was wondering if there was a way to create assignments in Workforce automatically with survey123 or any other means without having to generate assignments manually. I am simply looking into automating certain tasks so any help would be greatly appreciated.

Thanks,

Robert

14 Replies
by Anonymous User
Not applicable

Hi Robert,

Yes, our team provides and maintains sample scripts here: GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects. 

We leverage the Workforce submodule in the Python API which is documented here: arcgis.apps.workforce module — arcgis 1.4.2 documentation 

I just added some Jupyter notebooks to the Repo which show how to automatically created assignments from existing layers, csv files, and sql databases. If you happen to be at the Users Conference this week, there is a session on Wednesday which will go over this.

by Anonymous User
Not applicable

Hi Aaron,

Unfortunately, I don't get the chance to attend the UC this year. But being able to populate assignments into Workforce by using existing feature layers and/or Survey 123 would be extremely valuable - it would help with a lot of workflows!

0 Kudos
JenniferStarbuck1
New Contributor III

Hi Aaron,

where red can I find your information on automatically creating the work orders from an existing feature layer. This is something I need to work on and it would be helpful to have your information on how to do this. Thank you. 

0 Kudos
RobbieEisenrich
New Contributor III

Howdy,

I am getting stuck on the second input box 

I am thinking I need to customize line three to my workforce project. How do I do this/where do I find the information custom to my project?

Thanks

0 Kudos
by Anonymous User
Not applicable

You need to import the workforce module before that line.

from arcgis.apps import workforce

You can find the item id of your project in the url on the item details page for the Workforce Project item, or in the url when the project is open in the Workforce web app.

0 Kudos
RobbieEisenrich
New Contributor III

Apologies, I have this 'arcgis.apps import workforce' on a earlier line. Below is the full note book

Running this I still receive no output and a blank map. Any idea on where I may be going wrong. If it is easier my email is reisenrich@matchpointinc.us

0 Kudos
by Anonymous User
Not applicable

What does "leak_point" contain? Seems like that might be an empty list. Are you sure features are returned from your query?

0 Kudos
RobbieEisenrich
New Contributor III

leak_point is a feature service i have set up with two points in it. How should i be referring to it?

layer = gis.content.get("28f6b055244344d7aca27b98ffa0fbe6").layers[0]
leak_point = layer.query("1=1", out_sr=3857).features

Below is a snap shot of the item id

Thanks again

0 Kudos