onChange Catalog client script - setDisplay() is not working in service portal

alekhyan
Kilo Contributor

Hi Everyone,

I have a onChange client script which contains setDisplay() to display "XXX" of type "Select Box" field. This is working in normal view but it is not working in Service portal.

I have used setVisible() method instead, then it is partially working in service portal. But issue is, I am unable to add options to that "XXX" through this onChange Client script when I use setVisible().

Now, please let me know that setDisplay() will work service portal(AM NOT USING VARIABLESET). If no, Please let me know if there is any workaround.

Thanks,

Alekhya N

7 REPLIES 7

snehabinani26
Tera Guru

HI Alekhya,



For catalog client scripts to work in Service Portal, you have to change the UI Type to   Both.


Hi Sneha,



Thanks for your reply..!



Yes, I have given UI type BOTH.



Thanks,


Alekhya N


vinitha3
Tera Guru

Hi,



Big Big problem!!!---service portal


ServiceNow KB: Service Portal: Variable set not hidden with g_form.setDisplay() function in a Catalo...



Check these two articles.



Try to use setvisible or change it into catalog UI policy.




Thanks,


Vinitha.K


Hi Vinitha,



Thank you..!



I have used setVisible() and No luck .


I cannot use Catalog UI policy because I have another conflicts there many conditions to be followed so I should use script.



Thanks,


Alekhya N