Splitting custom category table into 2 separate child tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Dear community,
i have the following requirement.
Currently there is 1 custom table u_category. Which already contains data.
I am extending this table to have child table u_category_1 with brand new data.
+
We would like to move existing data from parent 'u_category' to another child e.g. u_category_2, because of data consistency, reporting, also there could be other child category tables needed in the future.
Please, could you have a look on the following questions and answer them? thank you
1.) What would be the best way to transfer data from parent table level to child?
- update the sys_class in parent to new class? (field is editable...but I am not sure if it would work)
- script ?
- ...
2.) Currently data from parent table are in use (referenced) on incident record. What will happen if we change where the data are stored?
- I guess the field won't show anything and the related logic/ref qual will have to be updated accordingly...
- ...?
3.) We will have to move new data stored in table u_category_1 to TEST/PROD instances + eventually also data from 'u_category_2' table. What would be the best approach to move them?
- XML?
- update set?
3.a) In case we upload those data from DEV to TEST. Does it change the data in any way? Mainly the sys_id?
p.s.
I will test approaches on my PDI ... once it is available again 😞
thank you
Regards
Ales
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Strategic Analysis: ServiceNow Table Splitting Plan
Your plan to split the </ u_category /> table is technically sound but carries execution risk. The primary strategic risk you are avoiding or underestimating is the potential disruption of existing reference logic beyond just Incident tables and the complexity of controlled deployment of data across environments.
Prioritized Action Plan
Your focus should shift from how to do the task to ensuring zero business impact during execution.
Risk Pre-Check (Immediate): Before writing any migration script, run a check to ensure no mandatory fields on the new child table </ (u_category_2) />will prevent the existing records from moving.
Code Consistency Audit (High Priority): Search all existing Business Rules, Client Scripts, and Script Includes for direct GlideRecord queries on the parent table u_category. Ensure the logic is robust enough to handle the split, or, better yet, explicitly document that all logic must use the Parent table name to leverage inheritance.
Deployment Method Standardization (High Priority): Finalize and document the chosen method for the new data </ (u_category_1) />promotion (XML vs. Fix Script). />Ensure the development team understands the </ sys_id /> retention risk if they deviate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI @Ales ,
PFB response!
.) What would be the best way to transfer data from parent table level to child?
- update the sys_class in parent to new class? (field is editable...but I am not sure if it would work)
- script ?
Use easy import - Create a template from the table, fill and import - Here is detailed article -https://www.servicenow.com/community/developer-articles/how-to-create-or-update-records-using-excel-...
2.) Currently data from parent table are in use (referenced) on incident record. What will happen if we change where the data are stored?
- I guess the field won't show anything and the related logic/ref qual will have to be updated accordingly...
Yes if its referenced you need to update accordingly, Quick Question - Are you thinking to delete u_category table data?
3.) We will have to move new data stored in table u_category_1 to TEST/PROD instances + eventually also data from 'u_category_2' table. What would be the best approach to move them?
- XML?
Use XMLs to keep the sys_ids in sync across the instance(you would move actual table creation configuration through update sets, this is only for the data sets)
3.a) In case we upload those data from DEV to TEST. Does it change the data in any way? Mainly the sys_id?
Unless if you create them Manually or Import through transform maps, nope it will not change
Hope this helps!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Ales ,
Is this answered your query? if not - Ask follow up questions, if so - Close the loop!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025