In this blog post we will learn how to split string in power automate to an array and how to access array elements in power automate.
How to split string in power automate?
In Power Automate , you can split a string into an array using the split() function.
Example: Suppose we have a flow that receive an input string with the following format text||text||text we need to split the string using the || delimiter and put it in an array
Use split function :In PowerApps, the
Split function is used to break a text string into a table of substrings based on a specified delimiter.
Delimiter: The character or characters that define the boundaries between the substrings
So in our case the delimiter is || so the code of the split function will be as shown below.
The Out put will be an array of substrings, and you can use it in subsequent steps of your flow.
how to access array elements in power automate?
You can access array elements within various actions like “Compose,” “Apply to each,” or directly in dynamic content.
For example the Output of the previous compose action we can access the elements of the array using it’s index that begin with 0 for the first element, 1 for the second element and so on.
For example to retrieve the second element of the array access it with Youraction
The number inside the square brackets indicates the index of the element you want to access.
The Output will be Heba the second element in the array
This is how to split string in power automate into array and access the array elements by index.
- New Power Automate Designer Features
- OData Filter Query Power Automate In SharePoint Get Items |
- How Power Automate Create Excel Table Dynamically? | Power Automate
- How To Make A Csv File Utf-8 Encoded? | Power Automate
- How Power Automate Create Excel Table Dynamically?
- How To Format Text In PowerApps? PowerApps Convert Text To Other Data Types
- Alternate Row Color In Gallery PowerApps: Simplest Way
- Check If PowerApps Contains Substring
- PowerApps Get Day Of Week Date