Data policies override

roy_dreijling
Kilo Contributor

Hi,

I am trying to set up data policies on cmdb(or cmdb_ci) level and use the inherit mechanism.

However on cmdb_ci_computer and extends I need a slightly different policy because of virtual.

There is a (hidden) field on data policy "overrides" but it does not seem to work. The data policy on cmdb level is still enforced even though I set a data policy on cmdb_ci_computer that overrides the one on cmdb.

[I want serial_number to be mandatory if status has a certain value, in the entire cmdb except for on computer and extends, where it should be mandatory if not Virtual]

Does anyone have an idea? Should it be possible to use this hidden "override" field on data policies?

The mandatory checkbox on dictionary is not an option as it is only enforced if the field is actually on a form.

Thanks!

11 REPLIES 11

Alikutty A
Tera Sage

Hi Roy,



Can you write a new data policy specific to cmdb_ci_computer table and set it to mandatory. I believe you can override the parent cmdb_ci by adding a new policy on the child table.



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


HI alikuttyka,



that is exactly what I tried to do but it is not working. On computer the


cmdb -policy is still enforced most likely together with the one on


computer.



I created a policy on cmdb_ci_computer,


added the override field to the form.


Selected the cmdb policy.



But the policy on cmdb is still enforced on computer.





Met vriendelijke groet,




Roy DreijlingServiceNow Professional




2017-03-28 15:28 GMT+02:00 alikuttyka <community-no-reply@servicenow.com>:



<https://community.servicenow.com/?et=watches.email.thread>


Data policies override



reply from Alikutty Karupamveetil


<https://community.servicenow.com/people/alikuttyka?et=watches.email.thread>


in Developer Community - View the full discussion


<https://community.servicenow.com/message/1113799?et=watches.email.thread#1113799>


I tried it and I was able to override the data policy without any changes. Can you check if there are any other UI policy or client script added on your personal computer table. Here are my data policy screens. I was able to override mandatory with the second data policy.


find_real_file.png


find_real_file.png



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Huh, you are not even using the ''override'' field, or are you?



Perhaps my issue is "condition'' related?



Once I set Virtual = true on the server-form, the mandatory marks are removed, but when I click Save, the policy error is displayed.



I will try a few more things, thx.



find_real_file.png



find_real_file.png