Limit due dates to no less than a specific time in the future

Comments

1 comment

  • Rainer Grabowski (FVM)

    Hi Scott,

    you can use a calculation field for Due Date.

    var reqDate = @YourRequestDateField;
    moment(reqDate).add(2,'weeks').toDate()
    

    This will always show Due Date = RequestDate + 2 weeks.

    If it should be necessary for your use case to have the option to postpone the due date, create a number field e.g. "2 Weeks plus x Days" and use in your calculation:

    var reqDate = @YourRequestDateField;
    var num = @2 Weeks plus x Days; 
    var numValid = num != "" : num : 0
    var dueDays = 14 + numValid;
    moment(reqDate).add(dueDays,'days').toDate()
    

    Rainer

    1
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk