Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to make assignment group nonread only in problem table when you select category is dropdown None

pk16514
Tera Contributor

How to make assignment group non-read only in problem table when you select category is dropdown None and assignment group is read only it selects any other category

1 ACCEPTED SOLUTION

Hi @pk16514 

There you go.

Timi_0-1704280049451.png

 

Sample script

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        g_form.setReadOnly('assignment_group', false);
        return;
    }

    g_form.setReadOnly('assignment_group', true);
}

 

Cheers,

Tai Vu

View solution in original post

4 REPLIES 4

Tai Vu
Kilo Patron
Kilo Patron

Hi @pk16514 

It can be achieved with an UI Policy.

Sample below

Timi_3-1704279606897.png

Timi_2-1704279588428.png

 

 

Cheers,

Tai Vu

 

pk16514
Tera Contributor

is it possible using client script?

Hi @pk16514 

There you go.

Timi_0-1704280049451.png

 

Sample script

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        g_form.setReadOnly('assignment_group', false);
        return;
    }

    g_form.setReadOnly('assignment_group', true);
}

 

Cheers,

Tai Vu

pk16514
Tera Contributor

Thanks @Tai Vu