Let’s create a Calculated Field that calculates the Forecast Amount of an opportunity.
Note: The App you create this Calculated Field in can vary based on your FreeAgent setup. We are using the Opportunities App for our example but a Deals, Projects, or Campaigns App works just as well.
To begin we will need the following fields in the Opportunity App:
- Opportunity Amount- A Currency Field that contains the value of the opportunity.
- Win Probability- A Percent Field that contains the win probability.
See How to create a new form field for more.
Begin by naming the Calculated Field and selecting what Section of the Opportunities App the Calculated Field will be displayed in (the choices will depend on your setup).
Next, click the Show Advanced Settings box and change the Calculated field to Yes.
Now, select script Calculation Type. Enter the following code snippet into the Script window:
(function(opportunity){
var forecast = opportunity.Amount * opportunity['Win Probability %'];
return forecast;
}(opportunity));
Your fields may have different names. Replace the bold field names in the code snippet with the names of your fields.
Save the Calculated Field.