Return Field Names that Contain Search Text / Values

#1

Airtable Gurus, I need help!

I’m looking for a way to return all the field names that contain a certain value. Let me explain:

I’m gathering documents from clients, and I’ve sent them a survey asking them what types of documents they have, and in what form.

The survey contained multiple questions along these lines:

Do you have documents relating to Topic X? Check all that apply:
[ ] Emails
[ ] Hard Copy Documents
[ ] Electronic Documents

As a result, I have many multiple-select Document Category Fields that contain one or more of the “Document Format” responses (e.g., “Emails,” “Hard Copy,” etc.).

What I’d like to do is now generate a list for each client of all the documents they said they had, so that I can follow up on each category and ensure that we’ve collected everything they have.

The way I imagine this working (although I’m open to other suggestions), is a single field for each document category, which would search in each Document Category Field for a particular Document Format, and return a list of all Document Category Fields that contain that particular Document Format.

So… I would have a Field called “Has the following [Document Format] Documents” that would contain a list of [Document Categories]. E.g.:

FIELD:
Has the following Hard Copy Documents:

RESULT:
Documents Relating to Topic X
Documents Relating to Topic Y
Documents Relating to Topic Z

I’ve been fussing with nested IF statements and AND/OR operators for an hour, and I just can’t seem to get it to work right.

Please help?!

#2

Here’s one solution:

The formula fields are all similar (only the search parameter changes), so I’ll only break down the first one:

IF(
    SEARCH(
        "Hard copy",
        {Topic X}
    ), "Topic X\n"
) &
IF(
    SEARCH(
        "Hard copy",
        {Topic Y}
    ), "Topic Y\n"
) &
IF(
    SEARCH(
        "Hard copy",
        {Topic Z}
    ), "Topic Z\n"
)

Is that what you’re looking for?

1 Like
#3

Yes! So simple, yet the exact syntax was totally evading me. Thank you so much!!!