cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unkn0wn
Helper I
Helper I

remove last element from array

Hi 

 

I'm having an array like this ["a","b","c","d","e"] now i want to remove last 2 elements from array. is there any possibility to do so ?

1 ACCEPTED SOLUTION

Accepted Solutions
JuanPJesusG
Frequent Visitor

Hi,

 

You can use this function 

take(outputs('Compose'),add(length(outputs('Compose')),-2))
 
JuanPJesusG_0-1627843668791.pngJuanPJesusG_1-1627843687024.png

Best regards,

JP

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

View solution in original post

1 REPLY 1
JuanPJesusG
Frequent Visitor

Hi,

 

You can use this function 

take(outputs('Compose'),add(length(outputs('Compose')),-2))
 
JuanPJesusG_0-1627843668791.pngJuanPJesusG_1-1627843687024.png

Best regards,

JP

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

View solution in original post

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 (2,818)