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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,338)