Displaying custom attributes
The BMC Helix Discovery data model allows additional attributes to be added to nodes. You should only ever add additional attributes to inferred nodes. You must never update DDD nodes.
Attributes might be added by patterns at any point in time. It is strongly recommended that you add attributes at creation time when building your own inferred nodes. Inferred nodes that were created by the system must be modified using a separate pattern.
Once you have modified the node it is necessary to make the attribute visible. Do this by using model.addDisplayAttribute
To display the custom attribute on the node view using model.addDisplayAttribute
You can add the newly created attribute, or list of attributes, to those displayed on the node page using the model.addDisplayAttribute function. For example, to display the server_name attribute, use the following:
if si.server_name then
      model.addDisplayAttribute(si, "server_name");
end if;
Similarly, to display the attribute list list_attrs, use the following:
      list_attrs :=[]; // list of attribute names
      if si.port then
         list.append(list_attrs, "port");
      end if;
      if si.server_name then
         list.append(list_attrs, "server_name");
      end if;
   model.addDisplayAttribute(si, list_attrs); 
To remove the custom attribute from the node view
You can remove attributes that you have created, or a list of attributes that you have created, from those displayed on the node page using the model.removeDisplayAttribute function. For example, to remove the server_nameattribute, use the following:
model.removeDisplayAttribute(si, "server_name");
Similarly, to remove the attribute list list_attrs, use the following:
model.removeDisplayAttribute(si, list_attrs);
