How to create a calculated field in Redwood UI
in Sales
Summary:
I created a calculated field in VBS as place holder of the computation of the 2 fields in the layout
logic:
let CalVal;
if($fields.TargetValue.$numberValue()>=1 && $fields.ActualValue.numberValue()>=1)
{
CalVal = ($fields.ActualValue.numberValue()/$fields.TargetValue.$numberValue())*100;
}
else
{
CalVal = '';
} return CalVal;
i tried using the business rule and it works only if the fields involve are outside the group fields in the layout.
i also tried adding simple calculation in the calculated field default value that i created and it works, but when adding condition as shown above it is no longer working.
code i add in the default value
Tagged:
0