ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Use conditions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Searches for a value in all the columns of the following controls:
  • Table control,
  • TreeView Table control,
  • WINDEV Table control displayed in a Combo Box control.
Example
// Click code of the Button control [Search]
nPos is int = TableSearchEverywhere(TABLE_Order, EDT_Search, searchContains)
// If found
IF nPos > 0 THEN
// Selects the row
TABLE_Order = nPos
END
Syntax
<Result> = TableSearchEverywhere(<Table control> , <Search element> [, <Type of search> [, <Start>]])
<Result>: Integer
  • Index of the element found,
  • -1 if the search failed.
The element found is not selected. To select the element found, use TableSelectPlus.
<Table control>: Control name
Name of the Table or TreeView Table control in which the search will be performed. The search is performed in all columns.
<Search element>: Type of search element
Value to search in all columns. The value is searched in visible text columns.
Remark: The search is not case sensitive, even in exact-match searches.
<Type of search>: Optional Integer constant
Type of search to perform:
searchContains
(Default value)
Generic search of type "Contains"
<Result> corresponds to the index of the element with a value that contains <Search element>.
searchExactMatchExact-match search ("Equals to")
<Result> corresponds to the index of the element with a value that is strictly equal to <Search element>.
Caution: Spaces at the beginning of the text are ignored.
searchStartsWithGeneric search whose type is "Starts with"
<Result> corresponds to the index of the element with a value that starts with <Search element>.
Caution: Spaces at the beginning of the text are ignored.
<Start>: Optional integer
Index of the starting row for the search (1 by default).
This parameter is ignored in Table controls based on a data file.
Remarks

Use conditions

TableSearchEverywhere can be used on:
  • a Table or TreeView Table with in-memory data source (this function is not available for Table or TreeView Table controls with direct access to the data source),
  • Table or TreeView Table controls populated programmatically.
  • WINDEV a table displayed in a Combo Box control.
  • a single-selection or multi-selection control.
For Table or TreeView Table controls based on a data file, the iteration mode must be automatic.
Component: wd290obj.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/13/2022

Send a report | Local help