Warning: In WebDocs iSeries version 3.x, use 7. Lookups on either the Document Types or the Document Type Keys Maintenance pages.
 
To set up WebDocs iSeries search-page filters:
 
  1. Open the Document Custom Lookup Pulldown SQL Table for editing:

    UPDDTA FILE(RJSIMAGE/DOCLS00)                   

  2. To set up a new filter for a document title or or search key, press Page Down and enter the following parameters in a new record:
    • LSDOCTYPE - The Document Type code. Leave this parameter blank to include all Document Types. 
    • LSKEYVAL - Which field the filter is for. Use TITLE for the document title or USERKEY1 through USERKEY10 for search keys 1-10. 
    • LSSQLSTM - Any custom predefined SQL WHERE criteria.

      For example: CUSNUM >= 300000 and CUSNUM <= 399999

    • LSTABLE - The iSeries library and file name in the format LIBRARY/FILENAME.

      For example: QIWS/QCUSTCDT

    • LSLOOKUP1 - The first column to display in the look-up window. This may be a description or a code number. For numeric values, use CHAR( ) to display the data in character format.

      For example (a character field): LSTNAM

      For example (an expression):'Timesheet for ' concat strip(init) concat ' ' concat strip(lstnam)

      For example (a numeric field displayed as a character field): CHAR(CUSNUM)

    • LSLOOKUP2 - The second column to display in the look-up window. This may be a description or a code number. For numeric values, use CHAR( ) to display the data in character format.

      For example (a character field): LSTNAM

      For example (an expression):'Timesheet for ' concat strip(init) concat ' ' concat strip(lstnam)

      For example (a numeric field displayed as a character field): CHAR(CUSNUM)

      Note: You must have a value for at least one of LSLOOKUP1 or LSLOOKUP2.

  3. (Optional) Enter any of the optional parameters you need to:
    • LSORDERBY ? The column number or numbers by which to sort the list. If you use both field numbers, separate them with a comma.
    • LSLOOKTYP1 - N to prevent users from selecting a value from column 1. Leave this parameter blank to let the user click the first column.
    • LSLOOKTYP2 - N to prevent users from selecting a value from column 2. Leave this parameter blank to let the user click the second column.
    • LSUSERPGM - Y to call a user-defined program to create the look-up list. You can find an example in member DOCLOOKR of source file RJSIMAGE/SOURCE.

      Note: You must have a value in at least one of LSLOOKUP1 and LSLOOKUP2 for the columns to display.

    • LSPGM - The name of the program to create the look-up list.
    • LSPGMLIB - The library of the program to create the look-up list.

Sample

The following example creates a look-up using the document title when all Document Types are selected. This look-up accesses the QCUSTCDT customer sample file in library QIWS, selects customer numbers 1 through 999999, and only allows the user to select the customer number.
LSDOCTYPE:  
LSKEYVAL:  TITLE                                                           
LSSQLSTM:  CUSNUM >= 1 AND CUSNUM <= 999999                               
LSTABLE:   QIWS/QCUSTCDT                                                       
LSLOOKUP1: CHAR(CUSNUM)                                                        
LSLOOKUP2: LSTNAM
LSLOOKTYP1:
LSLOOKTYP2: N

Testing the Sample Look-Up Setting

  1. Log in to the WebDocs iSeries web interface and go to the document search page.
  2. In Document Type, choose All Document Types
  3. Click the button on the right side of the search screen.

    A list of customer selections displays for custom information.

Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case