take function. Sring.(Power Automate Cloud flows)

Japanese version.

Get a specified number of characters of partial text from the beginning of the text.

There is also a function of the same name that retrieves a sub-array of the specified number of items from the beginning of an array.

Spec

take(<text>,<count>)
ArgumentDefaultDescription
textRequired fieldText to extract.
countRequired fieldThe number of characters to extract.

How to use

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

The type depends on the data handled by the String.

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

Then, specify the text to be extracted by enclosing it in ', followed by the number of characters to be retrieved separated by commas.

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

(How to get dynamic content with expressions.)

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

For example, "take('ABCDE',3)" will result in "ABC".

---

Links

Collection Functions(Power Automate Cloud flows)