Subcategory with two AutoComplete

0
Is there a way to use two AutoComplete widgets to select subcategories? I will use a simple model: I want to create a new object in "Campaign". After selecting a company in the form in the first AutoComplete widget (company selection), I would like to be able (in the second widget) to select only the brands that are assigned to that company. Ultimately, in "Campaign" in "ForCompany" I would like to have IdCompany and in "ForBrand" IdBrand. Unfortunately, I am not able (or do not know how) to use XPATH. Do you have any ideas on how to combine this?
asked
2 answers
0

Yes, this can be done.  The XPath in the Brand selection widget would be something like:

[Brand_Company/Company/Campaign_Company = [%CurrentObject%]]

 

**EDIT**

I built a small example.  I think your domain model should look like this

I changed the highlighted associations from what you posted.

Next I created this page to enter information

And finally, I created this page to enter Campaigns

The brand autocomplete is configured like this

And here is a video of this solution working

https://watch.screencastify.com/v/JyhkwLLfYZMXfHOHJF1i

 

Hope that helps.

 

answered
0

It’s looks like I cannot use  [%CurrentObject%] this widget (zabawa = module name ofc)  or I’m doing something wrong :/

answered