Previous Topic: HIGHLIGHT Statement for the Last Entity AddedNext Topic: GET ROW HIGHLIGHTED Statement


UNHIGHLIGHT Statement for a Changed Entity

 --- EVENT ACTION change_department_pb_ok_click
|    MOVE input_department department TO output_department  department
|    GET ROW HIGHLIGHTED IN  export_department STARTING AT  1 GIVING
|        SUBSCRIPT OF export_department
|     --- IF SUBSCRIPT OF export_department IS GREATER THAN  0
|    |     --- READ department
|    |    |    WHERE DESIRED department number IS EQUAL TO
|    |    |    input_department department number
|    |    |--- WHEN successful
|    |    |     --- UPDATE department
|    |    |    |    SET manager TO input_department department manager
|    |    |    |    SET description TO input_department department description
|    |    |    |--- WHEN successful
|    |    |    |    MOVE input_department department TO
|    |    |    |        export_department_line department
|    |    |    |    CLOSE Dialog Box change_department
|    |    |    |    UNHIGHLIGHT export_department AT SUBSCRIPT OF
|    |    |    |        export_department
|    |    |    |--- WHEN not unique
|    |    |    |    EXIT STATE IS system_error
|    |    |    |--- WHEN permitted value violation
|    |    |    |    EXIT STATE IS dept_invalid_permitted_values
|    |    |     ---
|    |     --- WHEN not found
|    |         EXIT STATE IS department_not_found WITH ROLLBA CK
|     ---
 ---

The sample code shows the removal of the highlight from a list box after the highlighted row has been changed. This is particularly important if the system allows multiple rows to be highlighted, each being processed in some defined sequence.

This was done to let the user easily change an entry just made. In addition to being highlighted, the account is added to the export view used to change accounts.

The user does not have to click on a field if the default highlighted is their choice.