How can I migrate a extended table field to the parent field?

samuelscott
Tera Expert

I have a field that was initally reated on an extended table, but since its use is necessarry on other extended tables, I am trying to move it to the parent table.

Is there a easy way to do this without losing any data and without changing the column name, in other words, I want to do this without having any reprecussions.

 

I've looked into several community post and all, if not most, direct me to the same link that is not available anymore: http://www.servicenowguru.com/scripting/promote-field-extended-table-servicenow/

Thanks!

 

8 REPLIES 8

Sorry, I can't understand what you tried to say. I know how the code works...it just didn't work, though. This is what I placed

 

GlideDBUtil.promoteColumn('u_expense_line_custom', 'fm_expense_line', 'u_amount_with_tax_usd', true);

 

 

samuelscott
Tera Expert

Hello I tried this on my dev instance and nothing happens....everything stayed exactly the same.

 

GlideDBUtil.promoteColumn('u_expense_line_custom', 'fm_expense_line', 'u_amount_with_tax_usd', true);

This has been disabled as of London.

Details from the HI KB: https://hi.service-now.com/kb_view.do?sysparm_article=KB0743116

 

JarodM

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.