Can't figure out how to make a list of things that reference the current thing

Apologies if this is something many have asked before—I promise I searched here and the official documentation first but couldn't figure out how to apply any of it to what I wanted.

So, I have a table of Art and Craft Options. One column called Options. To simplify, let's say it's just

Options
Painting
Clay
Sewing

This table is used to make an enumlist on two other tables but we'll only worry about one right now. The table Teachers is a sort of personnel directory that also includes Expertise, an enumlist ref of the Option column in Art and Craft Options.

Teacher nameExpertise
Alice(Painting)
Bob(Painting) (Sewing)
Charlie(Clay) (Sewing)

I would like to create another column in Art and Craft Options that is a list of all the teachers that have  that row option in their Expertise. So the end result would be:

OptionsQualified Teachers
Painting(Alice) (Bob)
Clay(Charlie)
Sewing(Bob) (Charlie)

I did have a shot at the code and made something accepted as semantically valid but doesn't return anything.

Select(
Teachers[Teacher name],
(IN([_THISROW].[Options], Teachers[Expertise]))
)

I can tell that there are some refs that seem to automatically make this link in AppSheet but it seems an Enumlist isn't one of them. So... help? Please?

Solved Solved
0 12 310
1 ACCEPTED SOLUTION

Because your Enumlist (Expertise) is base of Ref, you need to verify with the key column and that's why it hasn't found any teacher. You need to write it like..
SELECT(
Teachers[Teacher name],
IN([_THISROW].[Row ID],[Expertise])
)

View solution in original post

12 REPLIES 12
Top Labels in this Space