12 4 2 Field Conditioning Attributes

LANSA Technical

12.4.2 Field Conditioning Attributes

Attributes

Description

*axxxxxxxx

Where *axxxxxxxx is the name of a condition previously defined by a DEF_COND command. The name *axxxxxxxx must conform to the naming standard that applies to defining conditions. Using a condition name that conflicts with another type of attribute name is not advisable (e.g.: *UL, *IN, etc) 

Use of an *axxxxxxxx attribute alone indicates that the associated field should only appear on the screen panel or report when the condition is true.

*INOUTCOND  *IOCOND

These attributes are synonyms.

Use of these attributes with the *axxxxxxxx attribute specifies that it is not the presence or absence of the field on the screen panel that is to be conditioned, but rather whether or not the field is protected from input or change by the user.

If the associated condition is true, then the field will be input capable (regardless of the current screen mode). Similarly, if the associated condition is not true then the field will be protected from input (regardless of the current screen mode).

If you use more than one *IOCOND (or *INOUTCOND) as a field attribute, only the last one will be used to control whether the field is input capable or not. Any others are ignored.

Important notes:

This attribute is not valid in report layouts. Additionally, this attribute was implemented for special situations encountered by some users. If you find that you are using it continuously, on many fields on many panels, then you should seriously consider simplifying the architecture of your application to reduce the usage of this attribute.

 

 

Example:

This command cause a display panel to be created so that the field #SALARY only appears on the screen panel when the department number is 462 (accounting department) or the application group is HOFF (Head Office):

DEF_COND NAME(*AUTSAL) COND('(#DEPT = 462) *OR (#GROUP = HOFF)')

DISPLAY  FIELDS(#A #B (#SALARY *AUTSAL) #C #D #E #F)

 

However, the commands cause a display panel to be created so that the field #SALARY is input capable when the department number is 462 (accounting department) or the application group is HOFF (Head Office). In all other cases field SALARY will appear, but it will be protected from input (ie: change) by the user:

DEF_COND NAME(*CHGSAL) COND('(#DEPT = 462) *OR (#GROUP = HOFF)')

DISPLAY  FIELDS(#A #B (#SALARY *CHGSAL *IOCOND) #C #D #E #F)