Get the Diaplay names of LIST Collector Field instead of sys_id

Cindy Sim
Tera Expert

Hello Everyone:

I am Trying to get Display Value of List collector field from catalog item instead of sysID in sc_item_option. All the other types of variables are showing the displayname except list collector. Could anyone help me with this?

3 REPLIES 3

Runjay Patel
Giga Sage

Hi @Cindy Sim ,

 

As list collector is multi type selection reference field so its store sys id of the record in back end but using script you can get it.

where you want this value as name instead of sys id?

The question for anyone is, what table are those sys_ids valid in?  I am trying to query these records from the rest api.  Because the value field can hold a coma separated list of sys_ids and not links, I do not know what table to check.  I can tell you the list collector allows the selection of cmdb_ci_server items but the sys_id is not valid in that table, so I have to assume there is a junction table in play?  I am not an admin of our servicenow environment, I am a developer that has been given permissions to query tables.

In order to identify the table you would need to view the List Collector Field configuration. Base on what you said the table would be cmdb_ci_server and there should not be a junction table in play, the sys_ids should be valid directly on that table.

If you determine that cmbd_ci_server is the correct table then its likely security policies on that table that are restricting you from retrieving the record. ServiceNow APIs do not generally provide specifics when your request is blocked by security policies you may either get No Results Returned or an HTTP 403 (Forbidden) response depending on the specific API you are using.

If you do not have access to review the configuration and security policies of the table you are trying to query then you will need to get help from someone that does. First verify the table associated with the list collector field and then verify that the security policies associated with the table allow you access.

ServiceNow has a lot of RESTful APIs so to help further would require knowing exactly which API you are using and likely the actual request you are sending.