Copy link to clipboard
Copied
Hi,
I know that it is possible to reveal or hide a field based on a value in another, but is it possible to have a field become visible (lets call it "Reveal_A") if the values in two other fields (fields "A" and "B") are specifically entered, e.g. field "A" say has a value of 75.5, and "B" is "16.0".
I know its possible to perhaps use script that uses a third field that sums these two values ("A"+"B"), and then used as a single value to then make visible the "Reveal_A" field if the value meets the value defined - just trying to see if this can be done as a script in the field itself "Reveal_A" by referring to the two other values as separate entities. Guessing that my idea might be easier if summing the two fields as previously mentioned?.
Thanks
Yes, it's definitely possible. You can use something like this as the custom calculation script of "Reveal_A":
event.target.display = (this.getField("A").valueAsString=="75.5" && this.getField("B").valueAsString=="16.0") ? display.visible : display.hidden;
Copy link to clipboard
Copied
Yes, it's definitely possible. You can use something like this as the custom calculation script of "Reveal_A":
event.target.display = (this.getField("A").valueAsString=="75.5" && this.getField("B").valueAsString=="16.0") ? display.visible : display.hidden;
Copy link to clipboard
Copied
As always, many thanks for the reply Try67, always on point 😉