Formula Fields Step
Formula Fields step allows you to add calculated fields that are populated at run time. These calculated fields are generally based on existing fields. In the below figure, interest amount is calculated applying a formula on the fields of the selected data source.
Figure 13: Formula Fields Step
Action Button | Comments |
Add | To add a new formula field |
Delete | To delete the selected formula field |
For each added formula field, following properties are set:
Formula String Syntax
Property | Values | Comments |
Name | Enter | Name of the field as visible to the end user |
Return Type | Number
Char Date | Determines the data type of the formula field |
Precision | Enter | Length of field for Char data type.
Precision or length of field for Number data type |
Scale | Enter | Scale or number of digits after decimal point |
Formula | Formula String | Java script syntax formula |
Follow JavaScript Syntax to create a formula. To create a formula, you can use field names and define variables. A formula may have ‘if’ construct as well as ‘nested if’ construct. You can use logical operators too. If want to add more than one statements in formula, use semicolon ‘;’ as separator between two statements.
Example:
For a formula field named TotalAmount,
var total ;
if (unitprice < 10 )
{total = unitprice*quantity;}
else
{total = unitprice;}
TotalAmount = total
Related content
Copyright Kyvos, Inc. All rights reserved.