Scoro allows you to create custom fields in various formats, and the Formula format is among the most powerful. Think of formula fields as your site's built-in automatic calculator. They do the heavy lifting for you by automatically adding, subtracting, multiplying, or dividing numbers using information already stored in your Scoro site – whether that is standard information or other custom fields you have built yourself.
This guide will show you how to write these formulas in plain English, list the ready-made system fields you can use, explain how to do time and currency conversions, and give you a library of formulas you can copy and paste directly into your site.
Jump to...
1. Creating a formula-format custom field
To get started with formula-format custom field creation:
- Go to Settings > Site settings > Custom fields and click the Add button.
- In the Format dropdown field, select the Formula format.
Once selected, an additional Formula field will appear, where you can write your formula. The following sections in this article will teach you all the basics of formulas and how to construct them.
New to creating custom fields? See the full Creating, modifying, and deleting a custom field article to learn how to set up, format, and manage custom fields on your site.
2. The basic rules of writing a formula
Writing a custom field formula in Scoro is very similar to writing a simple math equation or a spreadsheet formula. The most important formatting rules to remember are:
- Wrap every field name in square brackets [...]. This way, Scoro knows that it’s a field, not plain text.
- Keep the formula clean. Do not include any spaces, extra symbols, or letters inside the square brackets. The text inside the brackets must exactly match the system codes below or the unique Input field name of your custom fields.
Here are the basic math symbols you can use:
- Addition (-): Adds numbers together. Example: [sum]+[vat_sum]
- Subtraction (+): Subtracts one number from another. Example: [sum]-[cost]
- Multiplication (*): Multiplies numbers. Example: [amount]*[price]
- Division (/): Divides numbers. Example: [vat_sum]/[sum]
- Parentheses ( ): Group parts of your math together to tell Scoro what to calculate first. Example: [sum]+[vat_sum])*0.1
We’ve included some example formulas in this section that you can freely copy-paste and use on your site!
3. Ready-made system fields you can use
You don't have to start your custom field formulas from scratch – Scoro has several built-in standard variables that you can reference in your formulas right away. Here’s an overview of various variables and what they represent:
| System variable | Field display name | What it is |
| [amount] | Quantity / Amount | The number of units or hours entered on a line. |
| [price] | Price | The price of a single unit before any discounts are taken off. |
| [discount] | Discount % | The percentage discount applied to a specific line. |
| [unit_price_after_discount] | Unit price after discount | The final price per unit after the line's discount is subtracted. |
| [sum] | Subtotal | The total cost of your lines before any tax is added. |
| [vat_sum] | VAT sum | The total amount of sales tax or VAT calculated for the item. |
| [cost] | Cost | What you originally paid to purchase or buy the item (buying cost). |
| [duration_planned] | Planned duration | The amount of time scheduled or planned for a task. |
| [duration_actual] | Actual duration | The actual time recorded by your team using time entries. |
| [paid_sum] | Paid sum | How much money has already been paid on an invoice or bill. |
| [currency_multiplier] | Currency multiplier | The automatic exchange rate between the document's currency and your home currency. |
| [height] | Height | The height of an item (great for shipping or custom order sizes). |
| [width] | Width | The width of an item (great for calculating physical inventory sizes). |
4. Using your own custom fields in formulas
Formula-format custom field creation isn't limited just to Scoro's standard fields. You can also use other custom fields you've created in your formulas!
To do this, you just need to reference the custom field's unique Input field name (which always starts with c_, like c_mycustomfield) and wrap it in square brackets: [c_mycustomfield].
5. Using time and durations in formulas
If you want to use the time fields like Planned duration [duration_planned] or Actual duration [duration_actual] in your formulas, it’s important to know that Scoro stores all time and duration metrics in seconds, not hours or minutes. Because of this, if you have a task that is planned for 1 hour, Scoro’s database sees it as 3600 seconds. This also makes the formula outputs look incredibly large, as they will be shown in seconds.
To show the formula result in an easy-to-read hour or minute time format, you just need to do some quick division in your formula:
-
To show time in hours: Divide the field by 3600 (since there are 3600 seconds in an hour).
- Formula: [duration_planned]/3600
-
To show time in minutes: Divide the field by 60 (since there are 60 seconds in a minute).
- Formula: [duration_planned]/60
6. Working with different currencies
If your business works in multiple currencies, the [currency_multiplier] field is going to be your best friend.
Whenever you create an invoice, quote, or order in a foreign currency, Scoro automatically looks up the active exchange rate between that currency and your home (base) currency, and stores it in this multiplier.
- How it works: If your home currency is Euros (EUR) but you write a quote in Australian Dollars (AUD), Scoro sets the [currency_multiplier] to show exactly how much 1 AUD is worth in EUR.
- How to convert subtotals: Use this formula to convert any foreign currency document back to your home currency instantly: [sum]*[currency_multiplier].
7. Commonly used formulas you can copy-paste
Here is a handy library of custom field formulas for common business scenarios. You can copy these directly into your custom field settings:
7.1. Money & margin calculations
| Calculation | Formula to use | How it works |
| Calculate profit margin | [sum]-[cost] | Subtracts what you paid for the items from what you are selling them for. |
| Convert document to base currency | [amount]*[price]*[currency_multiplier] | Multiplies your units by their price, then converts the total to your default home currency. |
| Calculate grand total (with tax) | [vat_sum]+[sum] | Adds your subtotal and your sales tax together to show the final bill. |
| Calculate a 10% commission | ([sum]+[vat_sum])*0.1 | Adds the subtotal and tax together, then takes $10\%$ of that total. |
| Calculate the tax percentage | ([vat_sum]/[sum])*100 | Divides the tax sum by the subtotal and multiplies by $100$ to show the tax rate as a whole percentage. |
| Calculate the tax sum before the discount | ([sum]/(1-([discount]/100)))*([vat_sum]/[sum]) | Works backward to figure out what the tax would have been before you applied any discounts. |
| Convert tax sum to base currency | [vat_sum]*[currency_multiplier] | Converts your foreign tax amount back into your home currency. |
| Add a 30% markup to subtotal | [sum]*1.3 | Multiplies your subtotal by $1.3$ to show the price with a $30\%$ markup added. |
7.2. Time & workload calculations
| What you want to do | Formula to use | How it works |
| Show planned hours | [duration_planned]/3600 | Converts planned seconds into standard decimal hours. |
| Show actual hours worked | [duration_actual]/3600 | Converts recorded team time entries into standard decimal hours. |
| Adjust hours by complexity |
[duration_planned]/3600/[c_complexity] *(where [c_complexity] is a custom field) |
Takes your planned hours and divides them by a custom "complexity rating" or team size field (that you’d need to create first before creating a field with this formula). |