cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
r96359
Helper IV
Helper IV

Power Automate Desktop: How to trim a text string from the end

I have a long string stored as a variable I want to trim. It's like:

 

asvsadfdfSDGADFGkafasflSDAFSAFFVDVVCdfsgsgffngnf-12345678

 

I'm trying to find a way to store just the last 8 characters or everything to the right of the dash "-".

The values in front of the dash vary in length.

 

For example in Excel I would use =RIGHT(A1,8) if the string was in cell A1.  

=RIGHT(asvsadfdfSDGADFGkafasflSDAFSAFFVDVVCdfsgsgffngnf-12345678,8)

 

Any ideas?

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User III
Super User III

Hey @r96359 

 

You will need to Split the Text -

 

CFernandes_0-1619674843437.png

 

The above will return you a list, you then need to access the first item from the list - using the formula %TextList[1]%

 

CFernandes_1-1619674900772.png

 

This will return you the number -

 

CFernandes_2-1619674961214.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

View solution in original post

3 REPLIES 3
CFernandes
Super User III
Super User III

Hey @r96359 

 

You will need to Split the Text -

 

CFernandes_0-1619674843437.png

 

The above will return you a list, you then need to access the first item from the list - using the formula %TextList[1]%

 

CFernandes_1-1619674900772.png

 

This will return you the number -

 

CFernandes_2-1619674961214.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

View solution in original post

Thanks @CFernandes !

CFernandes
Super User III
Super User III

Hey Mate @r96359 

 

I am glad my inputs helped 😊

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Top Kudoed Authors
Users online (1,987)