View previous topic :: View next topic |
Author |
Message |
pradmenon Beginner
Joined: 07 Apr 2006 Posts: 6 Topics: 1 Location: INDIA
|
Posted: Fri Oct 26, 2007 7:48 am Post subject: Hiding fields in a panel |
|
|
Hi,
I am trying to create a panel where some fields should be hidden initially and only be displayed upon choosing another displayed field.
For ex. the panel has a field "Are you using ASC?" for which if the input is Y, then some other fields are displayed to gather more information. If it is N then the fields are not displayed.
I know it is possible to display another pop-up panel where I can take that information if the field is set as Y, but I am trying to do all the processing in one panel without having to display another pop-up.
Thank you in advance!! |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Oct 26, 2007 8:36 am Post subject: |
|
|
It's all based on the attributes for those fields (INTENS=HI,LO,NON and TYPE=(INPUT,OUTPUT,TEXT)). Use variables for the proper attributes and change them as needed. |
|
Back to top |
|
|
pradmenon Beginner
Joined: 07 Apr 2006 Posts: 6 Topics: 1 Location: INDIA
|
Posted: Fri Oct 26, 2007 11:03 am Post subject: |
|
|
I did try that and I am able to hide the fields initially, but even when I populate the ASC field as Y, the other fileds remain hidden. What do I need to do to get them to display? This is how I have my panel defined -
@ TYPE(INPUT) INTENS(&ASCVAL) CAPS(ON) COLOR(WHITE) HILITE(USCORE)
! TYPE(TEXT) INTENS(&ASCVAL)
---
---
# Are you using ASC? +_Z+ % Y OR N
! WHERE DO YOU WANT TO SELECT YOUR ASC RECORDS FROM? @Z+
! 1. MQB017
! 2. MDB423
)INIT
IF (&ASC = 'N')
&ASCVAL = NON
ELSE
&ASCVAL = HIGH
---
---
I also tried putting the IF condition in the REINIT section, but it make a difference either. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Oct 26, 2007 1:11 pm Post subject: |
|
|
Make the text of your hidden field variable set to blank. Whne the user enters 'Y' in the appropriate field and presses enter, assign the appropriate text to the variable and redisplay the screen. You can remove it using the same methodolgy too. What I have not been able to do - andhave not tried - is to stop the cursor skipping or tabbing to a hidden input field but most people would not try such a thing but if they do you can capture it and ignore or send them a message. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
bob_buxton Beginner
Joined: 20 Dec 2002 Posts: 44 Topics: 0 Location: Hampshire, England
|
Posted: Sat Oct 27, 2007 6:27 am Post subject: |
|
|
You could try using a dynamic area where your controlling program builds the screen content. _________________ Bob Buxton
Ex Websphere MQ for zOS development |
|
Back to top |
|
|
gd Beginner
Joined: 05 Apr 2006 Posts: 5 Topics: 2
|
Posted: Mon Oct 29, 2007 3:05 pm Post subject: |
|
|
I think, you cannot change the attributes of a single panel while you are displaying the same panel.
When you enter some values in the panel fields, and hit ENTER, the panel execution completes and it cannot go back to reassign the INTENS or any other attribute.
You can copy the same panel twice and depending on the value you enter, display next panel accrodingly. |
|
Back to top |
|
|
acevedo Beginner
Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Tue Oct 30, 2007 3:13 am Post subject: |
|
|
maybe using ATTRCHAR? for example?
Code: |
.ATTRCHAR([) = 'TYPE(TEXT) INTENS(NON)'
|
|
|
Back to top |
|
|
|
|