Dynamic Calculation
Value can be dynamically calculated using fieldChange
handler and mathjs
.
@mathjs{…};
Status
Release Available | Status | Framework Name |
---|---|---|
2.7.1 | Current | TBC |
Code JSON
generalHandlers: { "fieldChange": { "totalAmount, months": { "assignments": [{ "field": "$this.attr(monthlyAmount);", "value": "@mathjs{$this.attr(totalAmount); / $this.attr(months);};" }] } } }
Implementation Example
Code JSON
generalHandlers { "fieldChange": { "principal, annualInterest, compoundTimes, years": { "assignments": [{ "field": "$this.attr(amount);", "value": "@mathjs{$this.attr(principal); * ((1 + $this.attr(annualInterest); / $this.attr(compoundTimes);) ^ ($this.attr(compoundTimes); * $this.attr(years);))};" }] } } }