- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 10:49 AM
Hi,
I'm having difficulty in being able to rename 2 columns that appear in a database view. Here's a simple example. I created as shown below, which is merely a join of the incident and problem tables. I'm just using this simple example here - what I need to do is more complex.
If you create a report that simply shows a list view of several of the columns, and want to see both the Incident number and Problem number (if one exists), you will find that both columns are labeled number, which comes from their respective tables.
So, I followed the directions in this article in the Wiki (Step 2.3.1): http://wiki.servicenow.com/index.php?title=Database_Views
The instructions say to create an entry in the Language File which I did as follows.
Table: u_incident_and_problem (the name of my DB view)
Label: this is a test
Plural: left blank
Element: problem_id
However, I get an error when I enter the above. So, I must be doing something wrong, but I'm not sure what the correct way to fix this entry is.
Thanks in advance.
Scotty
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 11:07 AM
element name should be given like
viewtableprefix_fieldname
EX : ctask_closed_at
ctack is view table prefix and closed_at is view field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 02:52 AM
not sure and never tried it ... can you try changing the dot in the element name to a underscore '_' ???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 03:20 AM
I tried that as well, it dint

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 03:21 AM
sorry .. dont have a clue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2014 12:26 PM
Hi Vibha and Kalai,
Actually, I have a need to do the exact thing that Vibha asked for. And, that is relabeling a column (in a database view) that is a field that is referenced in another table. I've tried multiple ways to do that and can't find any way that works.
So, in the example in my original table join (where I join Incident and Problem), I am joining records where problem_id field of the Incident Table joins with the sys_id field of the Problem table. That join works flawlessly. If I create a report from that database view, I see that I can get to the Problem record 2 different ways:
From the Incident table via the Problem.Number field or
from the Problem table via the Number(p_number) field
If you create a report and select both of these fields to be shown, you will see that they are both labeled: Number, which is not very descriptive. So, if you attempt to make a new Language Definition File to re-label one of the columns, that is where things fall apart. For the element name, I've tried various combinations and either they are invalid entries or the entries are OK, but the columns don't get relabeled. It DOES work when I attempt to rename a simple field, but not when the column I'm trying to re-label is a reference into another table.
Is there anyone at Service Now who might have any insight into how to do this?
Thanks,
Scotty81
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2015 07:34 AM
The only way that I've gotten this to work is to bring the dot-walked field into the database view by joining that fields table and then create a language file entry for the field. Its cumbersome and the joining of the third table is unnecessary given the dot-walking, but its the only way to get the label correct.