I have a new class lnkPersonToSoftware where I have an array:
<fieldid="software_id"xsi:type="AttributeExternalKey"><sql>software_id</sql><target_class>Software</target_class><filter><![CDATA[SELECT Software WHERE type = 'othersoftware' AND status = 'production']]></filter><dependencies><attributeid="org_id"/></dependencies><is_null_allowed>false</is_null_allowed><on_target_delete>DEL_AUTO</on_target_delete></field>
<fieldid="person_id"xsi:type="AttributeExternalKey"><sql>person_id</sql><target_class>Person</target_class><filter><![CDATA[SELECT Person WHERE typecontact = '14193' AND status = 'active']]></filter><dependencies><attributeid="org_id"/></dependencies><is_null_allowed>false</is_null_allowed><on_target_delete>DEL_AUTO</on_target_delete></field>
Hi Vasek,
There is no filtering available in XML on "AttributeLinkedSetIndirect" in iTop 2.7
A <filter> XML tag was brought by 3.1 and is used only in the mode where the AttributeLinkedSetIndirect is displayed as "property"</filter>
In 2.7, the only way to define a filter on AttributeLinkedSetIndirect, is to create a PrefillSearchForm method.
In your example, the filter defined on the ExternalKey will be used by iTop 3.1, when adding a relation in pop-up from the Person or the Software in view mode.
It is also used by iTop 2.7 if you create directly a new lnkPersonToSoftware object, which nearly no-one does.
Those ExternalKey filters cannot be automatically reversed to build a filter on AttributeLinkedSetIndirect side. We have tried to do it and we end-up to the conclusion, that it is just not logically possible to guess it.
As a side note your ExternalKey fields dependency on "org_id" does not make sense, as your filter do not take into account the "org_id" field
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey. Hey. I have the same problem as was in the thread here:
https://sourceforge.net/p/itop/discussion/customizing-itop/thread/cf6026f8/?limit=25#b0de
I have a new class lnkPersonToSoftware where I have an array:
and then in the Software class:
and then in the Person class:
But OQL filter above doesn't work. I've iTOP version 2.7.9.
Any advice please?
Thank you.
Hi Vasek,
There is no filtering available in XML on "AttributeLinkedSetIndirect" in iTop 2.7
A <filter> XML tag was brought by 3.1 and is used only in the mode where the AttributeLinkedSetIndirect is displayed as "property"</filter>
In 2.7, the only way to define a filter on AttributeLinkedSetIndirect, is to create a PrefillSearchForm method.
In your example, the filter defined on the ExternalKey will be used by iTop 3.1, when adding a relation in pop-up from the Person or the Software in view mode.
It is also used by iTop 2.7 if you create directly a new lnkPersonToSoftware object, which nearly no-one does.
Those ExternalKey filters cannot be automatically reversed to build a filter on AttributeLinkedSetIndirect side. We have tried to do it and we end-up to the conclusion, that it is just not logically possible to guess it.
As a side note your ExternalKey fields dependency on "org_id" does not make sense, as your filter do not take into account the "org_id" field
Thank you Vincent. I will think about the new version of itop.