Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Help with multiple "if" statement.

Avatar

Level 2

If "age" is greater than 17 and "relationship" is also one of several other options such as son or daughter, i would like a subform to appear.  java or formcalc will be fine.  Thanks for any help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

the FormCalc script could look like:

if (Age gt 17) then

     if (relationship eq "son" or relationship eq "daughter") then

          subform.presence = "visible"

     else

          subform.presence = "invisible"

     endif

endif

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

the FormCalc script could look like:

if (Age gt 17) then

     if (relationship eq "son" or relationship eq "daughter") then

          subform.presence = "visible"

     else

          subform.presence = "invisible"

     endif

endif