How to dereferences a dropdown enumlist and display as a related items

Hello Guys, my question is this.

In my Fire Safety APP I would like to track devices such as smoke detectors, pull stations & horns in the buiildings they are being used in. My Tables are Buildings, Devices, Device Type & Comapnies. I would like to be able to be able to enter a new device, and with a dropdown enumList REF pick all the Buildings that this device will be used in, then displayed those selections within a “Related Buildings Field” on the Detail device view. Also, when you go to the Buildings section of the APP and select a specific Building to view the Details section of that building, I want to be able to see in a “Related Devices Field” all the devices that have picked this building to be used in.

Thank you all in advance for the help and suggestions.

So on your devices table, create a column to hold your list. I shall assume [Buildings] as the column.
Make this column an EnumList of type Ref. Make the Ref point to your Buildings Table.
In the Suggested values section of the column use the formula Buildings[KeyField of Buildings].
That will allow the input selector to show all the buildings that you have in your Buildings Table.

OK, that will take care of the input for each device.

Now, to see a list of devices in each building, go to your Buildings table and create a new virtual column. Let’s call that [Related BuildingDevices]. Set the Formula to be
SELECT(Devices[Keyfield of Devices],IN([_THISROW].[BuildingID],[Buildings]))

That will be a list of all the devices that have this building in the buildings list.

2 Likes

Thank you Scott, your solution worked perfictly. I need to lean more about SELECT. Thanks again.

Chris

1 Like

Hey, you’re welcome Chris!