- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 06:29 AM
I need some help with a requirement in ServiceNow. I've created a List Collector with options like "Prod", "QA", and "Test". Here's what I'm trying to achieve:
- If multiple fields are selected in the List Collector (e.g., "Prod" and "QA"),
- I want to display the configuration item in the Service Catalog based on the first selected field.
For example, if "Prod" is the first selected field, then in sccatalog task in configuration item should display something based on sysId = 'aehhfh'.
i have written this script in configuration item
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 02:12 AM
Hope you are doing good.
Did my reply answer 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
05-19-2025 06:32 AM
something like this, please enhance
var selectedFields = fd_data.trigger.request_item.variables.list_collector.toString().split(',');
if (selectedFields.indexOf('ProdSysIdhere') > -1) {
return 'ciSysId1';
} else if (selectedFields.indexOf('QAsysIdhere') > -1) {
return 'ciSysId2';
}
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
05-20-2025 02:12 AM
Hope you are doing good.
Did my reply answer 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