The CreatorCon Call for Content is officially open! Get started here.

Hide Field when None is selected in a list box

Ziad Qadora
Kilo Sage

Hello,

I have a requirement to hide a field if another field that is a list box is set to "Not Applicable".  I have been able to accomplish that with a UI policy that applies to the Variable Set that contains both variables.

My question is, how can also hide the field if nothing has been selected and "None" shows in the list box.  Please see the images below for the UI policy configuration.

 

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

Because your UI Policy actions are to show the field, you'd have to use "AND", instead of "OR" if you're going to use IS NOT.

So condition one is "Not Applicable" AND condition two is not "-- None --", then...do 'x'.

So it'll only do 'x' when both are true, which is what you want.

Please mark reply as Helpful/Correct. Thanks! 🙂


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Ziad,

1. I've created a select box with "None" and a single line text.

2. Create a UI Policy like below.

Condition: "was_release" "is not one of" "Yes, No, Not Applicable"

Reverse if false: true

find_real_file.png

3. Set Script as below:

Execute if true:

function onCondition() {
    g_form.setVisible('field1', true);
}

Execute if false:

function onCondition() {
    g_form.setVisible('field1', false);
}

Execution result:

case 1: "Yes", "No", or "Not Applicable" selected, Field1 is displayed

find_real_file.png

case 2: If "--None--" selected, Field1 is hidden

find_real_file.png

Hi @Hitoshi Ozawa 

 

Thank you for the reply, in this case the field needs to be hidden if the selection is either "None" or "Not Applicable".

Regards,

 

Ziad

To hide when the selection is either "None" or "Not Applicable", set the condition as follows.

find_real_file.png

Execution result:

case 1: None

find_real_file.png

case 2: Not Applicable

find_real_file.png

case 3: Yes

find_real_file.png

case 4: No

find_real_file.png