In most cases it would be the easier option to actually specify the list of fields to check, but possibly make some loop related to which fields to check, I’m thinking something like the following:
```dataview
TABLE presenter, meeting_attendee
FLATTEN array(map(
list(
"presenter",
"meeting_attendee"
),
(field) =>
econtains(
choice( row[field] = "string", list(row[field]), row[field]),
"Bob"
)
)) as matches
WHERE any(matches)
```
This looks through all files trying to find “Bob” as either a presenter
or a meeting_attendee
. If found it returns the file, the presenter and all meeting attendees.
A variant over this query, where it only would list the role of “Bob” and in which files he matched could be written as:
```dataview
TABLE match[0] as Role
FLATTEN map(
list(
"presenter",
"meeting_attendee"
),
(field) =>
[ field,
econtains(
choice( row[field] = "string", list(row[field]), row[field]),
"Bob"
)
]
) as match
WHERE match[1]
```
With an additional query at the top showing all information from my test vault, these queries produces this output:
Hopefully, it’s something you can take further and make work in your setting. It might seems a bit excessive, but listing the various fields do still allow for a single variant of the actual test. And I’ve also built in a safe guard to make it work against both single and multiple values in the field.
Finally, if you truly would like to skip all field names, there is a possibility using dataviewjs to use something like Object.keys(file.frontmatter)
to get all field names defined within the frontmatter. But this would also include tags and aliases, and what-not, and it would not include inline fields (defined in the body of the text).