cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Naresh
Helper IV
Helper IV

Removing the last character in the string.

Hi

 

I need an expression to remove the last character in the string in the Microsoft Flow.

 

Please assist.

1 ACCEPTED SOLUTION

Accepted Solutions
gamoraes
Memorable Member
Memorable Member

Hi @Naresh

 

it is simple, use this expression:

 

OBS: Don't forget to change the red text to your right action name, and the bold red number(1) are the quantity of chars to remove, in you case 1

substring(outputs('Compose_3'),0,sub(length(outputs('Compose_3')),1))

Look at my flow and result

Anotação.png

Anotação 1.png

 

Best Regards,

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

3 REPLIES 3
gamoraes
Memorable Member
Memorable Member

Hi @Naresh

 

it is simple, use this expression:

 

OBS: Don't forget to change the red text to your right action name, and the bold red number(1) are the quantity of chars to remove, in you case 1

substring(outputs('Compose_3'),0,sub(length(outputs('Compose_3')),1))

Look at my flow and result

Anotação.png

Anotação 1.png

 

Best Regards,

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

I have an array with 10 value. I want to remove last index value of array(10th value). please guide me.

michaele124
Helper I
Helper I

I'm trying to remove the last character of a string that is the result of using the concat function within an apply to each.  It seems that this substring formula does not seem to be working inside an apply to each. I also tried the take function and to add -1 instead of subtracting. Any suggestions?

 

I'm assembling a tabel for an email from a SharePoint list that uses a multiselect column, so I'm using the concat function to turn the multiselected items for a single record together with a ";" in between so they can be included in the same cell within my table.  Unfortunately the last item has the ";" so I'd like to remove it.

 

I use the Compose function to create the concat and then Set variable as the output of the Compose. I was trying to put the substring formula as the Set variable value and it did not produce an error but the the ";" was still there.

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,495)