PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 27 feature!
This content has been translated automatically. Click here to view the French version.
  • 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 control where 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:
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.
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.
<Start>: Optional integer
Index of the starting row for the search (1 by default).
This parameter is ignored in browsing Table controls.
Remarks

Use conditions

TableSearchEverywhere can be used on:
  • a Table or TreeView Table control,
  • a browsing Table or TreeView Table control with data loaded in memory, or of type memory (this function is not available for browsing controls with direct access),
  • WINDEV a table displayed in a Combo Box control,
  • a single-selection or multi-selection control.
For browsing Table or TreeView Table controls, the iteration mode must be automatic.
Component: wd270obj.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Exemplo
//Blog
https://windevdesenvolvimento.blogspot.com/2022/01/video-3583-nov27-4-tablesearcheverywher.html
//Video
https://youtu.be/xVS_5ttF1wI
// vamos procurar em todas colunas
nPos is int = TableSearchEverywhere(TABLE_cliente, EDT_Procura, searchContains)
// Caso encontrou
IF nPos > 0 THEN
// Vamos selecionar linha
TABLE_cliente = nPos
END
amarildo
20 Jan. 2022