Text functions are one tool that can be used in Power Automate to manipulate strings and help one get a desired output that may streamline a workflow. Here we will be exploring the split function and go over how to use it in a simple example.
What is the ‘split’ Function?
The split function is a function that splits a string using a given delimiter into an array.
The syntax is as follows:
split('<text>', '<delimiter>')
Input values are:
text – The string that needs to be split by a given delimiter
delimiter – The delimiter you will specify to split the string into an array
Return value:
A string that has been split into an array with the given delimiter.
Here is an example:
split('Joe, Jed, Joy, JD', ',')
=> ['Joe','Jed','Joy','JD']
split('Joe, Jed, Joy, JD'', '#')
=> ['Joe, Jed, Joy, JD']
Example of Split Function in Power Automate
Step 1: Create A New instant cloud flow with a manual trigger. (flow.microsoft.com)
Step 2: Add a new initialize variable with the following details:
Step 3: Add a compose action card to store the below expression:
split(variables('Text'),'and')
Step 4: Save & Test Flow. Your results should be as the following details show.