1. This WebRoutine will support display, update and delete of the selected Section record. Consider the logic that needs to be supported by this WebRoutine.

    1. What fields and lists need to be mapped?
    2. How to control the code to be executed each time this WebRoutine is invoked?
    3. What work fields will be required to retain key values?
    4. Whether to transfer control back to the Begin WebRoutine after a successful update or deletion?

  2. At the WAM level, define a work field and a Group_by statement.

    1. Define a work field, SECTW based on field SECTION. This will retain current value of SECTION.
    2. Define a Group_by, SEC_DETL for all fields in the file SECTAB. Fields DEPTMENT and SECTION should have a display attribute of *output.

  3. Create a Details WebRoutine based on the outline following:
     
  4. Recompile your WAM and open the Design view for the Details WebRoutine. Your page should look like the following:



  5. If the Department and Section code fields have a combo box field visualization weblet defined in the Repository, select each of them and use the context menu to Replace with output field. Fields with a visualization weblet defined, will not display on the page in "output" mode.

  6. Use the context menu to Add a row to the bottom of the table, and drop a Push Button with Image into each cell.

  7. Set up the push button properties based on the following:

    Property

    Value

    caption

    Update

    left_relative_image

    icons/normal/16/check_mark_16.png

    on_click_wrname

    Details

    submitExtraFields


    Field Name: STDRENTRY

    Literal Value: U

    caption

    Delete

    left_relative_image

    icons/normal/16/cross_16.png

    on_click_wrname

    Details

    submitExtraFields


    Field Name: STDRENTRY

    Literal Value: D


    The left_relative_image and submitExtraFields properties should be selected using the Ellipsis button and the Design of… dialog.

  8. Save your web page design.Your completed design should look like the following:



  9. Re-test your WAM. Check what happens on a successful update or delete. Check what happens after an update with a validation error.