Step 5. Add Fields to the iiiFN08 Function

In this step, you will add another field to the REQUEST used in iiiFN08 to see how this will impact the iiiFN08C Web page component being used for the display.

1.  Edit the RDML code in your iiiFN08 function. Add the STD_NAME field to the CHANGE and REQUEST statements. Your RDML should appear as follows:

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

 

   

2.  Compile the iiiFN08 function.

3.  Open the iiiPROC03 iiiFN080002 HTML page. In this page, you will see the STD_NAME field added to the list of input fields. You could copy this new code to your iiiFN08C component.

4.  Edit the iiiFN08C page and add the bolded code (notice that the label for STD_NAME has been replaced by the words Requested By):

<tr>

<td><strong>Enter a Department Code:</strong></td>

</tr>

<tr>

<td><strong>Department Code<strong></td>

<td><input name="ADEPTMENT  " type="text" size="004" maxlength="004"

value="<RDML MERGE="DEPTMENT  ">"

onfocus="SetNameLocation('ADEPTMENT  ',03,29)" /></td>

<td><RDML COMPONENT="iiiWEBLINK"></td>

</tr>

<tr>

<td><strong>Standard Date</strong></td>

<td><input name="SSTD_DATE  " type="text" maxlength="008" align="right"

<RDML MERGE="STD_DATE  " EDITCODEI="Y">

onfocus="SetNameLocation('SSTD_DATE  ',04,29)" /></td>

<td><a href=".././index.htm" target="_blank"="/IMAGES/TB_CAL.GIF" 
alt="Calendar" border="0" width="70" height="21" hspace="0" vspace="0" align="left" /></a></td>

</tr>

<tr><td><strong>Requested By<strong></td><td><input name="LSTD_NAME " type="text" size="025" maxlength="025"value="<RDML MERGE="STD_NAME  ">"onfocus="SetNameLocation('LSTD_NAME ',05,29)" /></td></tr>

<tr>

<td><strong>Press NEXT to search.<strong></td>

</tr>

 

5.  Save your changes.

6.  Test your iiiFN08 function.