Hello ArcGIS Pro team & ArcGIS Pro Tasks team
I'm using the additional actions steps to calculated fields when exiting a step. I followed this documentation to Calculate the current date into my assignedDate field using:
time.strftime("%m/%d/%Y")
I then attempt to add 14 days to the current date and calculate that value into my dueDate field. According to the same page I should be able to use:
!assignedDate!+datetime.timedelta(days=14)
If i perform the field calculation manually this works fine. However, when using the exact same expression in my additional actions I get the below error
Solved! Go to Solution.
I figured this out immediately after posting my original question. I think the value for !assignedDate! isn't actually saved back to the feature service before the task attempts to run the next calculate of
!assignedDate!+datetime.timedelta(days=14)
Instead I simply calc !assignedDate! using
datetime.datetime.now()
and !dueDate! using
datetime.datetime.now()+datetime.timedelta(days=14)
I figured this out immediately after posting my original question. I think the value for !assignedDate! isn't actually saved back to the feature service before the task attempts to run the next calculate of
!assignedDate!+datetime.timedelta(days=14)
Instead I simply calc !assignedDate! using
datetime.datetime.now()
and !dueDate! using
datetime.datetime.now()+datetime.timedelta(days=14)