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

bernyalvarado
Mega Sage

Perhaps you should try using a catalog client script.



Thanks,


Berny


I will try that today


Kalaiarasan Pus
Giga Sage

It does not seem to respect anything in the condition field except the variables and its value.So you can consider adding a dummy variable to variable set. Use this variable to check and store the value if the current item is catalog or order guide and default its value to act as a flag. You can do this easily in any existing onload script of the variable set.



Since UI policies run after client scripts, use the variable to define the condition. Benefit of this would be that the solution is generic and you don't need to change it for every catalog. Hope that helps


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.


Great !! Close off the loop and mark any responses that are valid as helpful or correct ...