Step 1. Create Page Component for Function iiiFN11

In this step, you will create a page component for the iiiFN11 Employee List function which contains a browse list. The page component will allow you to easily manipulate the appearance of the browse list and it will prevent changes to the HTML from being replaced when the function is recompiled.

1.  Using the Web Function Editor, open a new document.

2.  Delete the default HTML which appears in the new page.

3.  Open the iiiPROC03 iiiFN11001 HTML page.

     Copy all the HTML statements in the table definition, i.e. copy all code between the following tags:

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=3>

<TBODY>

 

copy all HTML code here including the tag below, but do not include the table tags shown above.

 

<BR>

 

<RDML MERGE="@BLiiiEMPLST  ">

 

 

4.Paste the HTML code into your new page.

     Your code should appear as follows:

<TR>

</TR>

<TR>

<TD><STRONG><RDML MERGE="@T0021+0323+0337"></STRONG></TD>

<RDML ONMODE="DIS">

<TD><RDML MERGE="iiiDEPTWK "></TD>

</RDML>

<RDML ONMODE="DLT">

<TD><RDML MERGE="iiiDEPTWK "></TD>

</RDML>

<RDML ONMODE="ADD">

<TD><INPUT NAME="AiiiDEPTWK" TYPE="TEXT" SIZE="004" MAXLENGTH="004"

VALUE="<RDML MERGE="iiiDEPTWK ">"

onFocus="SetNameLocation('AiiiDEPTWK',03,18)"></TD>

</RDML>

<RDML ONMODE="CHG">

<TD><INPUT NAME="AiiiDEPTWK" TYPE="TEXT" SIZE="004" MAXLENGTH="004"

VALUE="<RDML MERGE="iiiDEPTWK ">"

onFocus="SetNameLocation('AiiiDEPTWK',03,18)"></TD>

</RDML>

</TR>

<TR>

<TD><STRONG><RDML MERGE="@T0022+0338+0352"></STRONG></TD>

<RDML ONMODE="DIS">

<TD><RDML MERGE="iiiSECTWK "></TD>

</RDML>

<RDML ONMODE="DLT">

<TD><RDML MERGE="iiiSECTWK "></TD>

</RDML>

<RDML ONMODE="ADD">

<TD><INPUT NAME="AiiiSECTWK" TYPE="TEXT" SIZE="002" MAXLENGTH="002"

VALUE="<RDML MERGE="iiiSECTWK ">"

onFocus="SetNameLocation('AiiiSECTWK',04,18)"></TD>

</RDML>

<RDML ONMODE="CHG">

<TD><INPUT NAME="AiiiSECTWK" TYPE="TEXT" SIZE="002" MAXLENGTH="002"

VALUE="<RDML MERGE="iiiSECTWK ">"

onFocus="SetNameLocation('AiiiSECTWK',04,18)"></TD>

</RDML>

</TR>

 

</TBODY>

</TABLE>

</FONT>

 

<BR>

 

<RDML MERGE="@BLiiiEMPLST  ">

 

5.  Manually type the names of the iiiDEPTWK and iiiSECTWK fields instead of using the  <RDML MERGE=”@T…….” tags.

     The final pages should appear as follows(changes are bold):

<TR>

</TR>

<TR>

<TD><STRONG>Department</STRONG></TD>

<RDML ONMODE="DIS">

<TD><RDML MERGE="iiiDEPTWK "></TD>

</RDML>

<RDML ONMODE="DLT">

<TD><RDML MERGE="iiiDEPTWK "></TD>

</RDML>

<RDML ONMODE="ADD">

<TD><INPUT NAME="AiiiDEPTWK" TYPE="TEXT" SIZE="004" MAXLENGTH="004"

VALUE="<RDML MERGE="iiiDEPTWK ">"

onFocus="SetNameLocation('AiiiDEPTWK',03,18)"></TD>

</RDML>

<RDML ONMODE="CHG">

<TD><INPUT NAME="AiiiDEPTWK" TYPE="TEXT" SIZE="004" MAXLENGTH="004"

VALUE="<RDML MERGE="iiiDEPTWK ">"

onFocus="SetNameLocation('AiiiDEPTWK',03,18)"></TD>

</RDML>

</TR>

<TR>

<TD><STRONG>Section</STRONG></TD>

<RDML ONMODE="DIS">

<TD><RDML MERGE="iiiSECTWK "></TD>

</RDML>

<RDML ONMODE="DLT">

<TD><RDML MERGE="iiiSECTWK "></TD>

</RDML>

<RDML ONMODE="ADD">

<TD><INPUT NAME="AiiiSECTWK" TYPE="TEXT" SIZE="002" MAXLENGTH="002"

VALUE="<RDML MERGE="iiiSECTWK ">"

onFocus="SetNameLocation('AiiiSECTWK',04,18)"></TD>

</RDML>

<RDML ONMODE="CHG">

<TD><INPUT NAME="AiiiSECTWK" TYPE="TEXT" SIZE="002" MAXLENGTH="002"

VALUE="<RDML MERGE="iiiSECTWK ">"

onFocus="SetNameLocation('AiiiSECTWK',04,18)"></TD>

</RDML>

</TR>

 

</TBODY>

</TABLE>

</FONT>

 

<BR>

 

<RDML MERGE="@BLiiiEMPLST  ">

 

6.  Save the document as iiiFN11P with description iiiFN11 Page Component.

7.  Using the Web Function Editor, open the Maintain Components window.

8.  Select Add, to add a new component as follows (where iii is your course assigned ID):

Component

iiiFN11P

Type

Page

 

 

Description

iiiFN11 Page Component

Page

iiiFN11P

Mode

OUTPUT

 

  

9.  Close the Maintain Components window.

10.   Working with your iiiPROC03 process, edit the function named iiiFN11 Employee List.

     Define a new field iiiFN11P which will be used for the Web page component iiiFN11P.

     You will manually insert a Display command prior to the display command that is already in this function.  It will display only one field iiiFN11P with an attribute of *NOID.

     The finished code might appear as follows:

FUNCTION  (*DIRECT *WEBEVENT)
DEFINE    FIELD(#iiiIMAGE) REFFLD(#PHONEBUS)
DEFINE    FIELD(#iiiFN11P) TYPE(*CHAR) LENGTH(1)
DEF_LIST  NAME(#iiiEMPLST) FIELDS((#iiiIMAGE *NOID)(#EMPNO)(#GIVENAME) (#SURNAME)(#PHONEBUS *HIDDEN))                
CLR_LIST  NAMED(#iiiEMPLST)
SELECT    FIELDS((#iiiEMPLST)) FROM_FILE(PSLMST1) WITH_KEY(#iiiDEPTWK #iiiSECTWK) IO_STATUS(*STATUS) IO_ERROR(*NEXT) VAL_ERROR(*NEXT)                                           
ADD_ENTRY TO_LIST(#iiiEMPLST)
ENDSELECT
DISPLAY   FIELDS((#iiiFN11P *NOID)) EXIT_KEY(*NO) MENU_KEY(*NO)
DISPLAY   FIELDS((#iiiDEPTWK) (#iiiSECTWK)) BROWSELIST(#iiiEMPLST) EXIT_KEY(*NO) MENU_KEY(*NO)

 

  

11.  Exit and save your RDML function.

12.  Compile your RDML function iiiPROC03/iiiFN11.