cancel
Showing results for 
Search instead for 
Did you mean: 

How to check for null values in Adobe forms

0 Kudos

Hi,

I am trying to display/hide a subform based on whether the user enters "Terms and Conditions" in ME22N under the header texts section.

I am attaching the code below, please help me out;

 data.TOD.tod_sub::ready:form - (FormCalc, client)
var todd = xfa.resolveNode("data.TOD.tod_sub.#subform.TextField28")
if ( (xfa.resolveNode("data.TOD.tod_sub.#subform.TextField28").rawValue == " " ) || ( xfa.resolveNode("data.TOD.tod_sub.#subform.TextField28").rawValue  == null ))
this.presence = "hidden"
else
this.presence = "visible"
endif.

Accepted Solutions (1)

Accepted Solutions (1)

Florian
Active Contributor

Hi Anuj,

it's much easier to add a condition at the contex and pass a variable to the form. Inside the form you can check if the variable is filled or even it's "null"

~Florian

BTW: You are mixing up the scriptlanguages.

"this." is always Javascript. "

"$." = Formcalc

You have to choose one:-)

Answers (1)

Answers (1)

0 Kudos

This is quite easier you just need to pass a variable to the form. Fill the variable in your program. Inside the form put a condition on the subform using javascript in initialize event.

if( data.Page1.PROJECT.PROJECT_NO.rawValue == null )

{

this.presence = "hidden";

}

in the above code PROJECT is subform.