TDFilter object
Create a filtered list of field objects without SQL.
You get a TDFilter object from the Filter property of any factory object except ReqFactory.
Public methods
This object supports the following methods.
Method | Description |
---|---|
Clear |
Clears the current filter. Syntax: |
GetXFilter |
Gets the cross filter specified by CrossEntities. Syntax: Parameters:
Return: The text representation of the filter. |
IsClear |
Checks whether the filter is cleared. Syntax: |
NewList |
Creates a new list from current filter. Syntax: If you call NewList more than once on the same filter, no actual server request is made. NewList returns cached data. To retrieve data that may have changed, either dispose of the filter and create a new one, or call Refresh before calling NewList. |
Refresh |
Reads saved data and refreshes the fetched list according to the current filter, overwriting any changes made to the values in the list in memory. Syntax: |
SetXFilter |
Sets the filter for second entity, called a cross filter. Syntax: Parameters:
|
Public properties
This object supports the following properties.
Property | R/W | Type | Description |
---|---|---|---|
DataType |
R | String |
The filtered entity type. |
Fields |
R | List |
The value of the specified field. The list depends on the factory from which the TDFilter was created. For example, if the filter is created from a TestFactory object, the field list consists of the names of the test fields |
Filter |
R/W | String |
The filter condition for the field specified by the field name. Syntax: Parameters:
|
Order |
R/W | Number |
The position of the specified field in the list of the sort fields. (zero-based). Syntax: Parameters:
When the order of one field is set with this property, no adjustments are made to the positions of other fields. The application is responsible for ensuring that the orders of all the fields are as required, that no two fields occupy the same position, and there are no empty positions. When two or more fields are assigned the same order, the actual order is undetermined. |
OrderDirection |
R/W | Number |
The sort order: TDOLE_ASCENDING or TDOLE_DESCENDING. Syntax: Parameters:
|
R/W | String |
The full fields filter as text. In most places where a string-type Filter argument is passed to a method that selects items, for example to create a filtered list, it is this Text property that is passed to the method. |
|
XFilter | R/W | String | The cross filter according to the entity type. |
Example