How to differentiate homonyms
Prerequisite: You must be familiar with the Syntax used in Tutorials and have already created an extension.
The iTop 3.0 brings new capabilities to differentiate homonyms,
when editing an external key to a remote object.
If you are in read mode, just seeing the object friendlyname,
then from iTop 3.1, you can add a summary card to
address the same objective
It must be specified in XML on the class for which you want
other attributes than the friendlyname to be displayed when
selecting them in a drop-down list.
Here is an example of what can be done on the Person class and how
it is displayed:
Now that you have seen the layout, here is how it can be done in
XML:
Notice that there are more lines than needed for the
modification, but this is to show what can be modified in iTop 3.0
datamodel
- itop-design / classes / class@Person
-
<properties> <naming> <attributes> <attribute id="first_name"/> <attribute id="name"/> </attributes> <complementary_attributes _delta="force"> <attribute id="email"/> <attribute id="org_name"/> </complementary_attributes> </naming> <fields_semantic> <image_attribute>picture</image_attribute> <main_color/><!-- Main color for the class in css format.--> <complementary_color/> </fields_semantic> <style> <icon>../../images/icons/icons8-person-female.svg</icon> </style> <...>
Note that using the field org_id
does display a
number, rather useless for iTop users, so better specify
org_name
which is human readable.
It's possible to specify with a dictionary entry a format for the complementary fields, like this:
- itop-design
-
<dictionaries> <dictionary id="EN US" _delta="must_exist"> <entries> <entry id="Class:Person/ComplementaryName" _delta="force"><![CDATA[%1$s - (%2$s)]]></entry> </entries> </dictionary> </dictionaries>