SQL Object
 
Syntax
 
SQL.SearchDialog(LevelMode[, MySearch][, IncludeExtraWork][, IncludeHistory][, StatusFilter][, AutoCreateProject])
 
Description
High-level function that greatly simplifies searching for entities in the orderchain at multiple levels, using the dialog within the Tradium applications.
 
This function is optimized for querying complex search queries; The search power is comparable to that of well-known search engines on the Internet. For an explanation of the search capabilities, see the explanation in the general guide.
 
Parameter
Description
LevelMode
Search type, level:
1 = Clients,
2 = Projects,
3 = Sales orders,
4 = Packing lists
MySearch
Optional. Contains one or more search entries separated by spaces. If not specified, the search window appears, as used in the applications in Tradium.
IncludeExtraWork
Optional. If TRUE, all work orders listed as additional work (or standard sales orders) are included in the search.
Default value: TRUE
IncludeHistory
Optional. If TRUE, projects and work orders with status 'H' (historical) are included in the search.
CAUTION: Also, when searching directly for a project or work order number while this filter is FALSE, this function does not return a result if the project is historical.
Default value: FALSE
StatusFilter
Optional. Allows a search to be refined by specifying a specific status.
AutoCreateProject
Optional. If TRUE, a new project is automatically created during the search, if necessary. This is the case if no previous orders exist for a customer.
Default value: FALSE
 
See Also
other SQL.Searchxxxxxxxx functions
Example
 
Sub Main
 
   Dim sZoek As String
 
   sZoek = InputBox$("Keywords for sales order:")
   If Len(sZoek) = 0 Then End
 
   Debug.Print SQL.SearchDialog(3, sZoek)
 
End Sub