Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : OPTIONLISTER

OPTIONLISTER
Displays options in columns and returns the ones selected (C).
Invocation
CALL OPTIONLISTER(optionlistname)
 
Usage Notes
The selected options are stored in the temporary table @SELECTED_OPTION and they must be retrieved from the table for any additional action. The table @SELECTED_OPTION has the following fields: NAME, DESC1, DESC2.
Fields of the @OPTIONS Table
 
It can display a maximum of 4 columns, depending on the length of the source field and the number of description columns included. If description columns are included, only one option column can be defined. See FIELD and DESCRIPTION_COLS below for more information.
It contains the field that holds the values for the option listed and the fields used to describe the option values. The table cannot be parameterized. If the primary source table is parameterized, you can create a subview table based on the required table instance.
The values displayed for the field are truncated if the length of field is greater than space allocated due to the number of OPTION_COLS and DESCRIPTION_COLS.
Number of DESCRIPTION_COLS
Number of OPTION_COLS
Length of Option field value
Valid entries are a positive integer or asterisk (*). If asterisk (*) is entered, the users are not limited in their number of selections.
The number of columns used to provide additional information about the option listed.
There can be 0, 1 or 2 columns. If there is 1 column, a maximum of 58 characters of information can be entered. If there are 2 columns, the first column can hold up to 16 characters of information and the second column can hold up to 40 characters of information.
Example
The option SEL_DEPARTMENT is defined as follows:

 
--- SINGLE OCCURRENCE EDITOR ---
EDITING TABLE : @OPTIONS
TABLE TYPE : TDS
COMMAND ==>
------------------------------------------------------------------------
NAME : SEL_DEPARTMENT
OPTION_COLS : 1
TABLE : DEPARTMENT_SUB
FIELD : DEPTNO
MAX_SELECT : 1
TITLE : LIST OF VALID DEPARTMENT NUMBERS
DESCRIPTION_COLS : 1
DESCRIBE_FIELD1 : DNAME
DESCRIBE_FIELD2 :

 
SELECT_OPTION Rule
The example SELECT_OPTION rule:
1.
2.
3.
Retrieves the selected option from the @SELECTED_OPTION table and inserts it into the screen field DEPTNO of the screen table EMPLOYEE_INFO

 
SELECT_OPTION;
_ LOCAL MSG;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ CALL DELETE_DATA('EMPLOYEE_INFO(NEW_EMPLOYEE)', '', ''); |1
_ CALL OPTIONLISTER('SEL_DEPARTMENT'); |2
_ FORALL @SELECTED_OPTION: |3
_ EMPLOYEE_INFO.DEPTNO = @SELECTED_OPTION.NAME; |
_ INSERT EMPLOYEE_INFO('NEW_EMPLOYEE'); |
_ END; |
_ ------------------------------------------------------------------------

 
Selection Screen
The following screen appears for selection:

 
LIST OF VALID DEPARTMENT NUMBERS
COMMAND ==> SCROLL: P
DEPTNO DNAME
---------------- ---------------------------------------------------
_ 10 ACCOUNTING
_ 20 SALES
_ 30 PRE-SALES
_ 40 PRODUCT SUPPORT
_ 50 RESEARCH
_ 60 OPERATIONS
_ 70 PUBLICATIONS
 
 
 
 
 
 
 
 
 
 
< Place "S" beside the option(s) you wish to have Selected on PF3 >
PFKEYS: 1=HELP 3=SELECT 13=PRINT 12=EXIT

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved