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

How to create an advanced UI policy condition without "run scripts"

Stephen W_
Giga Guru

I need to hide/show a field based on the selection in another field.   But the value I need to evaluate is a range,

I created a UI policy using a script:

Execute if true:

function onCondition() {

        //turn display value into an integer

        var intMyVar = parseInt(g_form.getDisplayBox('myvar').value);

        if ( (intMyVar ) && ((1 <= intMyVar && intMyVar < 3) || (6 <= intMyVar && intMyVar < 8)) ) {

                  g_form.setDisplay('myothervar',true);

        } else {

                  g_form.setDisplay('myothervar',false);

        }

}

However, this only evaluates onLoad().

If I were able to put this in the UI catalog condition, it would re-evaluate whenever the value of a variable in the variable set changed.

Is there a way to embed something like this into the catalog condition or is my only option to use a catalog client script?

1 ACCEPTED SOLUTION

lokeshreddy23
Giga Expert

Hi


On change client script is perfect here.☺


View solution in original post

2 REPLIES 2

lokeshreddy23
Giga Expert

Hi


On change client script is perfect here.☺


Thanks