Number Collection Get Value
Overview
This action lets you easily retrieve a specific number from a collection of numbers. You can choose to get the first number, the last number, or a number at a specific position within the collection.
How it Helps
Imagine you have a collection of order totals and need to find the highest total quickly. This action lets you retrieve the last number from a sorted collection (assuming it's sorted in ascending order) without writing any loops or complex formulas.
When to Use It
This action is ideal for:
Accessing specific numbers in a collection.
Retrieving the first, last, or any number by its position in the collection.
Simplifying number retrieval without manual searching or complex formulas.
Working with ordered collections where the position of numbers is important.
Example
To calculate the difference between the first and last values in a series of measurements:
Create a Number Collection: Have a Number Collection variable storing a series of measurements.
Configure the Action (First Value): Select the Number Collection variable and choose "First" as the operation to get the first measurement.
Configure the Action (Last Value): Repeat the previous step, but choose "Last" as the operation to get the last measurement.
Calculate the Difference: Use a Formula element to subtract the first and last values.
Key Considerations
Source Collection: Ensure you have a valid collection of numbers.
Operation: Choose the appropriate operation:
First: Retrieves the first number in the collection.
Last: Retrieves the last number in the collection.
At Index: Retrieves the number at a specific numerical index (starting from 0)
Last updated