on 01-22-2016 1:32 PM
Hi Guys,
I need a simple advice, Here is my scenario, I have a variable GV_XYZ part of my context in adobe forms. And in Page1-SUBFORM1 (Path)
i am trying to access it without binding it to any element.
So I am using the following javascript.
if ($.gv_xyz.rawValue == "X")
{
this.presence = "hidden";
}
end of the day the purpose is to hide the subform, which works perfectly if i dont have the if statement. It is a simple problem but can not figure out what is that i am doing wrong here?
also tried this.
var gv_abc;
gv_abc = xfa.record.gv_xyz.rawValue;
if(gv_abc == "X ")
{
this.presence = "hidden";
}
still no luck.
Appreciate any help.
Best Regards,
Tapo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tapo,
When you're referencing a variable that is not bound you need to use the prefix of: $record. If you're still having issues, you could try:
if($record.gv_subj.isNull)
{
this.presence = "visible"
}
instead.
Julie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julie,
Thanks for your quick response on this, I have tried the approach, Still no luck.
Now the variable is a global variable and I have checked it has a value of X. It is directly under context and available in the data view.
if(($record.gv_subj.isNull)
{
this.presence = "visible";
}
else
{
this.presence = "hidden";
}
Best Regards,
Tapo.
Hi Julie,
I am using Initialize event, which should work. And works if I just remove the if statements. I even tried hidden in both the conditions.
so the below doesn't work.
if($record.gv_subj.rawValue != null)
{
this.presence = "hidden";
//"visible";
}
else
{
this.presence = "hidden";
}
but this works,
//if($record.gv_subj.rawValue != null)
//{
this.presence = "hidden";
//"visible";
//}
//else
//{
//this.presence = "hidden";
//}
same event. Other lines are commented, so definitely something wrong with the if construct, but why it is not able to read the condition is beyond my understanding.
Best Regards,
Tapo.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.