As a workaround (considering your model)
You may try this, in your page/form:
I hope this works for you!
Hi Niklas Höflmayr,
Instead of Adding Company Name in Product Entity you could make use of Mendix association to Avoid extra logic to fetch the data.
You need to Add an Association between company & Product. Add a Reference selector in your Product to select the company.
Then in your Second Reference Selector, you constrain your Data using the Constrained by option in Reference Selector.
Go to the Selectable objects Section in the Second Reference Selector and set the Source to Xpath and there will be a Constrained by option where you can select the XPath between Company.
For your Reference:
Hope it Helps!!
What I would recommend is switching up your domainmodel to create a more sustainable application for what you want:
This will be the easiest way to create your concept and also reduce possible errors
If you have any questions, do ask them!
hii Niklas Höflmayr
there is no relation between company and product so make a so make company and product association with one to many [1-*]
best practice is remove product_by_cmompany attribute from product entity , company and product entity association will connect one company to multiple products
and make another helper entity without any attribut and make following associations
helper to order [1-*]
helper to company [1-1]
helper to product[1-1]
configure your domain modal like picture
and then after rightclick on entity generate overview pages for all by clicking select all
now put the data view on the page where you want ot show the two refrence selectors with datasource helper entity
and choose attribute of both refrence selectors in first choose company name from helper entity association
and in second refrence selector choose product name from helper entity association
now go to the selectable object tab in the second refrence selector
and click to the edit containt by 
and now choose the path where product_association have
now just click ok and ok
make sure dont use your previous pages after domain model changes because association provides you the dropdown based selectation when you will enter the product for a comapany
i hope it will help you.