Property type identifiers
By default, when you add an item type identifier to a Visual Query condition rule, the rule applies equally to conditions involving all property types of that item type. To apply the rule only to specific property types, you can add property type identifiers.
The PropertyTypeIds attribute allows you to specify which property types the rule affects. The identifiers that you use must be present in the i2 Analyze schema.
To help with later troubleshooting, you might also add the display name or a description of the property types into a comment about the rule.
Note: Property type identifiers can only be used in rules that specify an item type, and the property types must correspond to the specified item type.
For example, given the following property types in the example law enforcement schema:
<EntityType Id="ET5"
SemanticTypeId="guid8A586959-9837-47DE-8DBF-BC7031F01545"
Description="Person details"
DisplayName="Person"
Icon="Person (Shaded Shirt)">
...
<PropertyType Position="2"
Mandatory="false"
SemanticTypeId="guidFE45F1C4-B198-4111-8123-F42D2CD6419D"
DisplayName="Date of Birth"
Description=""
LogicalType="DATE"
Id="PER9">
<PossibleValues/>
</PropertyType>
<PropertyType Position="3"
Mandatory="false"
SemanticTypeId="guid7548369B-BA9A-4C4B-AEAD-0CB442EAFA27"
DisplayName="Gender"
Description=""
LogicalType="SUGGESTED_FROM"
Id="PER15">
<PossibleValues>
<PossibleValue Description="" Value="<Unknown>"/>
<PossibleValue Description="Male" Value="Male"/>
<PossibleValue Description="Female" Value="Female"/>
</PossibleValues>
</PropertyType>
...
</EntityType>
You might create the following rule in your configuration file:
<!-- Allow 'Person' searches to include conditions involving 'Date of birth' and 'Gender' that specify exact values or range -->
<Allow ItemTypeId="ET5" PropertyTypeIds="PER9, PER15" Operators="EQUAL_TO, BETWEEN"/>
Note: Because 'Gender' is a "suggested from" property type, there is no range of values for the BETWEEN operator to work with. Therefore, conditions that specify a range of values are enabled only for the 'Date of birth' property type.