Promoting a Field

Andrew Bettcher
Kilo Sage

Hi,

I was asked to make some updates to the project and project task forms in order for them to receive data from an external source. One of the new fields is a string field that takes the external reference number. I created it individually directly on each table in turn (i.e. so that there are separate fields on both the pm_project and pm_project_task tables with the same name).

These fields are then populated via the import and process I have running. That all works fine.

HOWEVER, I now need to report on time cards submitted against these tasks and include that external reference field. The only place I can see the external field is under Top Task and then scrolling down to the extended fields shown in red on the list:

find_real_file.png

Adding either of these to the report returns no data even though I have confirmed that the field is populated on the forms.

In order to resolve this, I tried to promote the field to the task table using SNGurus amazing guide (here) but that doesn't work. I've tried a few variations on this theme but I haven't been able to successfully promote the table. My background script is:

GlideDBUtil.promoteColumn('pm_project_task', 'planned_task', 'u_netsuite_project_number', true);

But I've also tried moving it to 'task' and also followed some of the recommendations in the comments section underneath.

I guess the question is, does anyone know what would stop a column from being promoted in this way OR, is there another way to get the right field into my report without having to move the column?

5 REPLIES 5

valor
Tera Contributor

I know this is old, but it's still relevant -- now that "GlideDBUtil.promoteColumn" is no longer an option, here's the simplest way to accomplish the same thing.

  1. Load an unfiltered list for the table that has the column you want to promote
  2. Right-click on a column header and choose Export > XML
    1. This saves *all* field values
  3. Delete the 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.