All articles

Formula Custom Fields: Possible Formulas and Resulting Data Types

Table 35. Availability - Legacy plans


Overview

Formula custom fields allow you to add calculations to the data that you enter in your custom and system fields. You can add different types of fields to one formula, but the calculated result can only be one type.

Possible formulas and resulting data types

Let’s say we need to calculate the total payment for an employee who charges per hour:

Formula example: [Hourly Rate]*[Time Spent]=Currency

The field [Hourly Rate] has the Currency data type, and the field [Time Spent] is set as Hours. The resulting field type of calculation will be Currency.

The table below shows which types of fields can be included in formulas together, which math operation can be applied to them, and what the resulting data type will be.

  1. Choose the data type of the first field in the formula from the first column on the left.

  2. Underneath it, choose the row with the required math operation.

  3. Follow the row to the column with the data type of the second part of the formula.

    formula.gif

Note

The order of fields in the formula determines the resulting type of data. For example, if you divide Number by Hours, the resulting type will be Number. But if you switch the fields in the formula and divide Hours by Number, the result will be Hours.

Number

Currency

Percent

Days

Hours

Number

+, -

Number

Currency

Number

Days

Hours

*

Number

Currency

Number

Days

Hours

/

Number

Number

Number

Number

Number

Currency

+, -

Currency

Currency

Currency

Number

Number

*

Currency

Number

Currency

Currency

Currency

/

Currency

Number

Number

Currency

Currency

Percent

+, -

Number

Currency

Percent

Number

Number

*

Number

Currency

Percent

Days

Hours

/

Percent

Number

Number

Number

Number

Days

+, -

Days

Number

Number

Days

Hours

*

Days

Currency

Days

Number

Hours

/

Days

Number

Days

Number

-

Hours

+, -

Hours

Number

Number

Hours

Hours

*

Hours

Currency

Hours

Hours

Number

/

Hours

Number

Hours

Number

Number

Important

You can select in which format you want to see the calculated result of all types of formulas except for the date type. For example, if your formula is [Due date]-[Start date] the result is always shown in days.

FAQ

Can the custom fields order be changed in the 'More fields' section?

Fields inherited from parent locations are sorted alphanumerically in the More field section. If you wish to put fields into a particular order, you can create a custom item type and adjust its settings.

I have a formula custom field to track duration based on the formula [Due date] - [Start date]. Why are the values in my CF different from the system Duration field?

The system "Duration" field calculates only working days, while a custom-created duration field accounts for calendar days including non-working days such as weekends, holidays, etc.

Top