Configuring the Hardware Asset form and need the Computer fields

clyon
Tera Guru

I'm trying to add the cmdb_ci_computer fields (CPU like fields) to the Hardware Assets form. I see in the schema map that they are referenced field via the cmdb_ci_server. When I go to configure the form I have been unable to find those referenced fields.  Where can i fund these?

6 REPLIES 6

clyon
Tera Guru

find_real_file.png


Community Alums
Not applicable

Hi Christina,



At the risk of answering your question with another question: What is your use case here to display the CPU information on the Asset record? The reason I ask is that this can get a little tricky, and I am trying to understand the value of doing this.



Let me explain why this can be tricky:


The Asset record references its associated CI through the cmdb_ci table. This means that any CI attributes you want to display need to be at that level of the hierarchy. If they are lower, then you will not be able to see them to pull up. I've only seen "hacky" style workarounds to get data from fields that are lower in the hierarchy, and with the complex structure of the CMDB, this can get pretty ugly really quickly.



I would only look to do this if there is a really important business case. Alternately, you could look to have the information you need on the view that displays when you hover over the CI reference icon instead of having it display on the form.



Ben


Hello Christina,



What version are you on? I am looking at an Istanbul version OOB and from the sys_dictionary table I have built a filter where table name is alm_hardware and I only see two fields. In order for this to work you would need to have a reference field on alm_hardware that references the cmdb_ci_server table. This would then allow you to dot walk to any field on the cmdb_ci_server table and you would then be able to add dot walk fields on a form. Keep in mind that this can result in some performance issues as dot walking will constitute a table join. Additionally, we have seen issues around utilizing dot walk fields on a form where updating a field can result in actually updating a record in the referenced table.



Additionally I looked at the schema in an OOB and I don't see any relationship between alm_hardware and cmdb_ci_computer. The alm_hardware is a child table extended from a table called alm_asset which is a stand alone parent. OOB you wont be able to accomplish but you will be able to by customizing and then adding a reference field on alm_hardware which references cmdb_ci_computer. Hope this helps.



Sr. Technial


Community Alums
Not applicable

This is exactly why I describe the workaround to feel a bit "hacky." You need to create a new reference fields. Ideally, you would want to hide the new reference field you create and automatically copy the sys_id from the Configuration Item field to it so you do not need to maintain extra data. The problem is this: What happens if you later decide you need to display information only found in cmdb_ci_server? Are you going to do this again?