substring function.(Power Automate Cloud flows)


Japanese version.

Cut out a substring by specifying its position and length.

It is similar to the slice function, but differs in the specification of how far to cut out.

  • The substring function is the number of characters.
  • The slice function is a position.


substring('<text>', '<startIndex>', <length>)
textRequired fieldSource text of the cutout.
startIndexRequired fieldThe starting position of the cutout (top is 0).
lengthFrom "startIndex" to the end of "text".Number of characters to cut out.

How to use

The substring function is used for text parameters.

In many cases, it is used to initialize or set variables of type "String".

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

If you see something like the following, your settings are complete.

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

For example, substring('ABCDE',1,2) will result in "BC".

The last argument (length) may be omitted, in this case from the start position to the end.

substring('ABCDE',2) will result in "CDE".

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.


String Functions(Power Automate Cloud flows)

Example of use.

When a file is created Trigger in OneDrive For Business Connector.(Power Automate Cloud flows)

Used for editing dynamic content.

How to use only URL parameters.

How to remove URL parameters.