Expand my Community achievements bar.

Double conditions to hide/display a field


Former Community Member

Hello all,

I have two drop-down menus and a field. In this field, depending on what is selected in both drop-down menus, either a Yes-No choice or a drop-down menu appears.

My problem is that I don't know how to do that.

Could I run a script on the preOpen event of the field that says:

if dropdownmenu1.rawValue == 1 and dropdownmenu2.rawValue == 2

then field.YesNoChoice.presence = "visible"

field.DropDownMenu.presence = "hidden"

Would that work? Where could I get an example for that (if it exists)?

Thanks in advance

1 Reply


Level 10

Place the code in the Exit event of both the drop downs.

JavaScript is the language.

if (dropdownmenu1.rawValue == "1" && dropdownmenu2.rawValue == "2"){

     YesNoChoice.presence = "visible";

     DropDownMenu.presence = "hidden";