Setting Up Search Lookup Filters on WebDocs - iSeries Edition Search Screen
From Support
| | In version 3.x, you should use option 7=Lookups that is located on both document types and document type keys maintenance screens. |
To set up WebDocs - iSeries Edition search screen filters, do the following steps:
1.) Run the following command to open the Document Custom Lookup Pulldown SQL Table for editing.
UPDDTA FILE(RJSIMAGE/DOCLS00)
2.) Hit Page Down and enter the following parameters in a new record to set up a filter for a document title or keyword lookup selection.
- LSDOCTYPE - Enter the document type code; leave blank for all doc types.
- LSKEYVAL - Enter TITLE for document title or USERKEY1 - USERKEY10, depending on which document key field you want to hook the lookup into.
- LSSQLSTM - If you want to add a custom predefined SQL WHERE criteria filter, use this field.
Ex: CUSNUM >= 300000 and CUSNUM <= 399999
- LSTABLE - Enter the iSeries library/file name
Ex: QIWS/QCUSTCDT
- LSLOOKUP1 - Enter the first column field you would like to display in the lookup window. This will usually be a description or a code number you want to display. For any numeric field values, use the CHAR( ) function to convert the data to character format for display.
Ex (character field): LSTNAM
Ex (expression): 'Timesheet for ' concat strip(init) concat ' ' concat strip(lstnam)
Ex (numeric field converted to a character field): CHAR(CUSNUM)
- LSLOOKUP2 - Enter the second column field you would like to display in the lookup window. This will usually be a description or a code number you want to display. For any numeric field values, use the CHAR( ) function to convert the data to character format for display.
Ex (character field): LSTNAM
Ex (expression): 'Timesheet for ' concat strip(init) concat ' ' concat strip(lstnam)
Ex (numeric field converted to a character field): CHAR(CUSNUM)
NOTE: You must have a value for at least one of LSLOOKUP1 or LSLOOKUP2.
Optional parameters
- LSORDERBY – Enter the column number(s) by which the list should be sorted. If you use both field numbers, separate them with a comma.
- LSLOOKTYP1 - Enter 'n' or 'N' to make the first column non-clickable. I.e., to prevent users from selecting a value from column 1. Leave this value blank to let the user click in the first column.
- LSLOOKTYP2 - Enter 'n' or 'N' to make the second column non-clickable. I.e., to prevent users from selecting a value from column 2. Leave this value blank to let the user click in the second column.
- LSUSERPGM - Enter Y if you want to call a user-defined program that will create the lookup list. There is example source in member DOCLOOKR of source file RJSIMAGE/SOURCE.
NOTE: You must have some value in LSLOOKUP1 and/or LSLOOKUP2 in order for the column(s) to display.
- LSPGM - Enter the name of the program that will create the lookup list.
- LSPGMLIB - Enter the library where the program that will create the lookup list is located.
3.) Example of a lookup using the Doc Title field when "All Document Types" is selected for the document type field. This lookup accesses the QCUSTCDT customer sample file in library QIWS. Select customer numbers between 1 and 999999, inclusively. Only the customer number should be selectable.
DFU maintenance screen values for this example:
LSDOCTYPE: <Blank>
LSKEYVAL: TITLE
LSSQLSTM: CUSNUM >= 1 AND CUSNUM <= 999999
LSTABLE: QIWS/QCUSTCDT
LSLOOKUP1: CHAR(CUSNUM)
LSLOOKUP2: LSTNAM
LSLOOKTYP1: <Blank>
LSLOOKTYP2: N
Testing this new lookup setting:
Log into Image Server/400 and go to the document search screen. Make sure "All Doc Types" is selected in the Document Type field.
Click the button on the right side of the search screen; a list of customer selections should pop up for custom info.
If this works, you are all set. If not, contact RJS Software Systems for assistance.
