good afternoon. I'm trying to add a corpus field. with the ability to select a device from the list and not to enter text by hand. but the field does not appear. edit file C:\inetpub\wwwroot\web\extensions\datamodel-module\datamodel.datamodel-module.xml. no experience with itop.
<classid="PC"><properties><naming><attributes_delta="redefine"><attributeid="name_id"/><attributeid="name"/></attributes></naming></properties><fields><fieldid="printer_list"xsi:type="AttributeLinkedSetIndirect"_delta="define"><linked_class>lnkPrinterToPc</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode><ext_key_to_remote>printer_id</ext_key_to_remote></field><fieldid="peripheral_list"xsi:type="AttributeLinkedSetIndirect"_delta="define"><linked_class>lnkPeripheralToPc</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode><ext_key_to_remote>peripheral_id</ext_key_to_remote></field><fieldid="monitor_list"xsi:type="AttributeLinkedSet"_delta="define"><linked_class>Monitor</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode></field><fieldid="oslicence_id"xsi:type="AttributeExternalKey"_delta="define"><filter><![CDATA[SELECT OSLicence WHERE osversion_id = :this->osversion_id]]></filter><dependencies><attributeid="osversion_id"/></dependencies><sql>oslicence_id</sql><target_class>OSLicence</target_class><is_null_allowed>true</is_null_allowed><on_target_delete>DEL_MANUAL</on_target_delete></field><fieldid="mb"xsi:type="AttributeString"_delta="define"><sql>mb</sql><default_value/><is_null_allowed>true</is_null_allowed></field><fieldid="korpus"xsi:type="AttributeExternalKey"_delta="define"><linked_class>PhysicalDevice</linked_class><sql>korpus</sql><edit_mode>add_remove</edit_mode><default_value/><is_null_allowed>true</is_null_allowed><on_target_delete>DEL_AUTO</on_target_delete></field>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you add fields to a class, you also need to add it to the "details" presentation so it will be displayed when you open the object. Check this page and this one.
Hope it helps,
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for responding. Here is the whole PC code. What's wrong? And if i look at the schema of the MySQL database, i can't see the additional “korpus”
<classid="PC"><properties><naming><attributes_delta="redefine"><attributeid="name_id"/><attributeid="name"/></attributes></naming></properties><fields><fieldid="printer_list"xsi:type="AttributeLinkedSetIndirect"_delta="define"><linked_class>lnkPrinterToPc</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode><ext_key_to_remote>printer_id</ext_key_to_remote></field><fieldid="peripheral_list"xsi:type="AttributeLinkedSetIndirect"_delta="define"><linked_class>lnkPeripheralToPc</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode><ext_key_to_remote>peripheral_id</ext_key_to_remote></field><fieldid="monitor_list"xsi:type="AttributeLinkedSet"_delta="define"><linked_class>Monitor</linked_class><ext_key_to_me>pc_id</ext_key_to_me><edit_mode>add_remove</edit_mode></field><fieldid="oslicence_id"xsi:type="AttributeExternalKey"_delta="define"><filter><![CDATA[SELECT OSLicence WHERE osversion_id = :this->osversion_id]]></filter><dependencies><attributeid="osversion_id"/></dependencies><sql>oslicence_id</sql><target_class>OSLicence</target_class><is_null_allowed>true</is_null_allowed><on_target_delete>DEL_MANUAL</on_target_delete></field><fieldid="mb"xsi:type="AttributeString"_delta="define"><sql>mb</sql><default_value/><is_null_allowed>true</is_null_allowed></field><fieldid="korpus"xsi:type="AttributeExternalKey"_delta="define"><filter><![CDATA[SELECT PC WHERE korpus = :this->korpus]]></filter><dependencies><attributeid="korpus"/></dependencies><linked_class>FunctionalCI</linked_class><sql>korpus</sql><edit_mode>add_remove</edit_mode><default_value/><is_null_allowed>true</is_null_allowed><on_target_delete>DEL_AUTO</on_target_delete></field><fieldid="video"xsi:type="AttributeString"_delta="define"><sql>video</sql><default_value/><is_null_allowed>true</is_null_allowed></field><fieldid="hdd"xsi:type="AttributeString"_delta="define"><sql>hdd</sql><default_value/><is_null_allowed>true</is_null_allowed></field><fieldid="type"><default_value_delta="redefine">desktop</default_value></field></fields><presentation><details><items><itemid="monitor_list"_delta="define"><rank>62</rank></item><itemid="printer_list"_delta="define"><rank>64</rank></item><itemid="peripheral_list"_delta="define"><rank>66</rank></item><itemid="col:col1"><rank>80</rank><items><itemid="fieldset:Server:baseinfo"><rank>10</rank><items><itemid="name_id"_delta="define"><rank>12</rank></item><itemid="networkname"_delta="define"><rank>14</rank></item><itemid="buhname"_delta="define"><rank>16</rank></item><itemid="person_id"_delta="define"><rank>18</rank></item><itemid="category_id"_delta="define"><rank>45</rank></item><itemid="room_id"_delta="define"><rank>60</rank></item><itemid="user_id"_delta="define"><rank>61</rank></item><itemid="korpus"_delta="define"><rank>65</rank></item></items></item><itemid="fieldset:Server:moreinfo"><rank>20</rank><items><itemid="devicetype_id"_delta="define"><rank>53</rank></item><itemid="oslicence_id"_delta="define"><rank>55</rank></item><itemid="mb"_delta="define"><rank>62</rank></item><itemid="video"_delta="define"><rank>73</rank></item><itemid="hdd"_delta="define"><rank>75</rank></item><itemid="mc_number"_delta="define"><rank>100</rank></item></items></item></items></item><itemid="col:col2"><rank>90</rank><items><itemid="fieldset:Server:otherinfo"><rank>20</rank><items><itemid="approval"_delta="define"><rank>20</rank></item><itemid="position"_delta="define"><rank>30</rank></item><itemid="domen"_delta="define"><rank>40</rank></item><itemid="problem"_delta="define"><rank>50</rank></item></items></item></items></item></items></details><search><items><itemid="name_id"_delta="define"><rank>12</rank></item><itemid="networkname"_delta="define"><rank>14</rank></item><itemid="buhname"_delta="define"><rank>16</rank></item><itemid="person_id"_delta="define"><rank>18</rank></item><itemid="category_id"_delta="define"><rank>45</rank></item><itemid="room_id"_delta="define"><rank>55</rank></item><itemid="devicetype_id"_delta="define"><rank>85</rank></item><itemid="mc_number"_delta="define"><rank>105</rank></item></items></search><list><items><itemid="org_id"_delta="delete"></item><itemid="name_id"_delta="define"><rank>12</rank></item><itemid="buhname"_delta="define"><rank>14</rank></item><itemid="networkname"_delta="define"><rank>16</rank></item><itemid="business_criticity"_delta="delete"></item><itemid="category_id"_delta="define"><rank>35</rank></item><itemid="room_id"_delta="define"><rank>45</rank></item><itemid="asset_number"_delta="define"><rank>80</rank></item><itemid="mc_number"_delta="define"><rank>90</rank></item><itemid="problem"_delta="define"><rank>100</rank></item><itemid="korpus"_delta="define"><rank>110</rank></item></items></list></presentation></class>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
You said you edited edit file C:\inetpub\wwwroot\web\extensions\datamodel-module\datamodel.datamodel-module.xml
What do you mean exactly ??
This kind of modifications must be done in an iTop extension module, and installed by running the setup again.
See iTop Customization [iTop Documentation]
Note that all of this can be done with just a few clicks in the ITSM Designer which is accessible to all Combodo clients.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
good afternoon. I'm trying to add a corpus field. with the ability to select a device from the list and not to enter text by hand. but the field does not appear. edit file C:\inetpub\wwwroot\web\extensions\datamodel-module\datamodel.datamodel-module.xml. no experience with itop.
Hello modice,
When you add fields to a class, you also need to add it to the "details" presentation so it will be displayed when you open the object. Check this page and this one.
Hope it helps,
Guillaume
Thanks for responding. Here is the whole PC code. What's wrong? And if i look at the schema of the MySQL database, i can't see the additional “korpus”
The XML seems fine. Can you share the whole module? Did you select it during the setup?
Yes, I chose during setup. As far as I understand this is a stock module.
Hello,
You said you edited edit file C:\inetpub\wwwroot\web\extensions\datamodel-module\datamodel.datamodel-module.xml
What do you mean exactly ??
This kind of modifications must be done in an iTop extension module, and installed by running the setup again.
See iTop Customization [iTop Documentation]
Note that all of this can be done with just a few clicks in the ITSM Designer which is accessible to all Combodo clients.
The problem is that I didn't understand what I was doing.