cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Super User
Super User

cut off string lenght

Hi all,

 

Is it possible to cut off a string if the is longer than 130 characters? 

For example, when I have a string that is longer than 130 characters, show only the first 130 characters and remove the other characters.

 

Looking forward to any suggestion.

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @dennisb88,

 

Yes, that would be possible by using a length and if functions to check if it is longer than 130 characters. If that is true use a substring function. When false keep the original string.

 

Below is an example expression for that:

 

if(greater(length(outputs('String')), 130), substring(outputs('String'), 0, 130), outputs('String'))

 

 

View solution in original post

1 REPLY 1
Expiscornovus
Dual Super User
Dual Super User

Hi @dennisb88,

 

Yes, that would be possible by using a length and if functions to check if it is longer than 130 characters. If that is true use a substring function. When false keep the original string.

 

Below is an example expression for that:

 

if(greater(length(outputs('String')), 130), substring(outputs('String'), 0, 130), outputs('String'))

 

 

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 (1,308)