Examples of use - List steps
This is an example that shows how to use the following steps:
- Create New List Step
- Add New Element To List Step
- Get Element Position in List Step
- Delete Duplicate List Values Step
- Remove Item From List Step
- List Comparison Step
- Merge List Step
- Sort List Step
- Clear List Step
Create New List Step
First, we will create a new list of string values called `NewList`, which will initially contain three elements: "First", "Second", and "Third". Note that the elements start with a 0 index (the first list element is at index [0]).
Add New Element To List Step
Next, we will add the element "First" as the last element of the list. We can do this by selecting the "Add to the end of list" option. Finally, we will save the output list in the first list and store the number of elements in a new variable called `ElementCount`.
Get Element Position in List Step
If you want to check the position of your element, use the "Get Element Position in List" step. For the ListOfString, you can specify whether the check is case sensitive or not.
Delete Duplicate List Values Step
In this step, you can remove all duplicate values from the list. For the ListOfString, you can specify whether the check is case sensitive or not.
Remove Item From List Step
If you want to remove an item from the list, you can do so by either its value or its position. In this case, we will choose to remove the item by its value. The search will be case-insensitive.
List Comparison Step
For list comparison, you can choose whether to check if the second list is a subset or an exact match of the first list.
Merge List Step
If you want to merge two lists, they must be the same type (string or integer), and you need to decide whether to ignore duplicates.
Sort List Step
In this step, you can sort the list items in ascending (ASC) or descending (DSC) order.
Clear List Step
If you want to remove all elements from the list, use the clear method and your list will be empty.