Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting SP items and split each item's string

Hello there !

I've seen a lot of solutions for splitting string and then applying foreach, but i haven't seen the way around.

Explanations :

I'm getting ItemS from Sharepoint (depending on their departure date), and for each of them, I have a string called PassengersMails, which is like the following : ";;".

i already have a foreach on the Value of GetItems.

In it, i already have a condition on If PassengersMails is empty.

Now in the No of the condition, i would like to split the PassengersMails string to an array. For each item in this array, I want to retrieve the Passenger's Display Name (using a O365Users connection) and to store it in a new string.


I can't figure out how to proceed.

How to split a string from a foreach Value ?


Thanks a lot, have a nice day.

Resolver III
Resolver III



If you have a common delimiter you could use the split expression maybe? 

I have tested it wit a variable with two e-mailadresses in it, and then an apply to each where the input is the splitted version of that variable (for you it's your string from your previous action):



Hope this helps, otherwise let me know I will check again 🙂

Resolver III
Resolver III

Hi @Anonymous !


Did this solve your problem, or do you need any other help? 

Otherwise could you mark the answer as solution?




Hi @Willemijn , how do I traverse the string using built-in API's in MS Flow?


Apologies as I'm very new to this..

Right now, what I can do is use the first() and last() functions, but this limits me to only 2 inputs..

I want to get the values per index such as..


name = splitString[0];

address = splitString[1];



Do you have an example with sample data of the string you would want to split and what the expected outcome is? 

Then I can take a look.



Thank you for the quick reply..


I will try this first.


I think this is what I need. I'll get back when I'm stuck..


Thanks again!

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,680)