cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Akshaya
Frequent Visitor

Splitting range of array with index - start and end index

Hi,

 

I have a array of values like below one,

 

M0524R0018
M0108R0018
M0536R0018
M0104R0018
M0106R0018

 

I need to split this into two array

Array 1

M0524R0018
M0108R0018
M0536

R0018

Array 2

M0104R0018
M0106R0018

 

This will be dynamic in each run so I have to pass start and end index in the expression. Whether someone have answer for this ?

5 REPLIES 5
Akshaya
Frequent Visitor

Please someone suggest me with any answer

 

Akshaya
Frequent Visitor

This is little bit critical for me so If someone have a solution please share

majorfriend
Helper III
Helper III

Try a compose action with :

indexOf(outputs("YOUR ARRAY")?['body'],'M0104')
Then split in another compose action with:
substring(outputs("YOUR ARRAY")?['body'],outputs('COMPOSE STEP FROM ABOVE'))

@majorfriend 

Tried to apply the approach you suggested but it throws a error

Akshaya_0-1623225256416.png

 

You should be able to convert the array to a string using the method described here:
How to convert array to a string in Power Automate (tomriha.com)

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Top Kudoed Authors
Users online (3,059)