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.

Conditionally Displaying a Subform

Avatar

Level 2

Hello,

    I am working on a LiveCycle Output form and have a subform which I conditionally need to display. It is an URGENT flag that displays on a memo, so it is set on whether or not the user set the memo to be urgent. I pass the urgent flag within the XML that is sent to LIveCycle. I created a Subform Set with the following code. The language is FormCalc:

URGENT == "Y"

I receive this error in the log:

Script failed (language is formcalc; context is xfa[0].datasets[0].data[0].ROOT[0].XML_WORKFILE[0])

script=URGENT == "Y"

   Error: accessor 'URGENT' is unknown.

Malformed SOM expression: $.XML_WORKFILE.[URGENT == "Y"]

   Error: accessor 'URGENT' is unknown.

Any ideas?

Thank you!

Wendy

1 Reply

Avatar

Level 10

I can't help with the xml side but your script syntax is off.

Two equals signs are for testing a value (in an if statement, etc.), if you are trying to assign a value use one equals sign.

The error "accessor unknown" is because it doesn't know what "URGENT" is - there is no object called "URGENT".