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

Substract 3 characters from a string

Hi everyone,

 

I need some help with building a flow. I hope somebody can give me a hand.

 

I need to substract the last 3 characters from a string which looks like this: nnnnnn-an

where: n is numerical

           a is alphanumerical

I understood that I can use "substring" function, but I need to understand how to use it so, I will need also some explanations

 

If anyone can provide me some explanation or send me some links to documentation related to Functions, it will be highly appreciated.

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @claudia ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the Compose 2 as below:

substring(outputs('Compose'),sub(length(outputs('Compose')),3),3)

 

Best regards,
Alice       
 
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User III
Dual Super User III

Basically you need to use Substring(), Sub() and Length() to do what you want.  This would be the formula

substring(textfield,0,sub(length(textfield),3))

This takes the textfield, starts at the beginning (position 0) and returns everything up to the length of the string minus 3 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-alzhan-msft
Community Support
Community Support

Hi @claudia ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the Compose 2 as below:

substring(outputs('Compose'),sub(length(outputs('Compose')),3),3)

 

Best regards,
Alice       
 
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (2,865)