Skip to main content
Question

Duration Field is not updating

  • December 17, 2025
  • 1 reply
  • 21 views

Forum|alt.badge.img+8

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!!

 

1 reply

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, is your script also setting the ‘Duration’ value?  If so, try not doing that and seeing whether that helps?  

If you submit a form with the Start, End and Duration set, Airtable will just put all those values in.  However, if you just put in the Start and End date, they’ll auto calculate the Duration for you, and so I’m wondering whether it’d be the same here