Automatically generating assignments in Workforce

3192
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

If you do

print(layer.query("1=1", out_sr=3857).features)

what does that print in your notebook?

Also, you have invalid attribute names. Anything that is

feature.attribute[]

needs to reference a field name in your layer. So your priority and description are invalid.

Also, the first parameter in

gis.map()

is a location that gets geocoded, so your map might not show since your string may be able to be geocoded.

0 Kudos
RobbieEisenrich
New Contributor III

Thank you!!!!!

I worked through the steps you gave me and got it to work.  First did the print option but I got no output as you suspected. I then tired a different feature service with only one layer in it and this worked. I also adjusted the priority and description fields to match fields in my layer. 

Such a cool tool! Thank you for putting this out there!

RobbieEisenrich
New Contributor III

Howdy,

So I am having one last issue. I am testing with another layer that does not have a address field (Location). Is it possible to pull the location from somewhere else or does the address field have to be present with any layer I am using ?

0 Kudos
by Anonymous User
Not applicable

You could put any string in there.

0 Kudos
RobbieEisenrich
New Contributor III

Howdy again,

I was able to get the location working. Would it also be possible to pass parameters through from a newly created field in the assignments feature service? I tested with a new field in various data types but kept getting a error with the name of the new field in the assignments layer I generated 

0 Kudos