I am trying to make a subform "hidden" when a dropdown object is null and "visible" when that drop-down is not null. I am using the following script:
if (this.rawValue = null){
xfa.resolveNode("Subform3.#subform.GroupLeader").presence = "hidden";
}
else {
xfa.resolveNode("Subform3.#subform.GroupLeader").presence = "visible";
}
Script does not work. Is it wrong or have I got it in the wrong event? (Form ready)
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
For starters I would place this script in the exit event of the dropdown.
Also you have an unnamed subform, which requires you to resolve the node. This is inefficient, so if you name the subform, you will be able to use a simple relative reference (see: http://assure.ly/kUP02y).
The main issue with the script is that when you are testing equality (in the if/else statement), you need to use a double equal sign (==).
So, if you renamed the subform "Subform4:, the script would become:
if (this.rawValue == null) {
Subform3.Subform4.GroupLeader.presence = "hidden";
}
else {
Subform3.Subform4.GroupLeader.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
For starters I would place this script in the exit event of the dropdown.
Also you have an unnamed subform, which requires you to resolve the node. This is inefficient, so if you name the subform, you will be able to use a simple relative reference (see: http://assure.ly/kUP02y).
The main issue with the script is that when you are testing equality (in the if/else statement), you need to use a double equal sign (==).
So, if you renamed the subform "Subform4:, the script would become:
if (this.rawValue == null) {
Subform3.Subform4.GroupLeader.presence = "hidden";
}
else {
Subform3.Subform4.GroupLeader.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Yes - that works great. Thanks so much for your help with this.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies