Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Take Right 6 characters of a string

(0) ShareShare
ReportReport
Posted on by 611

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

  • TesDA Profile Picture
    611 on at
    Re: Take Right 6 characters of a string

    Worked flawlessly. Appreciate it!

  • Verified answer
    ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Take Right 6 characters of a string

    @TesDA 

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

    See my example below:

    image.pngimage.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1