Hey everyone
Ran into something interesting and not sure what is going on.
I have a table called assignment with a Start Date and End Date field that are used for Date dependencies and to calculate duration.
I have an Interface button called runs an automation. In that automation is a script that will use the End Date of the record, calculate a new start date (which is one day after the end date) and a new End Date (which is 3 months after the new start date).
I have another script later in the automation that will duplicate the record and insert the new start and end date into the Start Date and End Date field for the duplicated assignment.
Interestingly, the Duration is not updating when the new dates are added.
In the attached image the, the top record is the source and the bottom record was the duplicate created by the script.
I created a test formula to calculate the works days to validate what I am seeing. The top record has a duration of 132 days and the bottom record is also 132. But the test formula for the bottom record shows 64 days.
I would have expected the Assignment Duration field to also be 64 but it seems like it is not calculating the duration when dates are inserted from a script.

Is there something I am missing here? Why is the Assignment Duration field not updating?
Thanks!!

