- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2022 12:45 AM
In Catalog item, i have a variable with type Reference field to 'cmn_location' table, The variable is in Variable Set using in multiple catalog items. Specific to my catalog item i need to hide the certain locations by Name ,while loading of catalog item.
Reference Qualifier is not a Preferable solution as variable is using in multiple catalog item
How can achieve this by scripting?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 10:56 AM
Hi,
You can use advanced reference qualifier like below and make script include call.
javascript: new scriptIncludeName().myFunctionName(current.cat_item)
In script include check if it is your catalog item and return query as per your requirement.
var scriptIncludeName= Class.create();
scriptIncludeName.prototype = {
initialize: function() {
},
myFunctionName: function(catItem) {
if (catItem == '<sys_id of your catalog item>') {
return 'nameNOT LIKEsouth';
} else {
return '';
}
},
type: 'scriptIncludeName'
};
If it is your catalog item then return the encoded query else return nothing to show all records.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 10:56 AM
Hi,
You can use advanced reference qualifier like below and make script include call.
javascript: new scriptIncludeName().myFunctionName(current.cat_item)
In script include check if it is your catalog item and return query as per your requirement.
var scriptIncludeName= Class.create();
scriptIncludeName.prototype = {
initialize: function() {
},
myFunctionName: function(catItem) {
if (catItem == '<sys_id of your catalog item>') {
return 'nameNOT LIKEsouth';
} else {
return '';
}
},
type: 'scriptIncludeName'
};
If it is your catalog item then return the encoded query else return nothing to show all records.
Thanks,
Anil Lande
Thanks
Anil Lande