- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 10:15 AM
Howdy Community,
`Trying to create a relationship & related list.
I want to add a related list of RITMs to the Hardware table.
(then display the related catalog item name)
Applies to table alm_asset
(actually my table is alm_hardware but the Request Line field is on alm_asset)
Queries from table sc_req_item
I have tried current.addQuery('request_item',parent.sys_id); and like variations but nothing seemed particularly logical for what I am trying to achieve.
My current results is all RITMs in system being displayed in tab per asset.
Any idea what my Query with would be?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:24 PM
Relying on the out of the box Request line field on the alm_asset table, you could have one RITM associated with many assets, but not one asset to many RITMs. To do this you would need to add an asset column to the sc_req_item table, much like the existing configuration_item column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:08 PM
That is a field on an asset that associates it with one RITM. If you don't have a way for multiple RITMs to be associated with an asset, such as they can be OOTB with a CI, and just want your related list to only ever show one record - which is not the best use of a related list, but...
current.addQuery('sys_id', parent.request_line);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:18 PM
Yes, I understand I will have a one (asset) to many (RITMs) relationship. Is this possible with scripting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:24 PM
Relying on the out of the box Request line field on the alm_asset table, you could have one RITM associated with many assets, but not one asset to many RITMs. To do this you would need to add an asset column to the sc_req_item table, much like the existing configuration_item column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:28 PM
Thanks Brad, that is the path I will take.