- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 11:29 PM
Hi,
I'm creating a workflow where I cannot use current.cat_item.name - I need it for short_description
The issue is the record current.cat_item.name is based on the user's language preference.
I need to query for current.cat_item.name in sc_cat_item to get the original English name of the item, but I need a little help here please.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 11:03 AM
Hello Radek,
Updated code below.
var catname = new GlideRecord('sc_cat_item');
catname.addQuery('sys_id', current.cat_item);
catname.query();
var catalogname = '';
while (catname.next()) {
// store cat name
catalogname = catname.name;
}
- Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 11:00 AM
Replace catalogname = cat_item.name with
var catalogname = catname.name;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 11:01 AM
Replace catalogname = cat_item.name with
var catalogname = catname.name;
AND
catname.addQuery('name',current.cat_item); with catname.addQuery('sys_id',current.cat_item);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 11:03 AM
Hello Radek,
Updated code below.
var catname = new GlideRecord('sc_cat_item');
catname.addQuery('sys_id', current.cat_item);
catname.query();
var catalogname = '';
while (catname.next()) {
// store cat name
catalogname = catname.name;
}
- Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 11:03 AM
Hello Radek,
Updated code below.
var catname = new GlideRecord('sc_cat_item');
catname.addQuery('sys_id', current.cat_item);
catname.query();
var catalogname = '';
while (catname.next()) {
// store cat name
catalogname = catname.name;
}
- Pradeep Sharma