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
‎04-14-2020 11:18 AM
Hi Henry,
Only possibility would be update it via script but can you elaborate more about it. Like what field & when it should copy the status.
Thanks,
Jaspal Singh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2020 11:19 AM
Hi,
Please refer below link might be helpful for you:-
https://hi.service-now.com/kb_view.do?sysparm_article=KB0743116
Please mark reply as Correct/Helpful, if applicable. Thanks!
Regards,
Tushar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2020 11:24 AM
Hi
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.
You need to run this in Background Script:
GlideDBUtil.promoteColumn('table_to_move_from', 'table_to_move_to', 'field_to_move', true);
For Example I had to move the Field Impact1 from Incident to task Table then I can write the code as below;
example:
GlideDBUtil.promoteColumn('incident', 'task', 'u_impact1', true); //make change according to your table name.
So once this Script is Run in the Background Script, The field will be moved from Incident to Task allowing you to make it available in the Task List View.
for more refer ..
If it help mark helpful or correct
Thanks and regards
Anil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2020 11:33 AM
Hi,
You can use the GlideDBUtil.promoteColumn(sourceTable, targetTable, column) function call
sourceTable: table that contains the column that needs to be promoted. must be child of the targetTable
targetTable: table that will have the column after promoted
column: the column to promote
I haven't used this in a long time and have not tested it since we introduced Task Table Flattening, where different fields in the Dictionary can occupy the same field in the database. As such I would maintain caution and test this with a dummy field first on a developer/demo Instance.
EDIT: throw -> maintain
Or you can go through it for another solution
https://hi.service-now.com/kb_view.do?sysparm_article=KB0743116
Please mark correct or helpful.
Thanks
Swapnil