Catalog UI Policy not applying on Requested Item as configured

Kamva
Giga Guru

Hi Community,

 

I have developed a catalog item which has a require to make one checkbox (Conferences) not to be mandatory when other checkboxes are mandatory. In achieving that requirement, I have created catalog UI Policies for each checkbox to make the Conferences checkbox not mandatory and show multi-line text fields for the associated checkboxes. Now the problem I have is that these UI Policies is that they don't apply on the Requested Item record. Please assist. I have attached the images for your reference.

 

Catalog Item form when none of checkboxes is selected:

Kamva_1-1715154298897.png

 

Catalog Item form when one checkbox is selected:

Kamva_0-1715154234380.png

 

Requested Item logged with Legal checkbox is selected:

Conferences is still mandatory

Kamva_2-1715154385779.png


Catalog UI Policy configuration:

Kamva_3-1715154562519.png

Kamva_4-1715154599537.png


Regards,

Kamva Mjanyelwa

10 REPLIES 10

Zack Hilacan1
Mega Sage

Hello @Kamva ,

I have replicated your configuration, the same way you have implemented and for my case there was no problem.

The mandatory was removed upon selecting the legal check box, refer to the screenshots.

Catalog form when no check box is selected.

ZackHilacan1_0-1715156580611.png

Catalog form when legal is selected:

ZackHilacan1_1-1715156630511.png

Variable Configuration [Conferences]:

ZackHilacan1_2-1715156674162.png

Catalog UI Policy Configuration :

ZackHilacan1_3-1715156724683.png

RITM legal checkbox is selected:

ZackHilacan1_5-1715156818353.png

 

Is this has been of help please mark it as helpful and accept as solution, Thanks!

 

 

 

 

Hi @Zack Hilacan1,

 

Can you please have text fields below each checkbox that will be visible on the selection of the checkbox above them?

Sure thing, here is what I did. And it's working fine.

RITM 

ZackHilacan1_0-1715157880470.png

Catalog Form

ZackHilacan1_1-1715157926119.png

Due to multiple Catalog UI policies you have, may result in conflicting each other making the Conference check box mandatory.

 

Enable your debug policies and open the Javascript debug window, you can check the logs or put a field watcher on the particular field to check it's security.


https://docs.servicenow.com/bundle/vancouver-api-reference/page/script/debugging/concept/c_JavaScrip...

 

Hope this helps.

 

Anubhav24
Mega Sage
Mega Sage

Hi @Kamva ,

I would suggest you to switch on the "Debug UI Policies" and then do the same process and see what all UI Policies get triggered and from there on you can easily debug.

Anubhav24_0-1715157787467.png

Please mark helpful/correct if my response helped you.

AnimeshP_96
Tera Guru

@Kamva 
i think checkbox is getting turned off but its the label which is mandatory, can you remove the label before the conference checkbox, and try and also you can try security check for ui policy using  "javascript log and field watcher" avalaible in ur application profile menu at the top left corner of the platform instance.

 

let me know if this works

 


Please accept the solution /mark this response as correct or helpful if it assisted you with your question.




Regards,
Animesh