logo

NJP

Required configuration to add a bottom-level lens structure for a data separation enabled lens

Import · Jul 13, 2023 · article

Required configuration to add a bottom-level lens structure for a data separation enabled lens

This article provides the required data separation configuration for adding a lens structure for the lens on which data separation is enabled.

Note: This configuration is applicable only if you are creating a bottom-level lens structure for the lens on which data separation is enabled.

  1. Add a bottom level lens structure in the required lens. For instructions on how to add a lens structure, see documentation.

SupreetV_0-1689227172074.png

Note: Make sure that the planning item(sn_align_core_planning_item), project (pm_project) and demand (dmn_demand) tables have a field referencing to the entity that is populated on the lens structure you have created.

  1. Make sure that the “Bottom entity on planning item” field on the lens record is populated with the field on planning item(sn_align_core_planning_item) table referring to the entity populated on the lens structure you have created.
  2. Navigate to System Definition -> Script Includes and search and open the “DSLensLeafEntityMapping” record.
  3. Add the key-values as required for both “pm_project” and “dmn_demand” keys in the “DSLensLeafEntityMapping.LEAF_LENS_ENTITY_MAP” constant.

For the “pm_project” key of DSLensLeafEntityMapping.LEAF_LENS_ENTITY_MAP, add a key-value pair.

  • Key = Name of the field on planning item(sn_align_core_planning_item) table referring to the entity in the newly added lens structure.
  • Value = Name of the field on project(pm_project) table referring to the entity in newly added lens structure.

For the “dmn_demand” key of DSLensLeafEntityMapping.LEAF_LENS_ENTITY_MAP, add a key-value pair.

  • Key = Name of the field on planning item(sn_align_core_planning_item) table referring to the entity in the newly added lens structure.
  • Value = Name of the field on demand(dmn_demand) table referring to the entity in newly added lens structure
  • Save the changes made to the script include.
  • Add the entity-group mappings in the “Entity-Group Mappings” table with lens entity table as the entity in the bottom-level lens structure and click “Sync data separation” on the Entity-Group mappings list view.

Example:

For a new lens structure with entity as “pm_program” the DSLensLeafEntityMapping.LEAF_LENS_ENTITY_MAP constant must be updated as follows.

  • Under the “pm_project” key (If “u_program” and “top_program” are the fields on planning item(sn_align_core_planning_item) and project(pm_project) tables respectively referring to pm_program table, then key value pair will be “u_program”: “top_program”)
  • Similarly, under the “dmn_demand” key (If “u_program” and “primary_program” are the fields on planning item(sn_align_core_planning_item) and demand(dmn_demand) tables respectively referring to pm_program table, then key value pair will be “u_program”: “primary_program”)

SupreetV_1-1689227172104.png

  • Add the entity-group mappings in the “Entity-Group Mappings” table with lens entity table as “pm_program” and click “Sync data separation” on the Entity-Group mappings list view.
View original source

https://www.servicenow.com/community/spm-articles/required-configuration-to-add-a-bottom-level-lens-structure-for/ta-p/2611183