cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Continued Contributor
Continued Contributor

Take Right 6 characters of a string

For some reason I'm getting an error on this function, does anyone know how to get the right 6 characters of a string?

 

substring(

      triggerOutputs()?['body/{Name}'],

      length(triggerOutputs()?['body/{Name}'])-6,

      6)

 

Error - the expression is invalid

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@TesDA 

You need a sub() expression to subtract the number of characters from the string length.

See my example below:

image.pngimage.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
ScottShearer
Super User
Super User

@TesDA 

You need a sub() expression to subtract the number of characters from the string length.

See my example below:

image.pngimage.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

TesDA
Continued Contributor
Continued Contributor

Worked flawlessly. Appreciate it!

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,691)