Building a ref list from another table

Gman1
New Member

Hi All,

Hoping to get some assistance. I have two tables. One with Apartments and another with Incidents. The incidents table can have multiple apartments allocated to it (using EnumList) which shows up as “100A, 101A, 102A” in the table.

select(Cases[JobNumber],(contains(Cases[Apartment],[_THISROW].[Apartment]),true))
*The above formula is in the Apartments table and is trying to build a list of “JobNumber” to use as a reference, by selecting all Cases where the apartment number appears in the Apartment column of the cases table.

The formula however actually just says ‘if it finds the apartment in the table, then return all cases’.

What should happen is this:

  1. Case 111 in “Cases” table has apartments “100,101” assigned to it
  2. Case 112 in “Cases” table has apartments “100,102” assigned to it
  3. Case 113 in “Cases” table has apartments “101” assigned to it
  4. Apartment 100 in the “Apartments” table should have a reference list showing only cases 111 and 112 in it

Can someone help?

Solved Solved
0 11 679
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

@Kirk_Masden, bingo!

Try:

select(
  Cases[JobNumber],
  in([_THISROW].[Apartment], [Apartment]),
  true
)

View solution in original post

11 REPLIES 11
Top Labels in this Space