Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Need to create Catalog UI Policy with a dot-walked condition from a Record producer (and workaround PRB647552 - [Catalog UI Policy] Dot walked condition not working)

dpopov
Kilo Contributor

There is a known issue: PRB647552 - [Catalog UI Policy] Dot walked condition not working

I asked SN Support for the workaround and got the following suggestion:

"It sounds like you may need to construct a script using GlideRecord to lookup the checkbox value in the Company and then set the Record Producer variable".

Can anyone help me to do it?

Basically, I just need to create UI Policy with the following condition:

If

Company=>Company fields

24/7 is True

Catalog UI Policy Actions

Variable Name <field name> Visible = True


5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Dmitry,



In that case I would recommend you to create a catalog client script and hide/show the variable.


You can refer OOTB client script on incident table "Set Location to user" for reference on how to pull referenced table field. Once you get the output then hide the field as per logic.


Creating a Catalog Client Script - ServiceNow Wiki


The other option is to make a GlideAjax call from script and then get the output at client side.


http://wiki.servicenow.com/index.php?title=GlideAjax#gsc.tab=0


purbali1
Giga Expert

Better would be to write Client Script with glide record



on load client script-



var gr= new GlideRecord('core_company');


gr.addQuery('name', <value selected in catalog form>);


gr.addQuery('24/7','true');


gr.query();


if(gr.next)


g_form.setVisible(<variable_name>, true);


FYI, I would not recommend GlideRecord calls from client script. The best practice is to make GlideAjax calls.


Client Script Best Practices - ServiceNow Wiki


Yah I know that! I suggested this because suggestion of creating glideRecord is provided by SN Support.