2 select box change option

1
there are 2 select box. when i select ‘a’ on first selector, secondselector can choose 1,2,3,4.  when i select 'b' on firstselector, secondselector can choose 5,6,7,8. How can i work like this in mendix
asked
1 answers
0

Hi,

You Can Achieve this using a combination of Associations, and Reference selectors, constrained by option in Mendix.

 

Step 1 : 

First, create two master entities named Entity A and Entity B and Store a, b , c, etc. as separate objects in Entity A and then Store 1,2,3 etc.. as separate objects in Entity B 

 

Step 2 : 

Add one- many associations from Entity B to Entity A. Many objects in Entity B will be connected to any one object in Entity A. You can simply Add a Reference Selector on the Page of Entity B where you select the Data from Entity A ( Entity B *-1 Entity A) 

 

Steps3 : 

Now Add two associations from your Entity C to Entity A and Entity B. Add 2 reference selectors in your Entity 3 page. 

Connect the 1st reference selector to Entity A and 2nd reference Selector to Entity B.

Now your Actual Use case where you want the cascading effect, Double click the 2nd reference selector and add Constraints in the Selectable object tab. 

Check this link for Mendix Documentation: https://docs.mendix.com/refguide/reference-selector/#xpath-constraints

 

Hope it helps !! ATB

 

answered