- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 01:17 AM
Hii everyone,
We need to show an extra/additional option to a List Collector variable in an HR case form (variable's in separate section, not on HR case form), but only for a specific HR case record. The List Collector pulls options from another table using type specifications and a reference qualifier. We've implemented a script include in the ref qualifier at the variable end to handle this, but it's always hitting the 'else' condition instead of 'if'. Any suggestions to fix this would be appreciated!
Reference qualifier script at the variable:
javascript:new ScriptIncludeName().functionName(current)
Script Include:
functionName: function(current){
var answer = '';
var optSysID = [];
var optGr = new GlideRecord('table_from_which_options_are_referred');
if(current.sys == 'sys_id_of_a_certain_hr_case'){
optGr.addEncodedQuery('query1');
}
else{
optGr.addEncodedQuery('query2');
}
optGr.query();
while(optGr.next()){
optSysID.push(optGr.sys_id.toString);
}
answer = 'sys_idIN' + optSysID;
return answer;
If there is any modification is required or if there is any other approach, please let me know.
Thanks,
Srinath
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 02:51 AM
I updated the corresponding record in question_answer table with the additional option's Sys ID so that the additional option is in the Selected slush bucket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 02:51 AM
I updated the corresponding record in question_answer table with the additional option's Sys ID so that the additional option is in the Selected slush bucket.