How to truncate text?

Hi all,

I am trying to create this logic:

If text is above 40 characters, truncate to 40 and add an elipses.

So roughly:

“No-code is ready for Enterprises. Join us for an exclusive livestream featuring Matthieu from PwC, one of the biggest auditing companies in the world. Discover how he harnessed the power of WeWeb and Supabase to create game-changing internal apps for PwC and their clients”

Becomes

“No-code is ready for Enterprises. Join us for an exclusive livestream featuring Matthieu from PwC, one of the biggest auditing…”

image

What’s the right formula to put in? Auto generate AI is crashing.

2 Likes

Not sure how to get it to work on a multi-line text, but on a single line field it works as follows:

  1. Set No-wrap to ON, then Ellipsis to ON
  2. Set the field size and parent div to something other than auto to limit it’s expansion
1 Like

Hi both :wave:

One option is to use the subText formula:

In the example above, I’m saying I want to display the first 4 characters of my text followed by ...

1 Like