Step 1. Create a New Function

In this step you will create a new function which is a duplicate of your iiiFN05 function. The iiiFN08 function, like iiiFN05, will be used with the iiiFN06 function to display a listing of sections. (Remember to substitute iii with your initials.)

1.  Working with your iiiPROC03 process, create a new function named iiiFN08 Request Department. (Tip: You may to copy your existing iiiFN05 function to start the iiiFN08 function.)

2.  The RDML code in your iiiFN08 function should appear as follows:

FUNCTION  OPTIONS(*DIRECT *WEBEVENT)
DEFINE    FIELD(#iiiFN08C) TYPE(*CHAR) LENGTH(1)
CHANGE    FIELD(#DEPTMENT) TO(*DEFAULT)
REQUEST   FIELDS((#iiiFN08C *NOID)) DESIGN(*DOWN) IDENTIFY(*DESC) MENU_KEY(*NO) EXIT_KEY(*NO) USER_KEYS((01 SEARCH))
REQUEST   FIELDS((#DEPTMENT)( #STD_DATE)) DESIGN(*DOWN) IDENTIFY(*DESC) MENU_KEY(*NO) EXIT_KEY(*NO) USER_KEYS((01 SEARCH))

 

   

       Following are some important notes about this function:

     The field iiiFN08C is simply created for Web component substitution. The field uses *NOID as no description is required. In Step 2, you will create the HTML for this page component.

     This function has two REQUEST commands. Only the first REQUEST will be processed in the WEBEVENT function but HTML pages will be created for both commands. You will use the generated HTML from the second REQUEST to create the iiiFN08C Page component.

3.  Do not compile your function until after you define your Web component.

4.  Use the Tools menu category and select the Keywords - Maintain option. Do not enter a Process. Press the OK button to continue. Press the Add button to create a link to by entering the following information:

Process

iiiPROC03

Function

iiiFN08

Keyword

SEARCH

Description

Search

Linked Process

iiiPROC03

Linked Function

iiiFN06