How to set up sub category based on category in incodent form. ex - sub-category should be displayed based on specific category

Amit95
Kilo Contributor

When you select category as Hardware - it should only display sub category related to Hardware.

if you select category as Software - it should only display sub category related to Software.

15 REPLIES 15

Amit95
Kilo Contributor

i mean you should not be able to select the sub-category - until you select the category first. i tried to make the sub category read-only, however you cannot select it once you have selected the category.

Under the sys_choice choices for Sub-Category, there is a dependent field, that is where you would input the value of the Category it is dependent on.

How are you setting it read only? A UI Policy should be able to reverse if false, i.e. if Category is Empty > Sub-Category is Read Only would reverse the Read Only if Category is not Empty.

what script to write in the UI policy to set this up?

sr_surendra
Giga Expert

Hello Amit,

 

Suppose you want values cd needs to be shown as subcategory if a is selected and  needs to be shown if you've selected as category.

 

you'll do as following

1)Create categories a & b

2)Once created, select value as and right click and select  configure choices of subcategory

find_real_file.png

3) Create sub category c & d from enter new item and add it in selected section as shown in screenshot below

find_real_file.png

4)Similarly select B in category right click and configure choices on sub category and add e & f

 

Regards,

Surendra

 

Amit95
Kilo Contributor

what script to write to make the sub-category as read-only if the category is not selected?