Insert Numbered Item - Insert an item into a specific index in a list of objects
This action adds an item into a specific place in a repetitive data element.
Usually, when there is a flow into a repetitive data element, each
object passed through the flow is added as the last instance in the
data element. Use Insert Numbered Item if you want to add an object “in the middle”
(e.g. add a Row to a Table
not as the last row).
<Parent> (non-repetitive trigger [required]): The parent of the repetitive data element
to update (a data structure or a display object).
<Item> (non-repetitive trigger [required]): The item to add (a data object or a display object).
The updated data element
is the first repetitive direct child of <Parent>
whose type is identical to that of <Item>.
For example, if <Parent> is the data structure below,
then if <Item> is a text, it is added to the Text 2 repetition,
but if <Item> is a number, it is added to the Number repetition:
contains multiple repetitive children with the same type as <Item>,
then the results are unpredictable.
<Index> (non-repetitive numeric trigger [required]):
The index in the updated data element at which <Item> is inserted
(1 to insert <Item> as the first object in the repetition,
the list size plus 1 to append <Item> at the end of the list).
<Inserted> (non-repetitive exit [not required]): The added object
(identical to <Item>).
<Invalid Parent> (non-repetitive exit [not required]): The parent object,
if it does not contain any child element.
<Invalid Item> (non-repetitive exit [not required]): The item to add,
if the parent does not contain the matching data element to update.
<Invalid Index> (non-repetitive exit [not required]): The value of <Index>,
if it is smaller than 1 or larger than the size of the list plus 1.
If an invalidity is detected, but the relevant exit
(<Invalid Parent>, <Invalid Item> or <Invalid Index>) is missing,
an exception is thrown.
"Common/Templates/Collections/Insert Numbered Item/Test 1/Test":