Setting Default Dropdown Values Based on Navigation Context in Mendix

0
I have an enumeration in Mendix with three values: Car, Bike, and Bicycle. When creating a new purchase, I display these options in a dropdown. However, I use the same page for repairs of previously purchased items. In that case, I want the dropdown to show the correct default value—i.e., if I navigated from the Bike page, then Bike should be pre-selected in the dropdown. How can I achieve this behavior in Mendix?
asked
2 answers
1

Hello,

The dropdown always shows whatever value is already set on the object you pass into the page. So you don’t need to configure the dropdown itself, just make sure the object has the right enumeration value before the page opens.

- For new purchases, create the object in a microflow and set the default VehicleType if needed.

- For repairs, pass the existing purchase object to the page. Since it already has VehicleType = Bike, the dropdown will automatically show Bike selected.

 

So the trick is simple: prepare the object with the right value, and the dropdown will take care of itself.

 

Regards

Reemali

answered
0

Thank You.

 

I have tried another option on enter i applied one nanoflow and inside that set default value base on condition, It's work.

answered