You can obtain the current index of a page of a page list or page group property over which a rule is iterating by using the using the <current> and Top keywords. You can use these keywords in a rule type that has a Pages & Classes tab, such as an activity.
The index is a value that identifies one element (or member) of an aggregate data structure. For example, page lists contain an ordered list of pages, with each page identified by an integer value, starting with 1.
You can also obtain the current index value by using the <current>
keyword with the page name instead of the Top keyword in a rule form, such as a data transform.
When a rule iterates over a page group or page list property, you can use the <current> and TOP keywords to obtain a the current index of the top-level page over which a step in the activity is iterating.
For example, to obtain the current index of the of the pyNotes page list property, you can configure the activity with the following settings:
TOP
keyword in the Pages & Classes tab.Property-Set
method with the following properties and values:Local.Counter
property with a value of Local.Counter
+ 1Top.pyNotes(<current>).pylabel
with a value of "label" + Local.Counter
After you run the activity, the XML of the page displays the current index value of the pyNotes page over which you are iterating. For example:
<pagedata>
<pxObjClass>OJF777-MSApp-Work</pxObjClass>
<pzStatus>valid</pzstatus>
<pyNotes REPEATINGTYPE ="PAGELIST">
<rowdata REPEATIONGINDEX="1">
<pxObjClass>Data-WorkAttach-Note</pxObjClass>
<pyNote>Note1</pyNotes>
</pyLabel>label 1</pyLabel>
</rowdata>
<rowdata REPEATINGINDEX="2">
<pxObjClass>Data-WorkAttach-Note</pxObjClass>
<pyNote>Note2</pyNote>
<pyLabel>label 2</pyLabel>
</rowdata>
</pyNotes>
</pagedata>
You can use the <current> keyword in a data transform to obtain the current index of the page list or page group property over which a step in the data transform iterates.
For example, to obtain the current index of the pyNotes page list property, you use the following actions:
For Each Page In
action with a target of .pyNotes
Set
action with a target of .pyNotes (<current>).pyLabel