PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Use conditions
  • Case sensitivity
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
Warning
From version 27, Looper.Seek is kept for backward compatibility. This function is replaced by <Looper>.Search.
Searches for a value in an attribute of a Looper control.
Versions 21 and later
Remark: To perform a search in all the attributes of a Looper control, use <Looper>.SearchEverywhere.
New in version 21
Remark: To perform a search in all the attributes of a Looper control, use <Looper>.SearchEverywhere.
Remark: To perform a search in all the attributes of a Looper control, use <Looper>.SearchEverywhere.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Versions 17 and later
WEBDEV - Browser code This function is now available in Browser code.
New in version 17
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code This function is now available in Browser code.
Example
// Count the name starting with "SMI"
// The first one
Index is int = ATT_NAME.Search("SMI", False)
Cnt is int = 0
WHILE Index <> -1
Cnt++
// Next one
Index = ATT_NAME.Search("SMI", False, Index + 1)
END
Info("There are " + Cnt + " names starting with 'SMI'")
// Finds the position of customer #1234
Index is int = ATT_IDCUSTOMER.Search("1234")
// If this customer was found
IF Index <> -1 THEN
// Positions the Looper control on the found customer
LOOP_LOOPER1 = Index
// Retrieves the name of the customer (ATT_NAME is an "attribute" of LOOP_LOOPER1)
// and assigns it to a Static control
STC_CAPTION1 = " Information about " + ATT_NAME
END
Syntax
<Result> = <Attribute>.Search(<Sought value> [, <Type of search> [, <Start>]])
<Result>: Integer
  • Index of the element found,
  • -1 if the search failed.
<Attribute>: Control name
Attribute of the Looper control on which the search must be performed.
<Sought value>: Character string
Value sought in the specified attribute.
<Type of search>: Optional Integer constant
Type of search to perform:
  • True (default value): Exact-match search ("Equals to"): Only the index of the elements whose value is strictly equal to <Sought value> is returned.
  • False: Generic search ("Starts with"): The index of the elements whose value starts with <Sought value> is returned.
Type of search to perform:
Versions 21 and later
searchStartsWith
New in version 21
searchStartsWith
searchStartsWith (or False for compatibility)
Generic search whose type is "Starts with"
The index of the elements whose value starts with <Sought value> is returned.
Versions 21 and later
searchContains
New in version 21
searchContains
searchContains
Generic search whose type is "Contains"
The index of the elements containing <Sought value> is returned.
WEBDEV - Browser codePHP This constant is not available.
Versions 21 and later
searchExactMatch
New in version 21
searchExactMatch
searchExactMatch (or True for compatibility)
(Default value)
Exact-match search ("Equals to")
The index of the elements whose value is strictly equal to <Sought value> is returned.
<Start>: Optional integer
Start index for the search (1 by default).
Remarks

Use conditions

<Looper>.Search can be used on a browsing or memory Looper control.
WEBDEV - Browser code This function is not available for Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.

Case sensitivity

The search is not case sensitive, even if the search is an exact-match search.
Component: wd270obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment