Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
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