/
Formulas
Formulas
Introduction
If you want to calculate the content of a cell based on the values in other columns, you can use a formula.
For instance, if your grid is used to calculate line totals.
The total in the most right column is calculated as
{unit} * {price} * (100 - {discount}) / 100
Configuration
Setup a custom field grid with following configuration
gd.columns = unit, price, discount, total
gd.tablename=formularesult
gd.ds = jira
col.unit = Number of units
col.unit.type = integer
col.price = Price
col.price.type = number
#
# Discount can be any integer between 0 and 50
#
col.discount = Discount
col.discount.type = integer
col.discount.minValue = 0
col.discount.maxValue = 50
#
# The total will contain the calculated value
#
col.total = total
col.total.type = number
col.total.formula = {unit} * {price} * (100 - {discount}) / 100
Related information
Related content
Updating grid data after selecting a list item
Updating grid data after selecting a list item
More like this
Using list values in formulas
Using list values in formulas
More like this
Update grid data with Single Select List column type
Update grid data with Single Select List column type
More like this
How to create formula
How to create formula
More like this
Driving Tables
Driving Tables
More like this
Extract Information from the Grid using the Java API
Extract Information from the Grid using the Java API
More like this