When a user selects a category, automatically set a default subcategory using client scripts

Siva_Prasad
Tera Contributor

I want to make a onchange client script When a user selects a category, automatically set a default subcategory using client scripts on incident table 

1 ACCEPTED SOLUTION

Syed14
Mega Guru

For this, you have to create Onchange Client script and set field name to category.

Syed14_0-1752492390075.png

PS: At first, try every task on your own for better understanding and then if you stuck somewhere then we will definitely help you.

 

 

View solution in original post

7 REPLIES 7

@Siva_Prasad 

In that case I will suggest to start from your side as it will be learning for you as well.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

AkashM915112357
Tera Contributor

You have to get data from server side depneding on category. So you need client script and script include to get data from server.

 

Client Script:

AkashM915112357_0-1752467506606.png

 

Script Include :

 

AkashM915112357_1-1752467574457.png

 

If my response helped please mark it correct.

 

Syed14
Mega Guru

For this, you have to create Onchange Client script and set field name to category.

Syed14_0-1752492390075.png

PS: At first, try every task on your own for better understanding and then if you stuck somewhere then we will definitely help you.