String Functions(Power Automate Cloud flows)
Contents
String Functions
Extract part of a string.
Function | Importance | Overview |
---|---|---|
substring | High | Cut out a substring by specifying its position and length. |
slice | High | Cut out a substring by specifying the start and end positions. |
first | High | Function to get the first character of text. first also has a function of the same name that retrieves the first item in an array. It works in the opposite way to last. |
last | High | Function to get the last character of text. last also has a function of the same name that retrieves the last item in an array. And it works in the opposite way to first. |
take | High | 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. |
Edit string.
Function | Importance | Overview |
---|---|---|
concat | High | Combines two or more texts into one text. |
replace | High | Searches for text and replaces the text if a match is found. This function is similar to the SUBSTITUTE function in Excel. |
toLower | Middle | Converts uppercase letters in text to lowercase. |
toUpper | Middle | Converts lowercase letters in text to uppercase. |
trim | Middle | Remove leading and trailing whitespace (half/full-width spaces and tab characters) from text. This function is used to remove unnecessary white spaces that may be present in keyboard input values or data imported from other applications. |
Function to search or determine text.
Function | Importance | Overview |
---|---|---|
indexOf | High | Obtains the starting position of the specified text, similar to Excel's FIND function. The starting position is used for any kind of text editing. It is also often used to determine whether or not the specified text exists. (The behavior is different from contains.) This function is similar to the "Find text position" action. |
nthIndexOf | Middle | Obtains the starting position of the specified text. Specifies how many matches. |
lastIndexOf | Middle | Obtains the starting position of the specified text (right-most matching text). |
startsWith | High | Determines if the text begins with the specified string. |
endsWith | High | Determines if the text ends with the specified string. |
contains | High | Determines if the specified text is contained. There is a function of the same name that checks whether an array contains the specified item. |
isFloat | High | Checks if the text is in Float or Integer format. In the official help it belongs to the String function, but in the PowerAutomate screen it belongs to the Logical function. |
isInt | High | Checks if the text is in Integer format. In the official help it belongs to the String function, but in the PowerAutomate screen it belongs to the Logical function. |
Other.
Function | Importance | Overview |
---|---|---|
guid | Low | Create a GUID (unique, random text). It will be used infrequently by Power Automate's general user base. |
split | High | Converts text into an array by splitting the text at the specified delimiter. It works in the opposite way of join. |
formatNumber | High | Converts numeric values to text in any format. |
length | High | Gets the number of characters in the text. length also has a function of the same name that retrieves the number of array items. |
empty | Middle | This function checks to see if the text is zero characters long. empty also has a function of the same name that checks whether one or more items exist in an array. |
chunk | Low | The chunk function divides a single text into an array of equal-sized texts. The chunk function has a collection function of the same name. It divides an array into multiple arrays of equal size. |