AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Case sensitivity
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
A partir de la versión 27, LooperSeek se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por LooperSearch.
Searches for a value in an attribute of a Looper control.
Note: To search all the attributes of a RepeatString Looper control, use the LooperSearchEverywhere function..
Ejemplo
// Counts the names starting with "SMI" 
// The first one
Index is int = LooperSearch(ATT_NAME, "SMI", False)
Cnt is int = 0
WHILE Index <> -1
	Cnt++
	// Next one
	Index = LooperSearch(ATT_NAME, "SMI", False, Index + 1) 
END
Info("There are " + Cnt + " names starting with 'SMI'")
// Finds the position of customer #1234
Index is int = LooperSearch(ATT_IDCUSTOMER, "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 Text control
	STC_CAPTION1 = " Information about " + ATT_NAME
END
Sintaxis
<Result> = LooperSearch(<Attribute> , <Search value> [, <Type of search> [, <Start>]])
<Result>: Integer
  • Index of the element found,
  • -1 if the search failed.
<Attribute>: Character string
Attribute of the Looper control on which the search must be performed.
If this parameter corresponds to an empty string (""), the search is performed on the attribute to which the current event belongs.
<Search value>: Character string
Value sought in the specified attribute.
<Type of search>: Optional Integer constant
Type of search to perform:
searchContainsGeneric search of type "Contains"
The index of the elements containing <Sought value> is returned.
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.
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.
<Start>: Optional integer
Start index for the search (1 by default).
Observaciones

Use conditions

La función LooperSearch puede utilizarse en:
  • un control Looper basado en un archivo de datos,
  • un control Looper rellenado mediante programación.
WEBDEV - Código Navegador Esta función no está disponible para los controles Looper lineales. Esta función sólo está disponible para los controles Looper en modo navegador.
WEBDEV - Código ServidorPHP Esta función está disponible para los controles Looper en modo AJAX, los controles Looper en modo clásico y los controles Looper lineales.

Case sensitivity

The search is not case sensitive, even if the search is an exact-match search.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local