Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

As the name suggests, Formula Fields is a way to let users define advanced custom fields which can manipulate data and perform arithmetic, logical or conditional operations on the same. Formula fields, like other custom fields, are available as individual columns in reports. 

Let us say your business practice is to take 10% of the budget as an advance. Instead of manually computing it and changing it every time the budget changes, you would like to define a formula field that will compute it as 10% of the budget. To further complicate the scenario, let us assume that your policy is to take an advance of 10% for projects with budget up to $1000 and 15% above that. This further increases the chances of errors in manually computing this field. This is where formula fields come to the rescue.

You could use a currency field which managers will fill when creating or modifying projects. The problem is that managers must manually calculate the advance from the budget and remember to change it every time the budget changes. This is error prone. To make things a bit more complicated, assume that the policy is to take an advance of 10% for projects with budget up to $1000 and 15% above that. This increases the chances of errors. This is where formula fields come to the rescue. You would create a formula field called say 'Advance amount'. On the same, you will define the formula

${entity.budget <= $1000 ? entity.budget * .10 : entity.budget * .15}

For a project with a budget of $500, the advance amount will show $50 (10% of $500) while that for a budget of $5000 will show $750 (15% of $5000). 

Since custom fields can be attached to task, project category, user, client, contact, state transitions, they are referred to with the handle 'entity'. If the field is attached to a task, 'entity' will translate to 'task'. If the field is attached to a project, 'entity' will translate to project and so on.

 

Formula fields have many benefits :

  • The value of this field is auto-calculated from the formula and is not entered by the user, thus avoiding errors. 
  • The amount will be automatically updated when the budget changes.
  • Most importantly, if the policy changes all you need to do is update the formula. The advance amount for all projects will automatically reflect the new value.

 

You can also filter, sort and group reports using the formula fields.

If your formula field returns multiple values, it will not appear as a option when creating chart reports.

  • No labels