cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skarthanal
Helper II
Helper II

Help with function

Hi everyone,

 

I need help with a string function.  I have a variable for example 1.2.0 and i want to convert that string to 1.20  In Excel i would just use the Substitute function but with PA I only see a replace function which works but it allows me to replace all occurences of the '.' not certain instances?  How would i go about doing this?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Try this expression:

concat(split('1.2.0', '.')[0], '.', join(skip(split('1.2.0', '.'),1), ''))

You could replace the hard coded 1.2.0 with the output of a compose action or a variable.

View solution in original post

2 REPLIES 2
Paulie78
Super User
Super User

Try this expression:

concat(split('1.2.0', '.')[0], '.', join(skip(split('1.2.0', '.'),1), ''))

You could replace the hard coded 1.2.0 with the output of a compose action or a variable.

@Paulie78 Thank you!  This worked perfectly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,092)