last function. Collection.(Power Automate Cloud flows)

Japanese version.

Function to get the last item in an array.

last also has a separate function of the same name to get the last character of the text.

It works in the opposite way to first.


collectionRequired fieldTarget arrray.

How to use

In most cases, it is used to initialize or set variables.

The type depends on the data handled by the array.

Clicking on last in the "Expression" tab sets the function name and () in the formula field.

You can change the contents of the function by clicking on the purple icon.

When dynamic content or variables are used in expressions, special specifications are required.

(How to get dynamic content with expressions.)

Examples of arguments and results

In this case, array variables [100,200,300] are provided as an example.


For example, last(variables('array')) will result in 300.

Since the array item data type in this example is integer, "Type" should be "Integer".

For those who want to learn Power Automate Cloud flow effectively

The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Cloud flow to streamline your workflow.


Collection Functions(Power Automate Cloud flows)