Thanks, I found this in another forum, and it works for viewing the domains in notebooks. I'm looking to push the domain description value as text into a workforce field (description). Like how the attributes function works in a for loop below. But I just get the coded value back and can't find a way to get the domain description.
feature.attributes['WV_Operation'] outputs a 0 or 1 and not 'Yes' or 'No'
I'm pretty new to this so perhaps I'm just missing how to do this?
service = gis.content.get('some itemid').layers[0]
assignments = []
for feature in service:
assignments.append(
workforce.Assignment(
project,
geometry=feature.geometry,
location="Hydrant #" + feature.attributes['HydNum'] + " on " + feature.attributes["LocDesc"],
description=feature.attributes["WV_Operation"],
priority=1,
work_order_id=feature.attributes["GlobalID"],
assignment_type="Auxiliary Valve Issues",
status="assigned",
worker=Robyn
)
)
project.assignments.batch_add(assignments)