Hello everyone, in the following image you can see how I managed to make 48 assignments, but these are unassigned
I want the assignments to be defined to a user that I already have in a csv file (attached) in row assigned.
my code is the following:
I already tried the following code without any result:
workers=row["Assigned"]
or if there would be another way to assign users?
Thanks
I haven't used the Workforce module in the API myself, but looking at the docs there are a few things I'd try.
- Update the property name from workers to worker - see docs here
https://developers.arcgis.com/python/api-reference/arcgis.apps.workforce.html#assignment
- You might need to use a Worker object rather than username string from csv, such as below
workers = project.workers.search()
Or by creating a Worker object manually: https://developers.arcgis.com/python/api-reference/arcgis.apps.workforce.html#worker
Good luck.