This statement inserts a blank row into an updateable repeating group. The empty row can then be filled with data.
The empty row may be added BEFORE or AFTER the current index if the index expression is omitted.
An index expression may be specified for explicitly indexed group views. There is no need to refresh the list or to have complex expansion logic in the action diagram.
The next sample code shows adding an empty row and subsequently filling it.
--- EVENT ACTION account_double_click | GET ROW CLICKED IN export_account STARTING AT 1 GIVING SUBSCRIPT | OF export_account | | --- EXIT STATE IS aok | |--- FOR SUBSCRIPT OF export_budget FROM 1 TO LAST OF export_budget BY 1 | | | | --- IF export_line_budget account number IS EQUAL TO export_line | | | account number | | --- EXIT STAT 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_line 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 ---
The logic operates on two group views that contain the account entity type. The first view contains a list of all accounts. The second view contains the list of accounts for which budgets exist.
The user double-clicks on an account from the first view to select it for inclusion in the second view.
Duplicates are not allowed and are checked in the first FOR loop.
The remainder of the logic places the account number selected into account number sequence in the second view.
|
Copyright © 2013 CA.
All rights reserved.
|
|