- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 08:53 PM
We have an issue where in the fields are showing sys_ids instead of String value after the incident are closed.
The value are showing as sys_ids for the users who are not admins.
However, for Admins as well the list view also shows the sys_id and if you look in the individual form as an Admin it will show you the string values in the field.
Any suggestion?
Solved! Go to Solution.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2014 03:37 PM
Hi Vikrant,
If the tables containing the Business-service and Department records are not regularly erased and reimported, there should be no problem creating reference choice lists that point to them. However, if you don't need to source other data from those tables (via related fields etc), and it's simply the display value that you wish to retain/show on your Incident form, you could revert back to the String Choice field type, and populate the field with choices when the form loads. I've done this before using a combination of onDisplay Business Rule, g_scratchpad object, and an onLoad client script.
The basic idea is to use the onDisplay Business Rule to run a glide record query on the table you are sourcing the values from (e.g Department), then collect the display values from these records into an array. Attach the array to the g_scratchpad object so that it becomes accessible by client scripts when the form has loaded. Then add an onLoad client script which reads the array from the g_scratchpad object and "adds" the choices to the "Department" choice list field on the incident form using g_form.addOption(). The advantage to doing this is that your choices will always remain up to date with the source table data, however the values stored in the Incident ticket will remain string values (not sys_ids etc).
See the following links from the ServiceNow Wiki for more information:
GlideForm_(g_form) - addOption()
Regards,
Jake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 10:12 PM
2 things that i have at the top of my mind:-
Check if the Records have not been deleted for which the sys ids is getting displayed, OR
See if you used setDisplayValue somewhere.
Thanks,
Subhajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 11:20 PM
Check whether in "personalized directory" of that field, whether you have selected 'Display' option.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2014 10:19 PM
Hi Vikrant,
Are these the same two fields in both screen captures? In the "Admin" view they are shown as Choice Lists. In the "non-Admin" view, the fields appear as read only string fields. If these were normal choice lists (populated from the sys_choice table), they should never show sys_ids as ServiceNow doesn't store these values in the html, nor in the field upon save. Reference fields on the other hand, if configured to display as "choice lists" (instead of the string field with autocompleter etc), will store the sys_id in the html and the field upon saving.
If these are reference fields configured as choice fields, and the "Info" icons have been removed using DOM/CS, that would make more sense. In that case, the sys_id's would likely be shown because of an ACL issue. For example, if the field marked for "Display" on the target table, happens to have a read rule on it which prevents the non-admin users from seeing that field value. ServiceNow would therefore show the record as if no field had been marked as "Display". In that case it would show the sys_id. To test this, go to the target table and add a read rule without any restrictions. Then try viewing the record again as a non-Admin user.
Regards,
Jake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2014 01:57 AM
Hi Jake, You are right these are reference fields configured as Choice list.
And there is a right ACL that is causing issues for non-admins only when the incident is "closed" as they don't have the right to wright on the fields. I remove that ACL it works.
However, for admins as well if I go to Incidents -> Open Incidents and look at the incidents in the list view of open incidents and add one of the filed. It shows sys_ids as well.
Could you please suggest if there is any solutions to this or would we have to revert back to choice list it self?