Hi
I have a single string which I need to split two times.
I have no issues splitting it the first time like this way:
String: "0;1;2; | a;b;c; | A;B;C; |"
Action: Initiate Variable
Name: varArray
Type: Array
Action: Set Variable
Input: varArray
Value: split('string','|')
Output:
Solved! Go to Solution.
Hi @Morke ,
Please check the following configuration and see if it helps:
We could use items('Apply_to_each') to get the item of the array and continue to use split() function to handle it.
Hope this helps.
Best Regards,
Hi @Morke ,
Please check the following configuration and see if it helps:
We could use items('Apply_to_each') to get the item of the array and continue to use split() function to handle it.
Hope this helps.
Best Regards,
Thank you for the help. This works.
I have a doubt, what's the reference to "items()"? I want to understand how it works.
Also:
How can I use all the resulting split strings? I mean how do I use them as objects further down in the flow after this split? What's the reference to them?
Hi @Morke ,
The Split() function will return an array. We generally use Apply to each to traverse the elements in the array, and the items() function is used to get the elements of each traversal.
If the element is an object, then we can get the property value through items()[‘PropertyName’].
You can use Apply to each to get each element and apply it to other actions, but the action must also be configured in Apply to each.
In addition, since the return value is an array, we can use index to get the value of each element. Like: You can get the value of the first element in the array through split ('string', '|') [0].
For more details, please refer to WDL function:
By doing more tests, we can easily master Data operations in Power Automate.
Best Regards,
Nice and simple 👍
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
74 | |
27 | |
18 | |
16 | |
15 |
User | Count |
---|---|
138 | |
44 | |
32 | |
32 | |
29 |