Ways to Find an Item in a List of Data

There are several ways to find a particular item in a list of data. These steps include Find First In List, Find Last In List, Index of Item in List, and Get Item by Index.

Find First In List

The Find First in List step is used to determine the first object in an array of a defined Decisions data type. The step takes the initial array of objects via the Input Collection input in conjunction with the Type drop-down menu. The step outputs this value as a singular object that reflects the defined datatype from the Type menu.

Find Last In List

The Find Last in List step is used to determine the last object in an array of a defined Decisions data type. The step takes the initial array of objects via the Input Collection input in conjunction with the Type drop-down menu. The step outputs this value as a singular object that reflects the defined datatype from the Type menu.

Index of Item in List

The Index of Items in List step is used to find the index of an item in a list, with the index starting at zero. The step accomplishes this task by taking in user-defined ListType, values of that ListType, and a single item to find from that list. The step then evaluates to find the item's index with the given list.

Get Item by Index

The Get Item By Index step is used to find an object in a list based on a user input index value (starting with 0). The step utilizes the user input ListType value to evaluate the type of values that will be filtered through. Then, the step uses the user input Item Index value to determine which value in the list will be filtered out. This step can retrieve the specified element from a list and make it available as a single object. 


Documentation regarding the described steps:

https://documentation.decisions.com/step-library/docs/find-first-in-list

https://documentation.decisions.com/step-library/docs/find-last-in-list

https://documentation.decisions.com/step-library/docs/index-of-item-in-list

https://documentation.decisions.com/step-library/docs/get-item-by-index

Sign In or Register to comment.