Automate

 View Only
  • 1.  Set a future Date on Evolve Automate Form

    Posted 03-06-2024 09:51

    I have a date field that I need to default set to 1 year in the future.  What command would I need to use to do this?

    I tried this, but it does not work: $form.setValue('/my:myFields/my:f_Request_Date',(today() +365))

    Likewise, I need to display a warning message when a date field is not set at least 30 days past the request date.  Is there a way to compare date fields on a form?



    ------------------------------
    Joseph Gosser
    Business Analyst
    The Andersons Inc
    OH
    ------------------------------


  • 2.  RE: Set a future Date on Evolve Automate Form

    Employee
    Posted 03-06-2024 11:06

    Hi Joseph

    There's a function for that in the rule builder

    addDays will take a date and allow you to add (or subtract with a negative number), ex:  addDays(today(),365, false)

    that takes today's date and adds 365 days to it, and it doesnt' care about weekends

    Hope that helps,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------