In Service catalog check box field mandtory

nameisnani
Mega Sage

Hi Team , 

 

Can anyone please help me here , 

 

when ever ' Does the request incliude ....... ' is selected Yes . Then ' Select the data domain and check box has to be visible . how to acheive this .

 

nameisnani_0-1730170464620.png

nameisnani_1-1730170508273.png

 

I have written a UI policy which is not working as per my requirement 

nameisnani_2-1730170767396.png

 

 

I haven't selected Yes ,  but label and checkbox are showing .

nameisnani_3-1730170851316.png

 

 

can anyone please help me here 

19 REPLIES 19

Hitoshi Ozawa
Giga Sage
Giga Sage

It's working in my PDI.

I've defined fields as below.

HitoshiOzawa_0-1730189721096.png

Defined UI Policy as below.

HitoshiOzawa_1-1730189738154.png

Execution result.

(1)When form loads.

HitoshiOzawa_2-1730189751488.png

(2) When "Yes" selected

 

HitoshiOzawa_3-1730189762240.png

(3) When "No" selected

HitoshiOzawa_4-1730189774241.png

 

 

@Hitoshi Ozawa 

 

This is the UI plociy i have written

nameisnani_0-1730192092994.png

 

I haven't selected YES 

nameisnani_1-1730192142361.png

 

 

How label is visible ? I don't know ..

@nameisnani Are you sure you don't have any other UI policy on the form?

From the field order number, it seems like there are many fields on the form.

HitoshiOzawa_0-1730192670394.png

 

Are you sure there isn't any Client Scripts on the form or if you're using Variable Sets, there isn't any Client Script on the Variable Sets?

 

Finally,  I'm using Xandu release. From your screenshot, you seems to be using something different.

The data type I'm using for "Does the request include sensitive Data.." is Yes/No. By default, it doesn't include "None". I've check "Include none" to include it in the choice.

Are you doing something different?

HitoshiOzawa_1-1730193086131.png

 

@nameisnani  I got it. You're trying to make "Select the data Domains that requresed sensitive CDEs ..." mandatory when "Does the request include sensitive Data Elements?" is "Yes".

In this case, define fields are below.

(1)Make "Does the request .." field to be Mandatory while field "Customer Domain" (the first checkbox in the list) should not be Mandatory. I think you have Mandatory set to True that the reason it's appearing because Mandatory implies it has to be entered so ServiceNow will display all Mandatory fields.

HitoshiOzawa_5-1730246116296.png

 

(2)In the UI Policy, set "Visible" to True on the label and all the checkboxes. Also, set Mandatory to True on field "customer_domain".

HitoshiOzawa_1-1730245890268.png

Execution result:

(1) When form is first loaded

HitoshiOzawa_2-1730245934198.png

(2) When "Yes" is selected

HitoshiOzawa_3-1730245956582.png

(3) When "No" is selected

HitoshiOzawa_4-1730245979288.png