REF_ROWS two levels deep Let's say I have a ...

expressions
(Pim Sauter) #1

REF_ROWS two levels deep

Let’s say I have a customer with multiple premises, each premise possibly having multiple installations. On the customer, I can show the premises by using REF_ROWS. Is there a way to show the installations directly on the customer (essentially creating a REF_ROWS two levels deep)?

I tried:

FILTER(installations, IN([premise_id], SELECT(premises[premise_id],[customer_id] = [_THIS].[customer_id])))

But this does not work, error:

Error in expression ‘[_THIS].[customer_id]’ : Unable to find column ‘_THIS’

Any ideas?

(Grant Stead) #2

I would put a helper column in the installation table that carries the customer id dref to the premises table…

Then just select off of that

(Pim Sauter) #3

Simple but effective, thanks @Grant_Stead