{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":18650,"path":"governance-risk-compliance/update-node-rel-config.md","title":"Configure the Node relationship configurations","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure the Node relationship configurations\n\nCreate a Node relationship configuration record to establish relationships between nodes. Update the node relationships including source table, both Configuration Items \\(CI\\) and non-CI relationships. The Node relationship configurations define the connections between the source table and other tables \\(target tables\\), specifying how they are related.\n\n## Before you begin\n\nRole required: sn\\_oper\\_res.admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Data Relationships Framework** &gt; **Main node configuration**.\n\n2.  Open the desired Main node configuration from the list.\n\n    The following example shows the Main node configurations available in the instance.\n\n    \\[Omitted image \"service-to-dep-from-list.png\"\\] Alt text: List.\n\n3.  To add a Node relationship configuration, select **New** in the Node relationship configurations related list.\n\n    The Node relationship configuration form is displayed.\n\n    \\[Omitted image \"node-rel-config-new-record.png\"\\] Alt text: Record.\n\n    For description of the fields in the Node relationship configuration form, see [Node relationship configuration form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/governance-risk-compliance/node-relationship-configuration-form.md).\n\n    You can set up these relationship registries by creating a Relationship Registry record in the Relationship Registries module. The Relationship Registry new record form is shown in the example.\n\n    \\[Omitted image \"rela-registry-record-new.png\"\\] Alt text: Rel registry record.\n\n    For the description of the fields in the Relationship registry form, see [Relationship registry record form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/governance-risk-compliance/rel-registry-record-form.md).\n\n4.  Select the table of your choice in the **Source table** field in the **Source** tab.\n\n    \\[Omitted image \"node-rel-src-table.png\"\\] Alt text: Source table.\n\n    By default, the system auto-selects the table listed in the Main configuration record, the Service \\[cmdb\\_ci\\_service\\] table in this example. You can choose the auto-suggested table or a different table as per your requirements.\n\n5.  Select the relationship registry record in the **Relationship registry** field in the **Relationship** tab.\n\n    The relationship registry record defines how the Source table links to another table.\n\n    1.  Select the **Search** icon and select the Relationship registry record from the available list.\n\n        \\[Omitted image \"node-rel-conf-rel-tab.png\"\\] Alt text: Relationship tab.\n\n        Selecting the search icon shows the out-of-the-box Relationship registries that have Service as the source table. You can select a Relationship registry from the list.\n\n    2.  To select a new registry record instead of choosing a record from the out-of-the-box list, select **New**.\n\n        \\[Omitted image \"node-rel-conf-rel-tab-new.png\"\\] Alt text: New relationship registry.\n\n        You can create a new registry record if the out-of-the-box options do not meet your needs.\n\n    3.  Add a meaningful name for the new Relationship registry record.\n\n        You can add a proper name to avoid confusion because there might be other registries with the same name.\n\n    4.  Select the relationship table in the **Table** field.\n\n        The table should be the same as the Source table from the previous screen. This table name may be different from the table that you have defined in the Main node configuration record.\n\n    5.  Select the relationship type for the table in the **Relationship type** field.\n\n        Once the table is selected, the following options are displayed in the drop-down.\n\n        1.  **One-to-one**\n        2.  **One-to-many**\n        3.  **Many-to-many**\n        4.  **Scripted relationship**\n        Based on the selected drop-down value, a different list of tables is displayed in the **Relationship** field.\n\n    6.  Select the relationship table in the **Relationship table** field.\n\n        For One-to-one relationship type, the **Relationship** field shows the list of tables that are used as reference fields in the Source table.\n\n        The table name is populated in the **Relationship** field.\n\n        \\[Omitted image \"rel-reg-table.png\"\\] Alt text: Table.\n\n    7.  Select **Submit**.\n\n        You have configured the Source table and Relationship registry.\n\n        \\[Omitted image \"rel-tab-rel-registry.png\"\\] Alt text: Registry.\n\n        To select the target table, configure the Target section in the Node relationship configuration record in the next step.\n\n        \\[Omitted image \"node-rel-target-fields.png\"\\] Alt text: Target fields.\n\n6.  Configure the **Target** tab.\n\n    All the relationship options are explained in this step.\n\n<table id=\"choicetable_vzr_ppt_1gc\"><thead><tr><th align=\"left\" id=\"d124830e335\">\n\nStep\n\n</th><th align=\"left\" id=\"d124830e338\">\n\nDescription\n\n</th></tr></thead><tbody><tr><td id=\"d124830e344\">\n\n**One-to-one**\n\n</td><td>\n\nFor non-m2m tables, in the **Target** tab, select **Sys ID** as the **Target reference field** and choose the Relationship table as the **Target table**.\n\nThis is valid for One-to-one and One-to-many types.\n\n\\[Omitted image \"node-rel-target.png\"\\] Alt text: Target.\n\n</td></tr><tr><td id=\"d124830e373\">\n\n**One-to-many**\n\n</td><td>\n\nIf the Relationship table is an m2m table, select **Sys ID** in the **Target reference field** and then in **Target table**, select the same table as the **Relationship table**.\n\n\\[Omitted image \"one-to-many.png\"\\] Alt text: One-to-many.For One-to-many, the relationship shows the list of tables that has source table as a reference field.\n\n</td></tr><tr><td id=\"d124830e402\">\n\n**Many-to-many**\n\n</td><td>\n\nFor Many-to-many, the **Relationship** field shows the list of m2m tables in which the source table is referred. Notice that for Many-to-many, you have to select the field from the drop-down that you want as output. For example, \\[cmdb\\_rel\\_ci\\] table has **Parent** \\(cmdb\\_ci\\) and **Child** \\(cmdb\\_ci\\) fields. If you want to find the child service, you can select **Child**.\\[Omitted image \"many-to-many.png\"\\] Alt text: Many-to-many.\n\n</td></tr><tr><td id=\"d124830e431\">\n\n**Scripted**\n\n</td><td>\n\nFor the Scripted relationship, you can select the record from sys\\_relationship. You can define the relationship via script.\n\n\\[Omitted image \"scripted.png\"\\] Alt text: Script.\\[Omitted image \"scripted-2.png\"\\] Alt text: Updated script.As you can see, the **Applies to** table has to be as same as the **Table** field from the previous screen. Here the value in **Table** field is \\[cmdb\\_ci\\_service\\_business\\] but in the **Relationship** field, it is \\[cmdb\\_ci\\_service\\]. This configuration works because the \\[cmdb\\_ci\\_service\\_business\\] table extends to the \\[cmdb\\_ci\\_service\\] table.\n\n</td></tr></tbody>\n</table>7.  Select **Submit**.\n\n    The Node relationship configuration for the Main configuration record is now updated. The example shows the Node relationship configuration for the **Service to Dependencies** Main configuration record.\n\n    \\[Omitted image \"ser-to-dep-main-node-config.png\"\\] Alt text: Services to Dependencies.\n\n\n"}}