Catalog conditions in Catalog UI Policies

sach1
Tera Guru

Hi All,

I have written a Catalog UI policy on a Variable Set. I have this variable set in one order guide (starter request) and other items which are related to this order guides.

In UI policy under Catalog conditions I observed that "Catalog Item" field is available. So I utilized it as per the below snapshot.

UI Policy.JPG

In the above snapshot starter request is the name of the Order Guide. I was expecting that this policy will not work for Starter Request but it is not happening.

I want the variables to be read only on all other Items except the Starter Request order guide.

Am I doing something wrong ?

1 ACCEPTED SOLUTION

Thanks Kalai,



I used g_form.getParameter("sysparm_id") to get the sys_id of catalog item.



Order guides don't have this value but catalog items return sys_id. Using this logic I wrote a client script to make the variables read only.


View solution in original post

14 REPLIES 14

manikorada
ServiceNow Employee
ServiceNow Employee

Sachin,



Catalog Item you are seeing is not a OOTB variable. That should be something custom, so I don't know how you have conifugred how to populate it. I will check that first


Hi Mani, Thanks for the quick response.



It is not a custom field. I was exploring the Catalog UI Policies and saw this field to use in condition


Hi Sachin,



Catalog item is OOTB in   Catalog filter condition.   as you are Creating catalog ui policy on variable set. it will be apply on variable set(whether present on order guide form or on Catalog item form).



thanks & Regards


Govind Kumar Sharma


Hi Sachin,



i have a doubt , according to your requirement you want fields to be read only on catalog items. except the starter request order guide. how will user provide value to those fields(variable in catalog item).??



I suppose the value provided by user on order guide form will appear on catalog item form. am i right?



you can check a field present on order guide form named "Cascade variables ".



Thanks & Regards


Govind Kumar Sharma