web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : DSdi/aOZuKj2CGDbswqikQ
Power Automate - Building Flows
Answered

I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

Like (0) ShareShare
ReportReport
Posted on 27 Sep 2021 20:53:06 by 1,360

If I have a URL string that looks as follows

golfnutt82_0-1632775794448.png

can I extrapolate all characters (but no longer than 14) to the right of the last forward slash.

Is this possible?



  • abm abm Profile Picture
    32,506 Most Valuable Professional on 27 Sep 2021 at 23:06:03
    Re: I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

    Hi @golfnutt82 

     

    Another way to do this is as follows:

     

    image.png

     

    Above expressions are:

     

    last(split(outputs('Compose'),'/'))
     
    substring(outputs('Compose_3'),0,if(greaterOrEquals(length(outputs('Compose_3')),14),14,length(outputs('Compose_3'))))
     
    Thanks
  • abm abm Profile Picture
    32,506 Most Valuable Professional on 27 Sep 2021 at 22:49:03
    Re: I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

    You didn't mentioned earlier that you could have less than 14 characters length as well.

    First find the last string after the last slash

     

    last(split(outputs('Compose'),'/'))
     
    The above expression will give you the string
     

    Then add an If condition to check the length is less than 14 by comparing the above value.

     

    If its more than 14 then use the expression which I mentioned earlier substring(last(split(outputs('Compose'),'/')),0,14) else use the expression last(split(outputs('Compose'),'/'))

     

    Thanks

     

  • golfnutt82 Profile Picture
    1,360 on 27 Sep 2021 at 21:53:20
    Re: I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

    golfnutt82_0-1632779425232.png

    So in the URL there is only 8 characters but I need the system to allow for up to 14 characters.
    When I saw you expression I was very excited because I had not thought of using what you did!
    Awesome, you did a test on your end and didnt receive an error like I show?

  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on 27 Sep 2021 at 21:38:22
    Re: I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

    Hi @golfnutt82 

     

    Here it is

     

    image.png

     

    Expression for the above is as follows:

     

    substring(last(split(outputs('Compose'),'/')),0,14)
  • abm abm Profile Picture
    32,506 Most Valuable Professional on 27 Sep 2021 at 21:38:20
    Re: I need to extrapolate the last fourteen or less characters from the end of a string but after a forward slash

    Hi @golfnutt82 

     

    Here it is

     

    image.png

     

    Expression for the above is as follows:

     

    substring(last(split(outputs('Compose'),'/')),0,14)

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete