Help

Filtering on Rich Text on long text field

Topic Labels: Formulas
Solved
Jump to Solution
2350 5
cancel
Showing results for 
Search instead for 
Did you mean: 
J_V
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Airtable Community,

We are using the “enable rich text formatting” on a “long text” field, using bullet points to indicate points of attention or statuses. Is there any way to use this rich text and do the following:

  1. Filter out first / last 3 bullet points by using a formula?
  2. Filter out items under a bullet point matching a certain category, eg. text in bold - by using a formula?

Screen shot attached where I’m looking if I can filter out basis eg. “Week 13” or filter on bold.

Many thanks!
Screenshot 2022-08-16 at 9.10.55 PM

1 Solution

Accepted Solutions

If you’re open to going down the rabbit hole of regex you could try that out if you’d like?

I’ve put something together here for you

Screenshot 2022-08-17 at 9.55.25 AM

To view the formulas, you can duplicate the base by clicking the title of the base at the top of the screen, then the three horizontal dots on the right, and then the “Duplicate Base” button

See Solution in Thread

5 Replies 5

Hi @J_V,
I do not think you can filter based on the Markdown in rich text fields.

Maybe there is a better way of laying out your data or the base. How does the text get into Airtable?

J_V
5 - Automation Enthusiast
5 - Automation Enthusiast

@Vivid-Squid thanks for the swift response, indeed the input is manual as these are often comments put in by various people. I’ve thought of improving the input which would help - indeed. Filtering would come in handy if possible, although I realise this might not be the case.

If you’re open to going down the rabbit hole of regex you could try that out if you’d like?

I’ve put something together here for you

Screenshot 2022-08-17 at 9.55.25 AM

To view the formulas, you can duplicate the base by clicking the title of the base at the top of the screen, then the three horizontal dots on the right, and then the “Duplicate Base” button

It’s possible to get first three, or other number. for example,

REPLACE(Notes,
FIND('cutHere',
SUBSTITUTE(Notes,'\n- ','cutHere',3)),
LEN(Notes),'')

you may wrap this into IF( … ) clause if you have values with less than 3 bullet points
get last 3 is harder.
but that’s a wrong way. if you want to manage array of separate comments, you should store them as separated values, not as a joined text

Welcome to the community, @J_V! :grinning_face_with_big_eyes: Airtable formulas will only give you a bare-bones version of the markdown, and in this case it only identifies the bullet points. It doesn’t retain markdown for bold text. Retrieving the field value in a script does give you more markdown, but I’m not sure how much that will help in your use case. Running a script just to tweak a filter isn’t exactly convenient.