Discussions

 View Only
Expand all | Collapse all

How to change the recurring javascript to include changes to start date AND end date.

  • 1.  How to change the recurring javascript to include changes to start date AND end date.

    Posted 01-10-2018 19:37

    As a non-developer, Quickbase provided the following javascript to create recurring tasks. The problem I am having is that is only adjusts the start and not the end date. Any idea how to adjust so it also updates end date?

    "javascript:void(window.open('" & URLRoot() &"db/6mztyxu8" & "?a=dbpage&dbid=" & Dbid() &"&rid=" & [Record ID#] & "&datefid=8" & "&pagename=recurring.html','recurring','top=240,left=320,width=400,height=150,location=no,menubar=no,toolbar=no'))"



  • 2.  RE: How to change the recurring javascript to include changes to start date AND end date.

    Posted 01-10-2018 20:43


    A simple fix would be to modify the end date to be a formula-date field, to include either a duration, or a reference to a duration field.

    Example...
    if all you had was start and end date field, you could add a Duration field and a new field called End Date Formula.

    Lets assume that not all of your tasks are recurring, and some you want to set manually, others should be driven by the start date and a default duration....

    You could write the formula with the condition that if the existing End date field is populated, (which could only happen now if a user filled it out) then the formula would use that as it's value, otherwise it would use the start date + duration to generate it's own end date.

    Doing it this way allows you to rely on ONE end date field for reporting without having to choose between automatic or manual. 
    Try this formula...

    If([End Date]="",([Start Date]+[Duration]),[End Date]))


  • 3.  RE: How to change the recurring javascript to include changes to start date AND end date.

    Posted 01-17-2018 19:51
    Thank you!