Re: A relationships problem. FM8.5pro




"Hatzigiannakis Nikos" <nikos@xxxxxxx> schreef in bericht news:eualc4$a8v$1@xxxxxxxxxxxxxxxxxxxx
I have the following tables



Products_table

Product_id

Category_id

Subcategory_id



Categories_table

Category_id

Category_name



SubCategories_table

SubCategory_id

Category_id

SubCategory_name



And these Relationships



Products_table::Category_id = Categories_table::Category_id



Products_table::Subcategory_id = SubCategories_table::SubCategory_id



Categories_table::Category_id = SubCategories_table::Category_id



There are SubCategories for eatch Category

e.g Category 1 has SubCategories 1,2,3,...

Category 2 has SubCategories 1,2,3,...



The user selects the Category of the product and the SubCategory depending on the chosen Category.



I wand to find a way to prevent deleting a SubCategory when there are products belonging to that Category and SubCategory. In the beginning It.looks easy but I realized that in FM8.5 you can not name a relationship (like in FM.6.0) and you cannot reference an other file through a given relationship.



Any help will be appreciated



Nikos