Copy link to clipboard
Copied
Hello,
I am looking to achieve this several times over 'if "checkbox" is checked, value is sum of "fieldA" and "fieldB", else value is "fieldA"'
The formula I put into the Custom calc script is:
var x = this.getField("IntB").value;
var y = this.getField("ProfB").value;
var z = this.getField("Check Box 12").value;
if(z == "Yes")
{
event.value = x + y;
}else{
event.target.value= x;
}
I don't receive an error, but the field remains blank. Any help would be greatly appreciated!
1 Correct answer
Change:
event.target.value= x;
To:
event.value= x;
And also check the JS Console for error messages after editing the value of one of the fields.
Copy link to clipboard
Copied
Change:
event.target.value= x;
To:
event.value= x;
And also check the JS Console for error messages after editing the value of one of the fields.
Copy link to clipboard
Copied
Thank you so much for your reply. I didn't recieve a notification until today. I appreciate your timely response!

