cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JP_Scotland
Level: Powered On

Looping through a string item

Sorry if this has been convered, I've been reading about nested loops but this is one step before that. 

 

My flow is sending SMS messages. 

 

Basically my trigger action is "When an email arrives into a shared mailbox".  The user types the phone number into the outlook subject box and from there it carries out the action.  This works.

 

However, I want to allow users to send multiple SMS.  so the string would go from something like 07713245678 (one individual number) to: -

07712345678;07798778485;07945645622 with a semi colon between each. 

 

So I would need something to iterate through the string and then perform the remaining actions for each result (which I assume would be the "For Each" action). 

 

Any help would be grateful.

 

Thanks,

JP

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Looping through a string item

 

Hi @JP_Scotland ,

 

Like:

42.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Looping through a string item

Hi @JP_Scotland 

 

In Flow

Use a compose action with the following expression

split(dynamiccontentphonestring,';')

 

This will give you an array

The run a for loop with output from the compose action

 

and within loop use expression item() to get the individual elements in the array

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Community Support Team
Community Support Team

Re: Looping through a string item

 

Hi @JP_Scotland ,

 

Like:

42.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

JP_Scotland
Level: Powered On

Re: Looping through a string item

Ideal, thank you very much. You know your stuff 🙂

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,432)