
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 05:39 AM
Question: When I query a table (GlideRecord query) on the server side (via Script Include), how can I capture the Column Label of each field on the record?
If further information is needed, or if you would like to see my current script include, let me know.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 06:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 06:40 AM
Hi David,
Try gr[fieldName].getLabel()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 06:42 AM
You, my friend, are Genius!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 06:43 AM
try this
I have used this on quite a few situations and there is a copy change record routine on here that covers this and how I used it
var gr = new GlideRecord('incident');
if(gr.get('number','INC0010001'))
{
recFields = gr.getFields();
for (i=0;i<recFields.size();i++)
{
var glideElement = recFields.get(i);
gs.log(glideElement.getName());
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 07:03 AM