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 II
Helper II

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,462)