/scripts/ahub.form.attachments.js
0

How to check for null values in Adobe forms

Oct 28, 2016 at 10:01 AM

136

avatar image
Former Member

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.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Florian Henninger
Oct 28, 2016 at 10:03 AM
1

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:-)

Share
10 |10000 characters needed characters left characters exceeded
Venkata Subbareddy Baasireddy Apr 19 at 06:30 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content