Hopefully this is the right place to post, although this is a code-based question. Any help is welcomed!
I'm automating our workforce app so that at the end of each day, the "completed" assignments and the "canceled" assignments are copied into a feature layer "archive_assignments" and then deleted from the workforce project.
The main reason we want to do this is because all of the "completed" and "canceled" assignments stay on the Collector map unless you manually delete them. We will eventually have hundreds of assignments created and can't keep the map cluttered, but we also don't want to lose that information.
The archive/delete script provided with workforce is a bit advanced for me, and since I know Python quite well (at least for Pro, not AGOL) I figured I'd try to write a simple script myself that would do the same thing.
I'm finding it really difficult to do a very simple task. Is there an easier way to do this? Attached is the code I tried so far in jupyter notebook (edited a bit for confidentiality)
I know ".copy_features" isn't a valid attribute for the feature layer, so I'm looking for a replacement/ correct code
Thanks in advance!