--- EVENT ACTION account_double_click | GET ROW CLICKED IN export_account STARTING AT 1 GIVIN G SUBSCRIPT | OF export_account | --- EXIT STATE IS aok | | FOR SUBSCRIPT OF export_budget FROM 1 TO LAST OF e xport_budget BY 1 | | --- IF export_line_budget account number IS EQUAL TO | | | export_line account number | | --- EXIT STATE IS duplicate_accounts | --- | --- IF EXIT STATE IS EQUAL TO aok | | --- FOR SUBSCRIPT OF export_budget FROM 1 TO LAST OF | | | export_budget BY 1 | | | --- IF export_line_budget account number IS GREATER THAN | | | | export_ account number | | | | ADD EMPTY ROW TO export_budget BEFORE SU BSCRIPT OF | | | | export_budget | | | | MOVE export_line account TO export_line_budget account | | | --- ESCAPE | | --- | | --- IF LAST OF export_budget IS EQUAL TO 1 | | | ADD EMPTY ROW TO export_budget AFTER 0 | | | SET SUBSCRIPT OF export_budget TO 1 | | |--- ELSE | | | ADD EMPTY ROW TO export_budget BEFORE LAST OF export_budget | | --- SET SUBSCRIPT OF export_budget TO LAST OF expo rt_budget - 1 | --- MOVE export_line account TO export_line_budget account ---
In the sample code, budgets can be added for each account. The accounts are selected from an accounts list. This logic finds the account that was double-clicked and then checks for a duplicate budget. If no duplicate is found, the account is added to the budget list.
The selection indicator for the repeating group view that indicates what row is selected changes when associated with the clicked event handler:
Note: The selection indicator remains an asterisk symbol (*) for non-event handler procedure logic.
GET ROW HIGHLIGHTED is preferred to GET ROW CLICKED because with the latter, the event handler logic must check the indicator to see if the row has been deselected and should not be processed. With GET ROW HIGHLIGHTED, the mouse controls the highlighting, and no checks are necessary to see if a row has been unhighlighted.
|
Copyright © 2013 CA.
All rights reserved.
|
|