Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
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

(0) ShareShare
ReportReport
Posted on 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,472 Most Valuable Professional on at
    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,472 Most Valuable Professional on at
    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 at
    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,472 Most Valuable Professional on at
    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,472 Most Valuable Professional on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 >