cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Memorable Member
Memorable Member

Re: Removing the last character in the string.

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
Highlighted
Memorable Member
Memorable Member

Re: Removing the last character in the string.

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

Highlighted
Frequent Visitor

Re: Removing the last index value of array

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

Highlighted
Helper I
Helper I

Re: Removing the last character in the string.

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,023)