cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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
Highlighted
Community Support
Community Support

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

5 REPLIES 5
Highlighted
Community Support
Community Support

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

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: extract substring using compose

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

Highlighted
Helper I
Helper I

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?
Highlighted
Advocate I
Advocate I

Re: extract substring using compose

How would you go about this if you wanted the values between << and >>

 

i.e.  <<just this text>>  would return  just this text

Highlighted
Regular Visitor

Re: extract substring using compose

First(Split(Last(Split("<<just this text>>", "<<")), ">>")), which will first extract "just this text>>" and then "just this text".

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (5,642)