- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 09:14 PM
Hi Team ,
In the change _task table , CI is the reference qualifier and advanced reference qualifier this script is written javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()
but i am not able to understand the script , anyone help me.to debug the script
Thanks ,
Chandan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 10:47 PM
see if the reference qualifier is satisfying or not.
Also check if any dictionary override is added for change_task and has some additional filter on CI field.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 09:44 PM
it clearly says it will show CI on inc/prb based on the operational_status field
what's your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 10:01 PM
@Ankur Bawiskar one of the user created change request and after passing the steps these ctask generated automatically , in that two ctask CI name is not populating for the parent one or we are not able to select the parent CI also .
Thanks and Regards,
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 10:47 PM
see if the reference qualifier is satisfying or not.
Also check if any dictionary override is added for change_task and has some additional filter on CI field.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 09:57 PM
Hi Chandan,
Let me help clarify the script used in the advanced reference qualifier:
javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1 ? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()
Explanation:
• ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1
• This checks if the current record’s class name is not incident or problem.
• If it’s not in the list, it returns -1.
• If the condition is true (== -1), the script returns an empty string — meaning no filter is applied.
• If the condition is false (i.e., the current class is incident or problem), it applies a filter:
• 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()
• This constructs a dynamic filter that excludes certain operational_status values, using a custom filter utility (OpsStatusFilter) specifically for CreateTask context.
In Summary:
• If the task belongs to incident or problem, it applies a filter to exclude certain CI statuses.
• Otherwise, it does not restrict the CI field.
Thanks,
Sindhu