Show Contents List
In this step, you will create a component that will contain a link using an <a href> and an image (based on the value of the PHONEBUS field). This component will be included in the browse list used in function iiiFN11 and it will be used to call an Employee Details function (iiiFN12).
1. Using the Web Function Editor, create a new HTML page.
2. When the new page appears, delete all of the default HTML code.
3. Add the following lines to the page (where iii is your course assigned ID and ppp=partition):
EMPNO(A0050):<RDML MERGE="EMPNO">" target="New Employee">
<img src="/IMAGES/<RDML MERGE="PHONEBUS">" border="0">
Reminder: The <a href> link will not automatically exchange the WEBEEVENT data as it uses a new Web job. The Employee Number parameter is passed as part of the function call so that the iiiFN12 Employee Details function can retrieve the required data from the PSLMST file. The iiiFN12 Employee Details function is also opened in a new browser window.
4. Save your document as iiiIMAGE with description Employee Image.
5. Using the Web Function Editor, open the Maintain Components window.
6. Select Add, to add a new component as follows (where iii is your course assigned ID):
7. Working with your iiiPROC03 process, edit the function named iiiFN11 Employee List.
8. Define a new field iiiIMAGE based on the #PHONEBUS field and add the iiiIMAGE field to the browse list iiiEMPLST. Also add the PHONEBUS (which contains the name of the employee image graphic file name) as a *HIDDEN field.
Your function should appear as follows (where iii is your course assigned ID):
FUNCTION (*DIRECT *WEBEVENT)
DEFINE FIELD(#iiiIMAGE) REFFLD(#PHONEBUS)
DEF_LIST NAME(#iiiEMPLST) FIELDS((#iiiIMAGE *NOID) (#EMPNO) (#GIVENAME) (#SURNAME) (#PHONEBUS *HIDDEN)) ENTRYS(9999)
SELECT FIELDS((#iiiEMPLST)) FROM_FILE(PSLMST1) WITH_KEY(#iiiDEPTWK #iiiSECTWK) IO_STATUS(*STATUS) IO_ERROR(*NEXT) VAL_ERROR(*NEXT)
DISPLAY FIELDS((#iiiDEPTWK) (#iiiSECTWK)) BROWSELIST(#iiiEMPLST) EXIT_KEY(*NO) MENU_KEY(*NO)
9. Exit and save your RDML function.
10. Compile your function.
Show Contents List