- 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 10:31 AM
Since you are adding RITMs to the Hardware table, not vice-versa, you want to show RITMs were the CI field is populated with the CI related to the Asset being displayed, unless you have some other RITM to asset relationship defined:
current.addQuery('cmdb_ci', parent.ci);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 11:07 AM
Hi Brad,
Thanks for taking the time to offer advice,
In many cases the Asset will not have a CI (ex. Monitor), so I don't think that approach will work for me.
Also, I tried the above code but I still see all RITMs in system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 11:33 AM
What field on an RITM is populated that associates it with a particular asset?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 11:57 AM
Thanks for asking, the request_line field on Asset table.