Hi all!
I'm trying to customize the product entity form and have some problems with two of the lookup fields. 
I have a custom entity called Grouping, which will group all items into different categorizations. For instance

The (child) category is called Pencil Rasps, and the parent group Tungsten Carbide. We have also created a hierarchy for all sub- and master groups. Four different sub groups can belong to one parent group.
 
 
Now I want to use this in a lookup in my product Entity. First I want my first lookup field to look for the sub group (Pencil Rasps) and in the next field I want the Master group (Tungsten Carbide) to be dependent of my first choice, so it suggests or automatically fills in Tungsten Carbide.

How the system is set up now, is that the Sub Group and Master Group has the same kind of lookup field. You have to find the right category by going through a list of our 100 different categories (sub- and master groups in the same list).
Is it possible to filter the option so only the sub groups are shown in the first lookup, and the suggested parent group is shown in the second lookup?
How do I create the relationship between the two entities Grouping and Product? 
Appreciate all help and tips I can get. Thanks
Olivia