Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Change Column Label on Database View

Stan Martin
Kilo Guru

I've created a Database View that joins the Audit Table with the Choice Table.  There are actually 2 separate joins so that I can get the old value and the new value separately.  However, when I display the database view, I have 2 column headers called Label.  I need to have 1 say Old State and the other say New State.

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi Stan Martin,

You need to create a new label for that field/column and add your database-view-table-name. It will rename the field/column name in database view.

 

Please check this docs: Change the field label or hint and thread: Can't relabel a column in a database view

 

Regards,

Sagar Pagar

The world works with ServiceNow

View solution in original post

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @Stan Martin 

labels for the headers of database views are stored at table sys_documentation.

If there are no entries for your database view, the labels from the original tables are taken.

Kind regards
Maik

Sagar Pagar
Tera Patron

Hi Stan Martin,

You need to create a new label for that field/column and add your database-view-table-name. It will rename the field/column name in database view.

 

Please check this docs: Change the field label or hint and thread: Can't relabel a column in a database view

 

Regards,

Sagar Pagar

The world works with ServiceNow

Stan Martin
Kilo Guru

 

Got it.

find_real_file.png

and for the 2nd label

find_real_file.png

 

New labels show up just the way I wanted.

find_real_file.png

shallom
Tera Contributor

image.png

you can rename the column name via sys_documentation 

  • Table: database view table
  • Field: new database view field