cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Drop Down List Value

Shishir_P
Explorer
0 Kudos

Hello,

I am an ABAPER and new to JAVA Script, I have a drop down list and based on the value selected I have to set visibility of 2 subforms. The problem with the script is that it behaves exactly opposite to what is expected, Can anyone from JAVA tell me what is wrong with this and how can I correct it?

if (this.parent.parent.CDT_Profile.CDT_PROFILE.rawValue == 2)

{

this.parent.parent.strength_right.presence = "visible";

this.parent.parent.parent.parent.parent.Generic_Core.presence = "hidden";

this.parent.parent.parent.parent.parent.Functional_Core.presence = "hidden";

}

if (this.parent.parent.CDT_Profile.CDT_PROFILE.rawValue == 1)

{

this.parent.parent.strength_right.presence = "hidden";

this.parent.parent.parent.parent.parent.Generic_Core.presence = "visible";

this.parent.parent.parent.parent.parent.Functional_Core.presence = "visible";

}

When the value is 1 form Strength_right appears when it should diappear and when the value is 2 Generic_Core and Functional_Core which are subforms disappear when they should be appearing.

May be rawvalue does not contain the latest value, in case my assumption is correct how can correct this?

Regards,

Shishir.P

Edited by: Shishir Paltanwale on Apr 16, 2010 10:22 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Can you please share your solution? This is how we work here. Your solution here will spare the time and the question for the people who will have the same problem. Thank you, Otto

p.s: for future reference scripting guides are here:

http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...

http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

Shishir_P
Explorer
0 Kudos

Hi,

The " rawValue " does not contain the latest value in case of Drop Down List. To capture the latest values you would require syntax " xfa.event.newText " which holds the true value or new value.

Regards,

Shishir.P

Shishir_P
Explorer
0 Kudos

Hello,

I managed to resolve the issue. Thanks

Regards,

Shishir.P