cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Responsive Resident
Responsive Resident

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
Super User
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
Super User
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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,380)