Automated formulas Written by Thais do Nascimento Pedro
Updated over a week ago

🎯 For those who want to make calculations effortlessly

⏩ Content Summary:

• Use the Automated Formulas feature to automatically perform various calculations

Formulas are valuable tools when carrying out calculations of all complexities. They also have a wide range of applications in different situations.

With this in mind, we’ve created automated formulas to give you the opportunity to leverage these benefits for your business.

This functionality allows you to create complex calculations in your processes and obtain instant results through automation, saving time and avoiding operational errors.

Get inspired

Procurement

• Add up the total value of a purchase order by multiplying quantities by prices, then adding their totals together

• Automatically deduct the amount used in a purchase from the requested department's available budget

• Automatically approve or deny a purchase based on sufficient (or insufficient) budget balance

HR

Calculate the end date of a vacation based on the start date and the requested number of days.

## How to use Automated Formulas

You can use Automated Formulas to make simple, objective, accurate calculations in your processes.

To use Automated Formulas, go to the pipe in which you’d like to apply the formula and click Automate.

Next, select Create automation.

Next, select the event (Every time…) and the action (Do this…). First, select the event that should generate the formula.

Next, select Run a formula.

Now simply select the field to which you want to apply the formula and make a note of it.

You can apply the following functions:

• Mathematics: sum ( + ), subtraction ( - ), multiplication ( * ), division ( / ), percentage ( % ), and potentiation ( ^ ).

• Numerics:

• SUM ( ): sum the values

• AVERAGE ( ): calculates the average of numbers

• MIN ( ): calculates the minimum value

• MAX ( ): calculates the maximum value

• MULTIPLY ( ): multiply values

• DIVIDE ( ): divide values

• SUBTRACT ( ): subtract values

• COUNT ( ): count the quantity of values

• ROUND ( ): round numbers, for example, the number 4.89 turns into 5.

• Comparisons: less than ( < ), more than ( > ), less or equal to ( <= ), more or equal to ( >= ), different ( <> ), and equal ( = ).

Think about the desired fields and functions, then fill out the form. In the example below, we selected the Total value, subtracted the Final value, and chose the field Savings to receive the formula result.

Lastly, click Create automation, and that’s it! Your automation formula has been created.

### Formulas with dates

You can also execute formulas with dates in your process! For example, you can check automatically if a card with a vacation request was created at least 30 days before the vacation time begins. Similarly, you can confirm whether or not the spending date requested in the reimbursement pipe is from, at maximum, two weeks ago.

Example of vacation:

Whether the result is more or less than 30, you will have the option to show a message on the card, move the card, or send an email template to the requester automatically denying the request. Adapt as your business needs.

Example of reimbursement:

In this example, we compare the dates directly using the formula, returning true/false to the field Expense within the request deadline?.

We apply the rule that reimbursements can only be requested if the spending happened in the last 15 days.

In general, to work with dates in the formulas, there are three common combinations:

• Date (+/-) Number: resulting in a date

• Date - Date: resulting in a difference between dates (number of days)

• Date (>,<,=) Date: resulting true or false

Formulas with dates offer more flexibility to give pipe admins the ability to adapt their business rules according to their needs.

Related Content

🎓 Learn how to do more with less with free Pipefy Academy courses!

🌎 Join the Pipefy Community to ask questions, share ideas, stay tuned, and showcase your knowledge with professionals from around the globe!