Hi there!
I need to generate a plain text summary from a rich text field called “Details”. The goal is to display the plain text summary in a table (grid) view, as displaying the rich text field directly in the table breaks my styles.
First, I attempted to solve this using a formula field with a regex to remove all HTML tags, something like this
{Details}.replace(/<[^>]+>/g, '')
but turns out that knack does not support the <
character in formulas.
Then, I tried to build a solution using a combination of formulas and conditional rules. I noticed that my records that have complex rich text Details
are all over 2000 characters long, so I built something like this:
It became a bit messy, but worst: it doesn’t work! I think conditional rules update before the formula does, so I end up with the wrong values.
I’m going to solve this with Javascript, but I wanted to ask around in case anyone can think of a no code solution, just out of curiosity.
The requirements are not rigid. Anything can work as long as
- Users can get the idea of the content of “Details” by looking at the table
- table styles don’t break
- table rows don’t become too large
Thanks!