Easy way to create a List report and include the sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2013 08:40 AM
Hi all,
I'm trying to create a simple List report on cmdb_ci_server with about 10 fields but want the report to include the record's sys_id (the report will probably be updated offline and I want a clear way to track back to the correct record).
I know I could create a database view to accomplish this but wondered if there was an easier way.
Still using Berlin.
Streve
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2013 08:36 PM
One other relatively easy way to accomplish this is to create a single-table database view using the table where you need to show the sys_id. A table included in a database view exposes the sys_id as a regular column that can be added as a report column, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2013 02:35 AM
Mark and Geoff. Thanks for both of your solutions. It's great to learn from your experience. Much appreciated, and I didn't even as the original question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2013 06:31 AM
I did the following:
Added a new string field: sys_id_display
Edited the dictionary value for the new field.
Calculated: True
Calculation: current.sys_id
Now I can add the sys_id_display column to my list view. Seems to work great. I don't have to update any records, or worry about business rules that may not get executed.
I would think that using a calculation field would almost always be preferred over using a business rule to replicate data into a separate field. There may be a slight performance impact, but you never have to worry about data that has gotten out of sync.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2013 08:22 AM
I like the idea of the calculated field because it doesn't require me to go back and populate the historic values - although I wonder about the performance impact given that the sys_id will never change it seems redundant to recalculate it on every read...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2013 08:35 AM
If the table is a high activity one (lots of reads), calculated fields are the devil. But if the calculation only uses a field from the same table (which sounds like the case here), it might not be too bad.
If the calculation dot-walks through reference fields to get values from a referenced record, that's where you start seeing issues sometimes.