TDFilter Object
Services for creation of a filtered list of field objects without SQL.

Get a TDFilter from the Filter property of any factory object except ReqFactory.

A HierarchyFilter is a filter that returns a HierarchySupportList containing the items that are children of a specified node and either match the filter or are ancestors of items that match the filter. If no node is specified, the returned HierarchySupportList contains the root of the entity's tree if any item in the project matches the filter. Get a HierarchyFilter with ReqFactory.Filter.

A filter cannot handle OR conditions between different fields nor sort on a user-defined field.

A filter always has a primary filter on an entity and may also have a secondary filter, or XFilter, on a second entity.

  • A filter without an XFilter specifies a list of the objects that meet all the criteria specified by setting the TDFilter.Filter or HierarchyFilter.Filter. A filter may have several Filter properties defined.
  • A filter with an XFilter specifies a list of all the objects of the first type that meet the Filter criteria, and that are associated with the objects of the second type that meet the criteria in the XFilter text. The XFilter text is set with the SetXFilter method or by setting the XFilter property.

For example, a TEST-TESTSET XFilter is a TDfilter derived from a Test factory. The first clause is created by setting the Filter to specify the desired tests. The XFilter is created by getting a second TDFilter from a TestSetFactory and setting the Filter property to specify the desired test sets. The text of this test set TDFilter is the XFilter text of primary test TDFilter.

The result is a list of tests that meet the TDFilter.Filter criteria and are associated with at least one of the test sets that meet the TDFilter.XFilter criteria.

The association between the entities can be direct, as in a links between requirements and defects, or it can be indirect. For example, TSTEST-REQ selects test instances (TSTEST) based on design tests (TEST) that cover requirements.


Implemented InterfaceDescription
_IDateConverter2TDFilter Internal functionality
_ISupportDataLimitAllows control of the amount of entities that will be retuned in a single NewList call
ISupportEntityTypesProvides services for entities that support entity types.
ISupportFetchLimitServices for creation of a filtered list of field objects without SQL.
Public Methods
Public Method ClearClears the current filter.
Public Method GetTypedFieldsThe list of fields for the given type.
Public Method GetXFilterGets the cross filter specified by CrossEntities.
Public Method IsClearChecks whether the filter is clear, including cross-filter settings.
Public Method IsFieldRelevantToTypeIndicates whether the field is used in this type.
Public Method IsFieldRequiredInTypeIndicates whether the field is required in this type.
Public Method NewListCreates a new list from current filter.
Public Method RefreshReads saved data and refreshes the fetched list according to the current filter, overwriting values in memory.
Public Method SetXFilterSets the filter for second entity, called a cross filter.
Public Properties
Public Property CaseSensitiveIndicates if the filter for the specified field is case sensitive. The default is False.
Public Property DataTypeThe filtered entity type.
Public Property FetchLimitMaximum number of results to return from server.
Public Property FieldsThe value of the specified field.
Public Property FilterThe filter condition for the field specified by the FieldName.
Public Property OrderThe position of the specified field in the list of the sort fields. (zero-based).
Public Property OrderDirectionThe sort order: TDOLE_ASCENDING or TDOLE_DESCENDING.
Public Property TextThe full fields filter as text.
Public Property XFilterThe cross filter according to the entity type.
See Also