#ENABLE (enable/disable prompts) 

Top  Previous  Next

 

#ENABLE( expression ) [, CLEAR ] [, SECTION ]

    prompts

#ENDENABLE

#ENABLE

Begins a group of prompts which may be enabled or disabled based upon the evaluation of the expression.

expression

The expression which controls the prompt enable/disable.

CLEAR

Specifies the prompts symbol values are cleared when disabled.

SECTION

Specifies all AT() attributes for the prompts are positioned relative to the start of the #ENABLE section.

prompts

One or more #PROMPT, #BUTTON, #DISPLAY, #ENABLE, and/or #VALIDATE statements.

#ENDENABLE

Terminates the group of prompts.

The #ENABLE structure contains prompts which may be enabled or disabled based upon the evaluation of the expression. If the expression is true, the prompts are enabled, otherwise they are disabled. The prompts appear dimmed when disabled and the programmer may not enter data in them.

Example:

#PROMPT('Pick One',OPTION),%InputChoice          #!Mutually exclusive options

#PROMPT('Choice One',RADIO)

#PROMPT('Choice Two',RADIO)

#ENABLE(%InputChoice = 'Choice Two')

 #PROMPT('Screen Field',CONTROL),%SomeField     #!Enabled only for Choice Two

 #VALIDATE(%ScreenFieldType = 'LIST','Must select a list box')

#ENDENABLE

 

See Also:     #PROMPT ,#GROUP ,#BOXED ,#BUTTON