filter the configuration item based on the environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 01:26 AM
When the environment is chose as prod. It should not display list of configuration item were its evironment is development, others should be show.
to give in variable the filter it has predefined configuration which will be conflicted.
Please let me how to proceed with this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 07:06 AM
then do this in ref qualifier of that dictionary override
Give correct field name and choice value from CHG table.
javascript: var query = ''; if(current.fieldName == 'production') query = 'environment!=Production'; query;
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-17-2025 07:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 07:42 AM
do you want to append the previous filter along with this one?
if yes then do this, please enhance as per your requirement
javascript: var query = ''; if(current.u_environment == 'production') query = new TaskUtils().getConfigurationItemFilter(current) + '^environment!=Development'; query;
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-17-2025 08:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 07:34 PM
It should work fine.
You cannot apply filter via client script, you can just validate and throw error.
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