Hi Community,
following Scenario: (Also made a Screenshot)
I have a Table "VehicleModelsTable" where the Field "ModelId" is the PrimaryKey. I also have the Fields "Vehicle Type", "Vehicle Categorie" !
I have a Table "PriceTable" where I have the Fields "Vehicle Type", "Vehicle Categorie", "ModelId" and "Price" !
I have a Table "VehicleClassTable" where I have the Fields "VehicleType" and "VehicleCategorie"
I set Relations from PriceTable to VehicleModelsTable and to VehicleClassTable They work fine.
In my PriceTable when I set the VehicleType, based on the Type I can only choose the referring VehicleCategories, which is awesome.
But when it Comes down to the ModelId, I can choose all ModelIds.
I guess it is because since the ModelId is the PK of the VehicleModelsTable and I am referring to it via ForeignKey Relation.
I would like to have it the way in my PriceTable, that based on the Type and Categorie I only get the referring ModelIds.
I handled the Situation on Form Level via Lookup Method for my ModelId, but I would like to solve it on Table Level as well.
I have made my thoughts, which I will Show You here, but I would like to have Your recommendations. Maybe this Problem will be solved by just Setting an Index.
But I am not sure.
So here is my Idea:
1. At the end I Need the ModelId from the VehicleModelsTable
2. I Need Access to the VehicleModelsTable
3. I have to select VehicleType and VehicleCategorie Fields in PricTable
4. Set them equal (Where) to the VehicleType and VehicleCategorie from VehicleModelsTable
5. Based on this equalization the ModelsIds shall be shown in the field ModelId of PriceTable
But I don't know where or in which Method of PriceTable I should start.
Thanks in Advance
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (