How to only show dependent fields when parent field is selected in Client Script

nicolemccray
Tera Expert

I have several fields, each dependent upon the previous selection:

Application - parent field

Role Category - results depend upon Application

Role Sub Category - results depend upon Role Category

Role Name - results depend upon Role Sub Category

 

What I want to do is only show a field when the previous one has a selection because they are null until then.  For example, I only want to show the 'Role Category' field once the user has made a selection for Application.  Since it does not matter what they select, I'm not sure how to accomplish this.

3 REPLIES 3

venkatiyer1
Giga Guru

Hi,

 

Either you can use UI policy or in client script you can use the setDisplay

 

setDisplay()

If the field is hidden, the space is used to display other items. that means below field like, if sub status of the incident is not displaying then assignment group will display on that blank space.

setVisible()

If the field is hidden, the space is left blank.you can see the change on the form clearly.

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,


you can create UI policies.

 

Example: Application is not empty then visible true for Role Category and similarly when role category is not empty then show Role sub category.


Thanks,
Ashutosh Munot

Using the 'UI Policy', I've set up as follows:

 

find_real_file.png

 

 

However, this is only working for 'Role Category'.  The others will not display at all, even when 'Not --None--'