Child Field moved to Parent

bmhenry
Kilo Contributor

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

6 REPLIES 6

Community Alums
Not applicable

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)

valor
Tera Contributor

Since "GlideDBUtil.promoteColumn" is no longer an option, here's the simplest way to accomplish what you're asking.

  1. Load an unfiltered list for the table that has the column you want to promote (child table)
  2. Right-click on a column header and choose Export > XML
    1. This saves *all* field values. Make sure you don't hit the 10k limit
  3. Delete the child table column(s)
  4. Recreate the column(s) on the base table using the same element/column name (not the label!)
  5. 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.