Creating a Conditional Section

Conditional groups determine whether menu items associated with the conditional group will be displayed or active when the item's menu page is drawn or redrawn.

To create a new conditional, display the menu page you want to create a conditional for and select:

Utilities -> Edit Menu
New
-> Conditional

To edit an existing conditional, display the menu page you want to edit a conditional for and select:

Utilities -> Edit Menu -> Go
Edit Items
-> highlight conditional to edit -> Edit

Figure 8-8. Creating a Conditional

Menu Conditional Options

1

 Shows the menu page this conditional is associated with.

2

Specify the number of this conditional group. Any menu items that specify this conditional group will be displayed based on the state of this conditional.

3

Save yourself and those who come after you a lot of grief: enter a decent description of this conditional.

4

Select Evaluate condition to activate the evaluation criteria specified in item 7.

Select Force condition ON to make the conditional section true regardless of the outcome of the evaluation criteria.

Select Force condition OFF to set the conditional section false. The second two options are used primarily for development.

5

 The "Scope" group allows you to `nest' conditional sections. The nesting is based on the sequential ordering of the conditional sections. If conditional 1 is a primary section, and conditional 2 is a secondary section, both sections 1 and 2 will have to evaluate to true before section 2 would be true. If conditional 3 is a tertiary section, sections 1, 2, and 3 would have to be true for section 3 to be true. If conditional 4 is a tertiary section, sections 1, 2, and 4 would have to be true for section 4 to be true. If conditional 4 is a primary section, sections 1 and 2 will not affect sections 4 or higher.

6

Select Numerical comparison if the condition is based on a numeric database field, global V+ variable, or the ai.ctl[ ] array.

Select String comparison if the condition is based on a string (character) database field, global V+ string variable or the $ai.ctl[ ] array.

Select V+ Routine response if you want a V+ routine called to evaluate the conditional.

If a database value is selected, you must specify the database number, field, and index.

If an ai.ctl[ ]/$ai.ctl[ ] value is specified you must specify the index.

If a V+ routine is selected, you must specify the name of the V+ routine and an argument to pass to that routine. The calling sequence for a V+ conditional routine is described in Descriptions of Menu Spawn Routines (see menu.cnd.spawn (arg, db.p, draw)( )).

 

7

If a database, ai.ctl[ ], AIM variable, or V+ variable is selected, the conditional will compare the source value with the value entered in "value". The comparison will be made according to the selection made under "ON if". If the comparison is being made to a bit in a bit field, the bit to be evaluated is specified in "Bit number" (LSB is bit 1).

If a V+ routine response is selected, the routine will return the state of the conditional section.

8

 If this option is selected, the menu items associated with this conditional group will not be displayed when the conditional evaluates to false. If this option is not selected, the items will be dimmed and will not be active when the conditional section evaluates to false.