Remove Last Item from Collection

Removes the item at the last index within the collection, decreasing the count of items by one.

You can use this action to remove the last item in a collection. For example, in the target collection below containing four items (index 0-3), the item at index 3 is stored in a different variable and removed from the collection.

Target collection

Index Item
0 Andy
1 Jim
2 John
3 Sally

 

 

Output

Index Item
0 Andy
1 Jim
2 John

To learn more about collection actions, complete the Nintex for Office 365 - Collection Operations course on Nintex University.

Action settings

Do one of the following to open the Action configuration window:

  • Double-click the action.
  • Click on the action and then click Configure.

See Action configuration window for more information.

Field Description
Target collection The collection variable to remove the last item from.

Value of last item

Variable to store the value of the last item to be removed.

Output

Collection variable to store the collection with the last item removed.

For more information about how to use Lookups in configuration fields, see Lookups in action configuration fields.