Select to view content in your preferred language

Workforce unable to batch load workorderid field

746
1
Jump to solution
07-09-2021 02:50 PM
ahagopian_coj
Regular Contributor

Hello!  I am trying to write a simple script that will batch create assignments from an existing feature class.  My existing feature class is using the GlobalID field as a primary key for linking to other data tables.  As a result I want to use the GlobalID field.  When I run my snippet of code in Jupyter Notebook it gives me an error: 

TypeError: __init__() got an unexpected keyword argument 'workorderid'

Here is my code:

ahagopian_coj_0-1625867311567.png

 I did try to use other fields such as CustomerID and it threw the same error.  Very maddening!  Any hints or clues on what I am doing wrong?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

You need to use the correct argument name of work_order_id. The assignment class is documented here:

https://developers.arcgis.com/python/api-reference/arcgis.apps.workforce.html#assignment

View solution in original post

1 Reply
by Anonymous User
Not applicable

You need to use the correct argument name of work_order_id. The assignment class is documented here:

https://developers.arcgis.com/python/api-reference/arcgis.apps.workforce.html#assignment