Skip to main content
Inspiring
July 23, 2024
Question

Calculated Dates

  • July 23, 2024
  • 2 replies
  • 399 views

I want to use a date in my FM (2022) document - it will be a user-entered date - in a process document. The user would specify how many days it takes to complete a specific process. The aim is to say that if you start Process A on the 1st of July, and the process takes 2 days to complete, you should start on Process B on the 3rd of July. Process B takes 1 day to complete, so Process C should start on the 4th of July, and so on... 

The aim is that the content writer would specify the duration (in days) of each process. When producing the final document, they would update the start date for the first process and the start date of all subsequent processes would be updated accordingly.

 

Without using an scripts, is this possible through the use of Variables? I am using Structured FrameMaker, so could do something with Attributes in the EDD, though I'm not sure how practical that would be - if it's even possible.

 

Suggestions for the experts?

    This topic has been closed for replies.

    2 replies

    frameexpert
    Community Expert
    Community Expert
    July 23, 2024

    It would have to be scripted via ExtendScript. ExtendScript (Javascript) has a Date object that would allow date math like this. The script would also need to update the appropriate content areas with the calculated dates. If you want to explore a scripting solution, please contact me offlist. rick at frameexpert dot com

    Inspiring
    July 24, 2024

    Thanks @Winfried Reng  and @frameexpert  for your suggestions. Not sure I'm ready to venture down the scripting path yet. I'm also not sure at this stage if it will be a one-off project or ongoing. 

    Community Expert
    July 23, 2024

    Hi,

    I do not know of any method to calculate something (e.g. dates) via attributes or variables. Neither in structured not in unstructured FrameMaker.

    However, a script, which would do this for you, should not be too complex.

    Best regards, Winfried