4min

List actions

After creating a process you will have the ability to use the drag and drop functionality to add on your canvas actions from the Platform actions section.

The Lists folder contains actions that can be used while working with lists:

1. List Add - Adding a given object into a list.

2. List Contains - Searching in a list for a given object. Return true if found, otherwise false.

3. List Index Of - Searching in a list for a given object. If found, return index, otherwise -1. 

4. List Remove - Remove a given object from a list 

5. List Sort - Sorting a list in descending or ascending order.

6. List Arithmetic Mean - Returns the arithmetic mean of the numbers in the list.

7. List Sum Of Elements - Sums up all the numbers of a list.

8. List Max Return - Returns the maximum value from a list.

9. List Min Return - Returns the minimum value from a list of numbers.

10. Return List Element Count - Returns the list's number of elements.

11. List Median Value Return - Returns the median value from a list of numbers.

12. Return Top N Elements - Returns the top N elements.

13. Return Last N Elements - Returns the last N elements.

14. Get X Element - Returns the value of the given index.

You can create your own custom actions by using these guides. The code used to create the Custom Actions above can be found here.

How to use List Actions

To use any of them inside your process you will need to configure it after adding it to the canvas.

1. Drag the List Add action on the canvas.

2. Link the actions.

Document image

3. Create a variable of type list and add it from Add variable.

Document image

4. Add a new object to your list.

Document image

5. SaveValidate and Run the process.

Document image



Updated 27 Apr 2022
Did this page help?
Yes
No