- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 08:20 AM
Incident Management Form:
How to create a reference qualifier for CI to filter only CIs that assigned to caller.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 09:00 AM
Hi Jesus,
You just need to reference current.caller_id in your reference qualifier or- even better- write a Script Include to do it. Here are a few references:
Dynamic Reference Qualifier for KB articles
Reference Qualifiers - ServiceNow Wiki
Use Reference Qualifier to filter Location field
Best practice is to use a Script Include that refers to the "current" record and returns the string for the condition. Soemthing like this:
var ReferenceQualifiersCI = Class.create();
ReferenceQualifiersCI.prototype = {
initialize: function() {
},
forCurrentCaller:function() {
var caller = current.caller_id + '';
//just ones assigned to this caller
return 'assigned_to=' + caller;
},
type: 'ReferenceQualifiersCI'
};
You would then use a javascript: reference qualifier as described earlier:
javascript:new ReferenceQualifiersCI().forCurrentCaller();
That should return a string like:
assigned_to=e7iru4723je38rr721l908fnfr823hd3
Where the sys_id of the caller on the current incident is "e7iru4723je38rr721l908fnfr823hd3".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 08:43 AM
You can add a reference qualifier that is Assigned To is 'javascript:gs.getUserID()' in the Dictionary on the Configuration Item field.
Since the Configuration Item field sits at the base Task table, you may want to do this as a dictionary override instead that is only for incidents. Filtering it in the dictionary override you can use: assigned_to=javascript:gs.getUserID();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 08:47 AM
Thanks for your help David.
javascript:gs.getUserID(); this is the user logged in the system. I am looking to get the value of the caller_id field in the incident form. Basically service desk agent enter caller name, based on the caller name, I want to filter only those CIs that are associated to this caller.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 08:57 AM
Sorry about that. I misread your question. For matching the Caller you should be able to use: javascript:'assigned_to=' + current.caller_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2015 09:00 AM
Hi Jesus,
You just need to reference current.caller_id in your reference qualifier or- even better- write a Script Include to do it. Here are a few references:
Dynamic Reference Qualifier for KB articles
Reference Qualifiers - ServiceNow Wiki
Use Reference Qualifier to filter Location field
Best practice is to use a Script Include that refers to the "current" record and returns the string for the condition. Soemthing like this:
var ReferenceQualifiersCI = Class.create();
ReferenceQualifiersCI.prototype = {
initialize: function() {
},
forCurrentCaller:function() {
var caller = current.caller_id + '';
//just ones assigned to this caller
return 'assigned_to=' + caller;
},
type: 'ReferenceQualifiersCI'
};
You would then use a javascript: reference qualifier as described earlier:
javascript:new ReferenceQualifiersCI().forCurrentCaller();
That should return a string like:
assigned_to=e7iru4723je38rr721l908fnfr823hd3
Where the sys_id of the caller on the current incident is "e7iru4723je38rr721l908fnfr823hd3".