Select list challenge

Hi…
I have a column of data that contains one or more entries, so the rows look like this:
B C F
A
A C D
C
B
C F G
I am trying to find a way to select or filter any row that includes A or C, or B or F, or B or C of G.
If I make my list a select list, I don’t get the individual letters but the unique combinations of letters in my data.
Is there a way to break this down to achieve the search results I am looking for?
Many thanks!

Click the column header of your select list, choose column options, then you can delete the combined options and enter individual letters. Make sure you turn the option for ‘allow multiple selections’ on.
image
You’ll have to reenter any of the combined letter options in your table manually because they won’t be recognized. If you have enough rows that it would be a hassle to manually reenter, you can add a column with this formula, which replaces the spaces between the letters with commas so Coda will recognize them as individual entries. Then you can paste the results of the formula column into your select list & delete the formula column.

RegexReplace(thisRow.nameOfSelectListColumn, "\s",",")
1 Like

That seems like an unsustainable approach. Won’t it get out of sync as time goes on?

If new data is being selected from the list or entered with commas between the letters it will be recognized properly. I was suggesting this/the regexReplace column as a one-time fix for whatever is already in the table.

1 Like

One [possible] approach - use Coda AI. I included the prompt below, but this probably needs a lot of testing and tweaking to get it to be reliably deterministic. Once you have a true/false value, setting a filter is straightforward.

Prompt

You are an expert who detects the presence of key values in a string of keys
using boolean logic.

I will give you a pattern to look for. You will apply the pattern to a string of 
keys to determine if the boolean evaluation is True or False.

Pattern: {"type":"Formula","formulaId":"f-NerO0Dbhay"}
String of keys: {"type":"Formula","formulaId":"f-Xiw7vTUscA"}
[output]

Formulas

Hello @Gregg_Stebben ,

Yes, this can be done pretty easy - and I would not use AI to do so.
However, I think these letters are not the real thing you are after. And I guess the filters you describe are just samples of what the filters might look like?

I am wondering how you fill the column: from a select list, or are you just typing in the letters in a text column?

Before I spend time to show you how it is done, I would like for you to make a dummy doc that looks like what you are trying to accomplish and give us an idea of what your data looks like and what you have tried so far. Share this doc with the community and we will show you one or more ways of how this can be done - there are probably a couple of different ways of doing this.

Greetings,
Joost

2 Likes

Thank you for this…this approach might work perfectly because the A B C options are finite, so the list probably will never change.

1 Like