[Automise Professional Edition]

The Stack/Queue Insert Item action is used to push an item at a particular location in the list.

Insert Item

Stack/Queue name

Select the name of the list which you want to add new items to.  If there aren't any items in this list, you need to use the Stack or Queue Define Action action to create a new list.

Item to Insert

The text of the item to insert into the list

At Index

The index to insert the item.  Specifying an invalid index will cause the action to fail.  The index is zero based.

Expand variables before insert

If you specify variables as part of the text to push, eg. %MyVariable% then selecting this option will expand the variables before the item is pushed onto the list.

Using this action requires you to understand the underlying implementation.  Internally both queues and stacks are represented by a zero based array.  Items are always popped from element 0.  A stack pushes new items at element 0, whereas a queue adds new elements to the end of the array.
  • No labels