- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 03:12 PM
I am trying to understand how servicenow table extension works, but I am stuck on how the data is distributed.
at first I thought when I extend another table, and I add a record to the child table that it would create a record in both parent and child tables, but thats not the case.
case study:
a table (child table) extends another (parent table).
I add a column(c) to the child table.
parent table has column a,b
child table has column c
when i create a new record in child table with this
a = "a"
b = "b"
c = "c"
How is that data stored in child table if it does not have columns a and b?
does it create two records, one in each table with the same sys_id?
how is the data split?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 08:58 AM
Hi @juan9 ,
When a table in ServiceNow is extended, the child table inherits all fields (columns) from the parent table. However, the data is not stored in two separate records; rather, it is stored in a single record with the same sys_id in both the parent and child tables.
Here’s how the data is managed:
- The child table inherits the fields a and b from the parent table, so when you create a record in the child table, it will store the values for all fields (a, b, and c) in a single record.
- ServiceNow stores this record in the child table, but it links to the parent table by using the same sys_id.
- When you query the parent table, it will return data only from fields a and b. When querying the child table, it will return all fields, including a, b, and c.
- So, no two records are created. The data from the parent table is accessible to the child table, and both use the same sys_id to connect their data.
Thanks & Regards,
Siddhesh Jadhav
If this solves your query, please mark it as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 03:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 03:48 PM
I created a record in the child table and it appears as it does create a record in both tables with the same sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 08:58 AM
Hi @juan9 ,
When a table in ServiceNow is extended, the child table inherits all fields (columns) from the parent table. However, the data is not stored in two separate records; rather, it is stored in a single record with the same sys_id in both the parent and child tables.
Here’s how the data is managed:
- The child table inherits the fields a and b from the parent table, so when you create a record in the child table, it will store the values for all fields (a, b, and c) in a single record.
- ServiceNow stores this record in the child table, but it links to the parent table by using the same sys_id.
- When you query the parent table, it will return data only from fields a and b. When querying the child table, it will return all fields, including a, b, and c.
- So, no two records are created. The data from the parent table is accessible to the child table, and both use the same sys_id to connect their data.
Thanks & Regards,
Siddhesh Jadhav
If this solves your query, please mark it as helpful and accept the solution.