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

 

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

majorfriend
Advocate II
Advocate 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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,621)