Metadata card: set next "Start Date" to be previous "End Date" + 1 (without Property Calculator)

Good afternoon,

We have a document class (Duty Roster) that contains multiple duty periods for staff.
Each period has a Start Date and an End Date.

We want to improve usability for Managers creating these periods. Ideally, when a new period is added:

  • Start Date should automatically default to
    End Date of the previous period + 1 day

Example:
Period 1 → 01-Oct to 05-Oct
Period 2 → "Start Date" should default to 06-Oct

Because the length of each period varies, we cannot use a Property Calculator that assumes a fixed number of days.

Is there a way to automatically set the next period’s Start Date based on the previous period’s End Date when the document is created, and preferably without using Property Calculator?

Any suggestions or best practices would be greatly appreciated!

Thank you!

Patrick.

Example:

Parents
  • Are the periods somehow linked or marked in a way that the system can identify and lookup the correct previous period?

    If yes, it should be fairly easy to create a vb script (or preferably a VAF if you have skills required) that can get the properties from the previous period, read the End date from that period, add 1 day and save the result as start date in the new period. 

Reply
  • Are the periods somehow linked or marked in a way that the system can identify and lookup the correct previous period?

    If yes, it should be fairly easy to create a vb script (or preferably a VAF if you have skills required) that can get the properties from the previous period, read the End date from that period, add 1 day and save the result as start date in the new period. 

Children
No Data