Using SELECT() & REF_ROWS() in VCs

Hi!

I have a table of Vehicles with a โ€œVEH_UIDโ€ key & another table named "VehicleColorsโ€™ which holds references and extra details to the vehicles table. The VehicleColors table also contains a โ€œColorโ€ column which is an Enum of Refs with three possible values โ€œREDโ€,โ€œBLACKโ€ & โ€œWHITEโ€.

Now, in the Vehicles table i have a VC (โ€œRelated VehicleColorsโ€) that holds a list of all the Refs made from the VehicleColors table to each Vehicle. What i want to achieve is to create another VC which will only hold refs from the VehicleColors table that contain only a certain color. I thought of using the โ€œRelated VehicleColorsโ€ VC and then use SELECT() to filter it using a condition. For example, i want this new VC to hold VehicleColors refs of the โ€œREDโ€ color. So hereโ€™s what i thought but isnโ€™t working:

Related VehicleColors formula is : REF_ROWS(โ€œVehicleColorsโ€, โ€œVEH_COL_UIDโ€)
Expression i came up with for RED_VehicleColors : SELECT([Related VehicleColors] , [Color] = โ€œREDโ€) but i get an error saying that itโ€™s unable to find the Color column.

What am i missing here?

P.S. Iโ€™m completely new to Appsheet & SQL like queries so please bare with me

1 2 935
2 REPLIES 2

Steve
Platinum 4
Platinum 4

Steve
Platinum 4
Platinum 4

Please post screenshots of the column lists (from Data >> Columns in the app editor) for the involved tables.

Top Labels in this Space