Move the Child table column to Parent table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 07:28 AM
Hi All,
I want suggestions that how can we move the child table field to parent table.
i have searched in community where they suggested the
GlideDBUtil.promoteColumn() function call, but not able to execute as Runtime error and not used above instances after London.
One more Process is to create same field in form designer view with same name and using a BR to copy the data from child field to Parent field which we created, but this also failed.
Any more other ways to do this requirement.
In clear picture,
cmdb_ci_server table has a field called classification which it needs to be there in cmdb_ci table.
Thanks inadvance,
pvvn.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 07:41 AM
Hello @pvvn
To promote a field to the parent table you can either:
- create a new field directly on the parent table and use it as an alternative OR
- delete the column from the child table and recreate it in the parent table. The recommended way would be to:
- Copy data to a staging table via script or export it to CSV or Excel as a backup before deleting the current field.
- Delete the field and re-create it where required.
- Depending on how you backed up the data, you can run a script to copy it from the staging table or use transform maps to import it from exported files.
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 12:27 PM
Hello @pvvn
If you find my response as Helpful, Pls mark the Solution as Accept.It will help the future members.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 01:11 PM
Hi pvvn,
I see that field on cmdb_ci_server and on 54 other child tables OOB. I would not try promoting that. Instead, create a new custom field for your use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 09:26 AM
You can't move OOB fields -- you'll have to create your own.
However, if you have a custom field that you want/need moved, this is the simplest way now that "GlideDBUtil.promoteColumn" is no longer an option.
- Load an unfiltered list for the table that has the column you want to promote (child table)
- Right-click on a column header and choose Export > XML
- This saves *all* field values. Make sure you don't hit the 10k limit
- Delete the child table column(s)
- Recreate the column(s) on the base table using the same element/column name (not the label!)
- Right-click on the column headers from #2 and choose Import XML
If the column name(s) are the same as the original ones, the values will be replaced seamlessly.
On the chance that the new base table column name isn't exactly the same, you can modify the extracted XML from #2 and update the column name to match and re-import.