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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Reducing number of cha...
Power Automate
Answered

Reducing number of characters and inserting dashes at specific points

(0) ShareShare
ReportReport
Posted on by 467

Hello there, I am hoping someone might have some guidance on this one as its using some concepts I have yet to use in flow and do not have a lot of time to research this one.  The values listed below are being returned from a Dynamics Entity.

 

This is the original value returned.  Dynamic Characters_F4049210D54EEB11A813000D3A36886F

I need to remove all characters starting with the _ and everything to the left.  The dynamic characters is a place holder indicating the name varies in size and length to the left of the _   

The next step is to insert the - character at the specific points to reconstruct the GUID.

 

The end result would be f4049210-d54e-eb11-a813-000d3a36886f

 

Any direction on this one would be greatly appreciated!

Categories:
I have the same question (0)
  • Verified answer
    coyote_ptm Profile Picture
    56 on at

    Hi @Dudditz ,

     

    A few steps.

    coyote_ptm_0-1615417044187.png

    Initialize second temp variable to store intermediate value.

    coyote_ptm_2-1615417094814.png

     

    coyote_ptm_3-1615417121453.png

     

    Value = substring( variables('test'), lastIndexOf( variables('test'), '_' ) )

    // this will get string from the LAST underscore to the right.

     

    Then another set variable:

    toLower( concat( substring(variables('tmpTest'), 1, 8 ), '-'
                     substring(variables('tmpTest'), 9, 4 ), '-' ,
                     substring(variables('tmpTest'), 13, 4 ), '-' ,
                     substring(variables('tmpTest'), 17, 4 ), '-' ,
                     substring(variables('tmpTest'), 21  )
                   )
           )

     

     

     

     

  • Dudditz Profile Picture
    467 on at

    Amazing!  Worked perfect and will be a good reference for future solutions.  Thank you so much for your help.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 248 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 207 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 101 Super User 2026 Season 1

Last 30 days Overall leaderboard