show/hide fields based on another fields vaule

tbofinger
Tera Contributor

Hi everyone,

 

I’m new to Java scripting, so apologies in advance for the beginner question.

 

I am trying to build a user enablement form that will dynamically update the software list based on the department field.

I’ve created the UI policy script below, and while I’ve stopped getting script errors, the form doesn’t update as expected.

 

Any help would be appreciated.

 

function onCondition()

{

 

                var dept = g_form.getValue('department');

               

                if(dept == 'accounting'){

                               

                                //show accounting apps

                                g_form.setDisplay('pep',Yes);

                                g_form.setDisplay('fas',Yes);

                               

                                //hide non-accounting apps

                                g_form.setDisplay('salesforce',No);

                                g_form.setDisplay('factset',No);

                                g_form.setDisplay('dst',No);

                               

                }

               

}

35 REPLIES 35

I think I am, thanks again!