1. Create a new WAM:

         Name: iiiDspEmpDocs
         Description: Display Employee Documents
         Layout Weblet: iiilay01
  2. Define your WAM based on the following logic:
  3. Compile iiiDspEmpDocs and open the WebRoutine BEGIN in the Design view. It should look like the following:



  4. Drop a Push Button weblet alongside the employee number field.
    Set up the push button properties:

    Property

    Value

    Caption

    Details

    On_click_wrname

    BEGIN

    submitExtraFields

    Field Name: STDRENTRY


    Literal value: S

  5. Save your changes.

  6. Select the column heading "Document long file" and delete it.
    Type in a new the column heading "Employee Documents".
    You may need to click somewhere else in the layout, to refresh the column heading with your changes.

  7. Save your changes.     Your design should look like the following:



  8. Drop an Anchor weblet into the file name column of the list (the left hand column). Ignore the increase in width of this column. At run time it will display with the width of the actual file names.
    Set up the Anchor weblet properties:

    Property

    Value

    Currentrowhfield

    PRIFILRRN

    Currentrownumval

    $PRIFILRRN

    On_click_wrname

    SEND_DOCUMENT

    Show_in_new_window

    True


    Save your changes.

  9. Execute and test your WAM in the browser.

    1. Enter employee number A0070 and select the Details push button. Your web page should look like the following:



    2. Select one of the documents shown in the list. The document should be displayed in a new browser window.

Continue at Step 4. Enhance Appearance of the Documents List (Optional).