cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Harry_G
Level 10

extract substring using compose

I have string have value "[113] this is testing string". i need to convert it "this is testing string". I tried compose action with substring using Indexof. But unfortunately it doesn't work for me. Any help woulf be appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: extract substring using compose

Hi @Harry_G,

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the Compose 2 as below:

substring(outputs('Compose'),6,22)

And you could also enter the expression below in the Compose 2:

last(split(outputs('Compose'),'[113] '))

 

The flow would run successfully as below:

Capture.PNG

 

 

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: extract substring using compose

Hi @Harry_G,

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the Compose 2 as below:

substring(outputs('Compose'),6,22)

And you could also enter the expression below in the Compose 2:

last(split(outputs('Compose'),'[113] '))

 

The flow would run successfully as below:

Capture.PNG

 

 

 

Best regards,

Alice

View solution in original post

Harry_G
Level 10

Re: extract substring using compose

Thanks @v-yuazh-msft. it working like a charm :).

kedarsk
Level: Powered On

Re: extract substring using compose

Thank you but you have manually mentioned the 6 and 22 as number for index and characters . How to get it automatically or in other words what if we aren't sure about what those numbers could be?

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 (5,929)