Copy link to clipboard
Copied
Hi,
is it possible to create an if statement where fieldA is populated with a number if fieldB is filled in with a specific number, but if fieldB is filled in with that specific number and fieldC is filled in with a specific word the result in fieldA changes?
Sure, although you also need to specify what will be the value of the field in all other scenarios.
Use something like this:
var b = Number(this.getField("B").valueAsString);
var c = this.getField("C").valueAsString;
if (b==6) {
if (c=="Apple") {
event.value = "Something else";
} else event.value = b;
} else event.value = "???";
Copy link to clipboard
Copied
Sure, although you also need to specify what will be the value of the field in all other scenarios.
Use something like this:
var b = Number(this.getField("B").valueAsString);
var c = this.getField("C").valueAsString;
if (b==6) {
if (c=="Apple") {
event.value = "Something else";
} else event.value = b;
} else event.value = "???";
Copy link to clipboard
Copied
Thank you, it worked!