Show a portion of ref column from other table.

Trying to select and show only a portion of a ref column from a different table in my app. I am using table “Vehicle Info” [Tow VEhicle Type] which is a ref type. I want to pull the results from the column the table “ConfigRefTable” [VEHConfig] as long as the rows indicted by the numbers 1, 1 and 2, or 3 in the column “ConfigRefTable” [Truck_Tractor_Trailer] .

I am trying this expression

SELECT(ConfigRefTable[Vehicle Configuration],OR([Truck_Tractor_Trailer]=“1”,[Vehicle Configuration]=“”))

I am ppretty sure I am close, but probably have a simple thing wrong. Assistance would be greatly apprecaited. and Thanks in advance again.

Would you please restate your criteria in a clearer way? You need the rows where the value in “Truck_Tractor_Trailer” is 1 or 2 or 3? is this what you want?

I have a column list of different vehicle configurations in ConfigRefTable [ Vehicle Configuration]. I can get a button list if I just make VehicleInfo[Tow Vehicle type] a ref type. I want to only show the results of [Vehicle Configuration] if the corresponding row value in [Truck_Tractor_Trailer] is either 1, 1 and 2, or 3. vale 1 is to indicate trucks, 1 and 2 would indicate trucks and tractors, while value 3 indicates trailers. I want to use other date in the selected row further in the app for other configuration details. So I guess I want to be able to sort and show only the items in the [VehicleConfiguration] colum, if a previous selection calls for type 1, 1 and 2, or type 3. I hope that cleared things up…

And the values in Truck tractor trailer are already in place in the appropriate rows

Based on your description:

SELECT(ConfigRefTable[Vehicle Configuration],
IN([Truck_Tractor_Trailer], LIST(“1”, “1 and 2”, “3”))
)

If this doesn’t give you the desired result, please post a screenshot of your ConfigRefTable configuration.

Hope this helps,

1 Like

The form view gives me lots of yellow triangles

1 Like

And the one table

1 Like

Thanks for the screenshots, they help a lot.

You have yellow triangle because you are trying to reference the “Vehicle Configuration” column which is not your key column. Please read this: References Between Tables.

Anyway, I understand that each vehicle can have only one of many types. Among the possible types, you are interested only in three of them: type “1”, type “1 and 2” and type “3”. For this, you should do the following:

  1. Change your “Tow Vehicle Type” column to Ref pointing to your ConfigRef table, instead of Enumlist.

  2. In the Valid if field put this expression:

FILTER(ConfigRefTable, IN([Truck_Tractor_Trailer], LIST(“1”, “1 and 2”, “3”)))

1 Like

YES!!! thanks, and I can make the trailer type row the same, just use “3” And that will probably work in several other places that I have the same ty

1 Like