All articles

Using Formulas in Wrike Automation

Table 17. Availability


Availability: Business, Enterprise, Pinnacle. ; Unavailability: Free, Team;

Overview

With Wrike's advanced automation capabilities, you can manage start dates, due dates, and custom date fields for tasks and projects. Using formulas in automation workflows, you can dynamically adjust, clear, or fine-tune date-related fields, giving you improved flexibility and precision in managing your projects. Here's what you can achieve:

Key Features for Date Management

  1. Change Start Date

    Modify the start date of tasks or events directly, ensuring accurate scheduling and adjustments.

  2. Change Due Date

    Seamlessly update the due dates for tasks or milestones, allowing for better alignment with project timelines.

  3. Clear Dates

    Remove start or due dates when needed, providing clarity and reducing confusion in project timelines.

Enhancements to Custom Field Management

  1. Edit Custom Fields of Type Date

    • Formulas support managing custom fields of the "Date" type.

    • This improvement enhances flexibility and precision, allowing you to dynamically calculate or adjust date values as part of automation rules.

Benefits

  • Increased Automation Efficiency: Automatically handle date adjustments without manual intervention.

  • Improved Precision: Ensure accurate tracking of timelines and dependencies with formula-driven workflows.

  • Enhanced Customization: Tailor date-related fields to suit unique project needs.

By leveraging formulas for date management in Wrike, you can streamline your workflows, maintain consistency, and improve project execution.

Change Dates with Formulas

Change_Dates_with_Formulas.gif
  1. Open the automation rule where you want to set or modify dates.

  2. Select Automation triggers that define when this rule should be activated.

  3. Go to the Available Automation Actions section where you can set start/due dates or Date-type custom fields.

  4. Click the desired action, like Change Start Date, to open a field where you can enter formulas to adjust the date.

  5. Enter the formula you wish to use. For example, type Today() + Days(5) to set a date 5 days after the rule is executed.

    1. Today() references the current date.

    2. Days(5) adds 5 days to the current date.

  6. Adjust the number of days in the formula as needed. For instance, use Today() + Days(-3) to set a date 3 days before today.

  7. Save the changes to your automation rule.

Important

Ensure that your formula accurately reflects the desired date changes for your workflow.

Adjust Task Due Dates Automatically with Custom Fields

Adjust_Task_Due_Dates_Automatically_with_Custom_Fields.gif

You can reschedule a task's due date using date-type custom fields. For example, when a task's status changes—such as moving to "Ready to Launch"—the due date can automatically update based on a specified custom field date. This functionality ensures that due dates adapt dynamically to the workflow, aligning tasks with key milestones. Custom field automation streamlines task management, eliminates manual updates, and helps maintain consistent and accurate project timelines.

Clearing Task and Project Dates with Formulas

With formulas in an automation rule, you can clear start and due dates for tasks and projects, giving you more timeline flexibility. This is especially helpful for resetting schedules when priorities change, keeping tasks undated until prerequisites are met, or adapting to changing project needs.

Clearing_Task_and_Project_Dates_with_Automation_Formulas.gif

For example, to clear the Start or Due dates of a task or project, start by  creating an automation rule with following trigger and action:

  • Trigger: Set the trigger to "Status changes to New."

  • Action: Use the formula Empty() in the action field to clear the Start and Due dates.

When the status changes to "New," the existing Start and Due dates will automatically be cleared.

Set Dates Using Formulas in Automation Rules

The following formulas can be used to manipulate dates in your automation rules. These formulas can help automate tasks, deadlines, or date calculations based on dynamic conditions. You can use them to automate workflows, ensure accuracy, and save time. Below is a list of the available formulas along with their descriptions, examples, and usage tips:

Formula

Description

Example

Usage Tips

Field("name")

References a field by name.

Field("Due date") = Aug 23, 2024

Ensure the field name matches exactly as displayed in your workspace, including spaces and capitalization.

Today()

Returns the current date.

Today() = Aug 23, 2024

Use it to compare or calculate dates relative to the current day, such as setting deadlines or scheduling tasks.

MoveDateLater(date, duration)

Adds days/time to the date, excluding weekends.

MoveDateLater(Field("Start date"),Days(5))

Use for scheduling tasks or setting due dates while skipping weekends.

MoveDateEarlier(date, duration)

Subtracts days/time from the date, excluding weekends.

MoveDateEarlier(Today(), Days(3))

Ideal for deadlines or reminders while considering only working days.

MoveCalendarDateLater(date, duration)

Adds days/time to the date, counting all 7 days of the week.

MoveCalendarDateLater(Date("15-01-2024"),Days(7))

Use when you need precise offsets regardless of weekends or holidays.

MoveCalendarDateEarlier(date, duration)

Subtracts days/time from the date, counting all 7 days of the week.

MoveCalendarDateEarlier(Today(), Days(10))

Useful for backward scheduling or recalculating dates with full weeks.

Date("DD-MM-YYYY")

Returns the date defined in the brackets.

Date("15-01-2024") = Jan 15, 2024

Use for setting fixed dates in conditions or calculations. Format must be accurate.

Days(number)

Returns a time duration in days.

Days(3) = 3d

Combine with date functions to adjust schedules, deadlines, or task durations.

Hours(number)

Returns a time duration in hours.

Hours(3) = 3h

Use for time-sensitive tasks requiring fine-grained adjustments.

WorkingDaysOnly()

Checks if "Working days only" is enabled for a task.

WorkingDaysOnly() = TRUE

Combine with conditions like If() to apply rules only when working days are considered.

If(condition, ifTrue, ifElse)

Returns a value depending on a logical condition.

If(Today() > Date("15-01-2024"), "Overdue", "On Track")

Use conditional logic to create dynamic rules, alerts, or actions based on specific criteria.

Empty()

Returns an empty value or checks if a field is empty.

If(Field("Start date") = Empty(), true, false)

Reset fields or validate if required data is missing. Ideal for cleanup rules or validation checks.

Abs(number)

Converts negative numbers to positive.

Abs(-10) = 10

Useful in calculations involving offsets or absolute differences, such as time remaining.

Sum(number1, number2, ...)

Adds numbers together.

Sum(1, 2, 3) = 6

Combine with other calculations to create aggregate values, such as total durations or priorities.

Round(number, decimals)

Rounds numbers to a specified number of decimals.

Round(12.55, 1) = 12.6

Use for financial or time calculations where precise rounding is needed.

Trunc(number, decimals)

Truncates numbers to a specified number of decimals.

Trunc(12.55, 1) = 12.5

Use to truncate numbers without rounding, e.g., to display estimated durations or metrics.

And(condition1, condition2, ...)

Returns TRUE if all conditions are TRUE.

And(Field("Status") =  "Complete", 5 > 3)

Use for combining multiple conditions in rules that must all be true.

Or(condition1, condition2, ...)

Returns TRUE if any condition is TRUE.

Or(Field("Priority") = "High", Today() > Date("15-01-2024"))

Combine with other functions to trigger rules if at least one condition matches.

Not(condition)

Returns the opposite of the condition.

Not(Field("Status") = "Complete")

Use for negating conditions, e.g., to handle exceptions or reverse triggers.

Top