Query on catalog Variable

Joshuu
Kilo Sage

Hi All,

 

I have a variable on catalog form as requested_for.

 

How to check if this user is part of a specific group and clear a value on the other variable (select box) if not part of the group.

 

Thanks & Regards.

 

 

7 REPLIES 7

Hi @Joshuu ,

You can use below script

if (isMember === 'false') {
var selectedRole =g_form.getValue("selectbox_varible");
if (selectedRole === 'admin') {
g_form.setValue('other_variable_to_clear', '');
}
}

Please mark it as helpful and solution proposed.

Thanks,

Anand

Hi @Joshuu ,

Mark it helpful and solution proposed if it serves your purpose.

Thanks,

Anand

Hi @Anand Kumar P ,

 

Actually, It is not working as expected. I have followed the below thread as well. Do you have any suggestions on the same?

https://www.servicenow.com/community/developer-forum/restrict-a-select-box-choice-to-specific-group-... 

 

Thanks & Regards.