Data Policy override / masking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2020 05:34 PM
I have a requirement to enforce mandatory 'Assignment Group' across many tables on our system. We would like this to be applied both server and client side. Using a data policy would be ideal as it is more robust than other UI alternatives. One of the requirements is that this will not have to be updated every time a table is created. Therefore, I want to make use of the 'Inherit' property and not have to list each table that I want this enforced on.
To approach this, I create a data policy on the Task table that sets the 'Assignment Group' field to mandatory. The policy contains some conditions that exclude some simple extended tables that do not have their own extensions by stating that Task Type is not 'table_name'. Then new data policies are created on target tables below Task that are more complicated. These polices attempt to set the assignment group as no longer mandatory on that table and all below it by using 'Inherit'.
The problem that I run into is that when the data policies are processed using the debugger, the policy for this sub-table is ran, sets assignment group as not mandatory, and then the task level policy still runs, and sets the assignment group to mandatory. This poses a problem because in order to avoid this, it appears that every table that I do not want the assignment group to be mandatory on would have to be listed on the Task level policy. This would create too many conditions. I wouldn't be able make use of inheritance if this is the case and I would have to list every table I do not want it to apply to.
I wanted to see if I was missing something? Or is there a way to make data policies follow the table hierarchy? I need a data policy on a table such as 'sc_request' that will inherit to any extended tables and does not get taken over by the 'task' data policy. I would hope data polices could mask like ACLs. I'm looking for an override / masking function. But, it appears that the OOB override field does nothing on data policies.
Thank you
A similar question was asked a while ago on the community without any confirmed solution: https://community.servicenow.com/community?id=community_question&sys_id=0be603e5db1cdbc01dcaf3231f96...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2020 06:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2020 07:13 AM
This is the method I have implemented as a work around. It has required a significant amount of extra work to implement because dictionary overrides do not affect forms the same was as a data policy that has the 'Use as UI Policy on client' field selected.
If the data policy were used, it would enforce the mandatory on all tables that met the data policy condition. Whereas the dictionary override does not apply if the field is not on the form. Another difference is on list views. In our instance we deactivated list v.3 due to several shortcomings and reverted to list v.2. This means that both dictionary overrides and ui policies are not enforced from the list. The dictionary override functions if a user attempts to clear the assignment group field, but if a record were not to already have a value in the field, it still allows the user to save other values in other fields. Here is where a data policy would prevent submission and inform the user that an assignment group is mandatory.
At the moment I have this work around, but it would be ideal and easier to maintain if data policies could be implemented.