Forum Discussion

JoeHargrave's avatar
JoeHargrave
Qrew Trainee
2 years ago

Task Due Date via Formula Date

I'm automating the creation of a task list with Pipelines.  The various tasks are due on formula dates - and I've created the necessary formula date fields I need. (These are subtractive formula date fields, based on a date already in the record, minus # of days).  So I have a few of these formula date fields that give me the needed due dates, but I hit a bit of a roadblock when building the pipeline.  When I create a record for the tasks table, the 'due date' selection is a calendar, and I can only pick a specific date.  Since the list of tasks needs a few different due dates, I can't figure out how to get my due date to be the appropriately chosen due date since Formula Dates can't be used in Pipelines.  I feel like I'm missing something simple here.   If I need four tasks created, each with a different due date (that is a subtraction of days from an existing date), what's my simplest path here?



------------------------------
Joe Hargrave
------------------------------
  • Joe,

    I have got a customer with the same issue.  They need many tasks with different Due Dates.   Here is the architecture we use:

    When an Opportunity is created a Pipeline starts.

    It creates Tasks for that Opportunity that mirror all the Task Types in the Task Library Table.  

    The Due Date of the Task is a calculated in the Pipeline and not in a Formula Field in QB

                Due Date = Expiration Date + Offset,  the Offset can be positive or negative

    The nice thing about this model is that the VP Sales can edit the Library table.   He can make as many Tasks with what ever offset and Due Date that he wants.



    ------------------------------
    Don Larson
    ------------------------------
  • BrianSeymour's avatar
    BrianSeymour
    Qrew Assistant Captain

    Hey Joe,

    For clarity, you can use a Formula Date field in your Pipelines steps, but you wouldn't pick it via the Calendar, you need to select it from the field list you've specified. For example, in Step A you could specify your date field, then in a subsequent Step (e.g. Step B) you could use it. It would look something like {{a.your_formula_date}} field.

    If you dig into the "Jinja" syntax in the QB docs, you'll find that you can also perform math on these steps too. For example, {{ a.your_formula_date + time.delta(days=7) }}.

    But since you've already setup Formula Dates, I'd suggest going that route vs. handling this via Jinja. Especially as Don pointed out, you may be able to give end Users a bit more flexibility to set the dates vs. having to edit Pipelines should there be any future changes!



    ------------------------------
    Brian Seymour
    ------------------------------