Child Field moved to Parent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2020 11:00 AM
How would I be able to move a field from a child table to the task table? I searched on here and the link that was listed everywhere is no longer working. I already have data in those fields and I want to retain that data.
Move From
Table IRS - u_current_status
to
Table Task - u_current_status
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2024 03:25 AM
GlideDBUtil.promoteColumn(sourceTable, targetTable, column)
If there is any specific field you have created on the Child Table and Now you want to make the field available on the Task Table then the only solution would be to Move your Custom field created on the Incident table to the Task Table using the Below script.
eg : GlideDBUtil.promoteColumn(incident,task, column)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 09:24 AM
Since "GlideDBUtil.promoteColumn" is no longer an option, here's the simplest way to accomplish what you're asking.
- 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.