- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 08:32 AM
I have a catalog item that contains a list collector that i will use to populate the description field of a catalog task.
When i use this variable, the sysID of the server selected is populated instead of the displayName
If i try to drill down into the variable and select the name (pulling from the cmdb_ci_server) table, it shows blank on the task.
I've set the display field on the table to be the name but it still shows the sysID.
What should be the correct way in getting the displayName for these?
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 08:42 AM
Hi
a list collector field is just a String field with a comma-separated list of Sys IDs.
If you need the display names you have to iterate over the Sys IDs and lookup the relating records.
See the following article if you want to know how to build that: https://community.servicenow.com/community?id=community_blog&sys_id=e244e902dbcc2010fb4ae15b8a9619c3
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 08:42 AM
Hi
a list collector field is just a String field with a comma-separated list of Sys IDs.
If you need the display names you have to iterate over the Sys IDs and lookup the relating records.
See the following article if you want to know how to build that: https://community.servicenow.com/community?id=community_blog&sys_id=e244e902dbcc2010fb4ae15b8a9619c3
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 09:39 AM
Thanks for the reply and pointing me to that blog post!
Looks like i'm having issues others were having in that article where it's not properly moving over to an array.object - stuck as a string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2022 11:47 AM
I have found you can use the getDisplayValue() method to return the display name for the record(s) chosen in the list collector variable.
*** Script: d554f530878bc150e23b52883cbb350d,e3643d30878bc150e23b52883cbb355f
*** Script: group1, group2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 01:34 PM
thanks!