Copy link to clipboard
Copied
Hi all,
I have a problem I am hopeful someone may know the solution. I have a field ("REGISTRATION1") that is a drop-down user selection, and that when one of two options is selected (either "A", or "B"), a calculation is made in another field (this field is "ZFWCG"). The calculation made in this field is either;
For selection "A"; the value in "ZFWCG", then use this figure and -22.0687/0.041935
For selection "B"; the value in "ZFWCG", then use this figure and -22.0687/0.061358
Is this possible?.
Thanks.
Sure. Use this code as the custom calculation script of "ZFWCG":
var reg = this.getField("REGISTRATION1").valueAsString;
if (reg=="A") event.value = -22.0687/0.041935;
else if (reg=="B") event.value = -22.0687/0.061358;
else event.value = "";
Copy link to clipboard
Copied
Sure. Use this code as the custom calculation script of "ZFWCG":
var reg = this.getField("REGISTRATION1").valueAsString;
if (reg=="A") event.value = -22.0687/0.041935;
else if (reg=="B") event.value = -22.0687/0.061358;
else event.value = "";
Copy link to clipboard
Copied
Thnaks Try! as always, superb....;-)