Home Documentation Download License Contact

Search Class

The search class holds properties for searching and exporting and has some methods to return property data in a different format.
It is used in the interfaces M4.DataAdapter.ISearchReader and M4.ApplicationModel.IExportAdapter.

Properties AccessModelNode M4.ApplicationModel.AccessModelNode
AccessModelNode attached to search with properties for search permissions, result fields, child nodes, table- and column names and more.

SearchParameters M4.ApplicationModel.SearchParameterFields
Parameters to use in search with properties for table- and column names, data types and default values.

ResultType M4.ApplicationModel.SearchResultType
Values of ResultType are EmployList to get a list of records to choose one for editing or Export to get data for export.

RefreshOnly Boolean
True if search was already done and only called to refresh data. In this case you can reuse DBCommand if your search reader has set it.

DBCommand M4.DBInterface.DBCommand
DBCommand used for search. Can be set by search reader to reuse it on refresh.

WasOneByOneSearch Boolean
Set to true if search is configured to return only one record even if several records are found. If true, default components offer a "Next Record" button, although only one record was returned. A button press calls a new search.
Use this option if you want a group of users to go through a given set of records, opening each record once. Set a flag on opening to avoid, that an already opened record is found again.

UseOrForSearchParameters Boolean
If true you should combine parameters in WHERE section of command text using OR.
Can be set in AccessModelNode. Is always true if search is triggered by incoming call using to search for incoming number.

OrderByFields SortedList(Of Integer, String)
Sorted list of field names used for ORDER BY.

ResultFields M4.ApplicationModel.AccessFields
Used by default components to display result list. Result DataTable
DataTable to be populated with search result by search reader.

DefaultResultFieldHeaders Dictionary(Of String, M4.ApplicationModel.DataField)
Get default headers from ResultFields calling GetDefaultResultFieldHeader for each result field and GetDefaultSelectionFieldHeader for each selection field attached to result field.
Used by CSVExportAdapter.
Methods GetDefaultResultFieldHeader(M4.ApplicationModel.AccessField) String
Get default header for result field.

GetDefaultSelectionFieldHeader(String, M4.ApplicationModel.SelectionField) String
Combines default selection field header with result field header. Format: resultFieldHeader selectionField.Header.