Adding expressions for explicit indexing consists of the following activities:
Explicit indexing allows you to incorporate complex array processing into the Action Diagram and resulting generated code. You can specify the Action Diagram expressions for explicit indexing to refer to specific entries in a repeating group view (or table). Explicitly indexed repeating group views have user–accessible indexes that are used as any other numeric attribute view.
The explicit indexing expressions are:
For example, consider a group view (or table) that contains 10 occurrences of entity views (or items) and you want to reference the second occurrence. You would specify SUBSCRIPT set to 2 in the SET statement to have the subscript point directly to the second occurrence in the repeating group view. In another statement, you want to reference the last view in the same repeating group view where the first five items contain data. Using LAST in the SET statement points to the fifth view in the group view. Finally, in another statement, you want to reference the last view in the group view that now has six items filled with data. Using the MAX index variable points to the tenth view (the maximum for the repeating group view) even though only six views are filled.
You observe the following rules concerning explicit indexing:
The SET statements in the following example set a SUBSCRIPT OF a repeating group view defined as explicitly indexed. This example illustrates the position of the SET statements containing SUBSCRIPT expressions. It also illustrates how the subscript increments by a value of 1.
Note: The export_list is explicitly indexed and local_list is implicitly indexed.
READ EACH customer WHERE DESIRED customer places SOME order TARGETING local_list FROM THE BEGINNING UNTIL FULL SET SUBSCRIPT OF export_list TO 1 FOR EACH local_list MOVE local customer TO export customer SET SUBSCRIPT OF export_list TO SUBSCRIPT OF export_list + 1
|
Copyright © 2014 CA.
All rights reserved.
|
|