I am having a problem getting a subform to become visible after all text fields are not empty and after one of two checkboxes have been checked. I have three sets of checkboxes.
I have tried both formcalc and javascript
here is my javascript, please advise
if ((this.resolveNode("Eberline_IndicationRow1").rawValue != null
&& this.resolveNode("Eberline_IndicationRow1").rawValue != "")
&& (this.resolveNode("DCS_IndicationRow1").rawValue != null
&& this.resolveNode("DCS_IndicationRow1").rawValue != "")
&& (this.resolveNode("$").rawValue != null
&& this.resolveNode("$").rawValue != "")
&& (this.resolveNode("DCS_Indicationo_Alarm_Received_desired_o_No_Alarm").rawValue != null
&& this.resolveNode("DCS_Indicationo_Alarm_Received_desired_o_No_Alarm").rawValue != ""))
&&
((this.resolveNode("Pre_check_Normal").rawValue == "1") || (this.resolveNode("Pre_Check_Alarm").rawValue == "1")) &&
((this.resolveNode("Signal_Check_Alarm").rawValue == "1") || (this.resolveNode("Signal_Check_No_Alarm").rawValue == "1")) &&
((this.resolveNode("Post_check_normal").rawValue == "1")|| (this.resolveNode("this").rawValue == "1"));
{
this.resolveNode("DSCArm-RIReadings").presence = "visible";
On reading through the code, there is an error in the penultimate line:
((this.resolveNode("Post_check_normal").rawValue == "1")|| (this.resolveNode("this").rawValue == "1"));
The second resolveNode on that line doesn't name a field, but refers to "this" instead. Since the general rule is that if any part of an equation fails, the equation returns null, then this entire code snippet will always return null, so it will not ever change the presence of "DSCArm-RIReadings" on the last line.
Sorry it took so long to get an answer out for you, I've only recently joined the site as a user and have been working my way back through the problems presented as a way of getting up to speed on this :)
LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB