Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Dot Walking in a Catalog Item UI Policy not working

kevinray
Giga Expert

I have a reference field in my catalog item that looks up servers in our cmdb_ci_hardware table.

I have two other questions that I want to ask based on the class of the server they select

I created a UI Policy and dotwalk to the class field

find_real_file.png

The issue is that as soon as a populate the build type with "Copy of an Existing Server" the Storage size windows field shows up on the form.

It doesn't even wait for me to select the server to know what the cpr_server_name.Class even is.

1 ACCEPTED SOLUTION

sethivarun
Kilo Guru

Hi Kevin,


Apparently UI policy doesn't work with dot walking



ConditionsThe conditions which, if fulfilled, cause the UI policy to be applied. Conditions are built with the condition builder. To set conditions using a script, use a client script instead.

Conditions are only rechecked if a user manually changes a field on a form. If the change is made by a UI action, context menu action, or through the list editor, it is not evaluated.


In UI11, the field must be on the form to be checked by a UI policy. To test the value of a field but hide it from users, add the field to the form and use UI policies to hide it. This requirement also prevents dot-walked fields from being used as conditions.



HEre is the link Create a UI policy



Please mark the answer has helpful or correct based on the impact on the question


View solution in original post

12 REPLIES 12

Hi Kevin,



There is another way to do this, instead of doing dot walking, since you are using cmdb_ci_hardware, can't you directly use class. It is available at the cmdb_ci_hardware level and it is same as the server class.



Please mark the answer has helpful or correct based on the impact on the question


Not sure what you mean... that's what I did. see my first screenshot. My variable "cpr_server_name" is referencing the cmdb_ci_hardware table as you state.



I select 'Show related fields"


then I select "cpr_server_name => Server Fields".


Then i select "Class".



This isn't working even though it's letting me select the class. (see my first screenshot)


no you don't have to do show related fields, you simply type class and it would be there


But that field has nothing to do with the 'class' of the variable I created related to the CMDB CI table (CMDB ci classes). That is an entirely different set of classes.


sethivarun
Kilo Guru

https://your_instance.service-now.com/cmdb_ci_hardware_list.do?sysparm_query=sys_class_name%3Dcmdb_c...



try this link, replace your_instance by the your instance's name. Does it give you the windows servers?