AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Filter
  • Filtered browse
  • Enabling/Disabling a filter
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
Defines and enables a "Contains" filter on a data file, view or query. The "Contains" filter is used to select all the records containing a specific set of characters.
This filter is not case sensitive.
This filter does not use any index, it browses the entire data file.
Ejemplo
CléParcours is string = Client.FiltreContient(Commentaire, "VIP")
Client.LitPremier(CléParcours)
WHILE NOT Client.EnDehors()
	Trace(Client.NomClient, Client.Ville)
	Client.LitSuivant(CléParcours)
END
// Désactive le filtre
Client.DésactiveFiltre()
Sintaxis
<Result> = <Source>.FilterContains(<Item> , <Value>)
<Result>: Cadena de caracteres
Browse item. Corresponds to:
  • the name of item used to loop through the data file if the filter is enabled,
  • an empty string ("") if the filter cannot be implemented.
<Source>: Tipo de fuente especificada
Name of the HFSQL data file, view or query used.
<Item>: Cadena de caracteres
Name of item on which the filter will be implemented. This item can be a key item or a non-key item.
<Value>: Cadena de caracteres
Value that must be found in the record item.
Observaciones

Filter

  • The filter is enabled as soon as <Source>.FilterContains is called.
  • Equivalent syntaxes:
    NomFichier.FiltreContient(NomRubrique, "Valeur")

    is equivalent to:
    NomFichier.Filtre("NomRubrique ~]'Valeur'")

Filtered browse

When a filter is defined and enabled on a data file, any record read corresponds to the filter. If no other record corresponds to the filter during the iteration:
  • <Source>.Out returns True.
  • the current record corresponds to the last record read with the filter.
For example:
On a filtered data file, after the function:the current record is:
<Source>.ReadFirstthe first file record corresponding to the filter.
<Source>.ReadLastthe last file record corresponding to the filter.
<Source>.ReadNext (or <Source>.Forward)the next record (or the next nth record) corresponding to the filter.
<Source>.ReadPrevious (or <Source>.Backward)the previous record (or the previous nth record) corresponding to the filter.

Enabling/Disabling a filter

  • <Source>.DeactivateFilter is used to disable a filter.
  • <Source>.ActivateFilter is used to re-enable a filter.
  • The filter is deleted when the data file (query or view) is closed (<Fuente>.Close or HOpenAnalysis for example).
  • A single filter can exist at a given time on a data file (query or view). If the <Source>.FilterContains is used several times, only the last filter will be taken into account: the previous filter(s) will be deleted. Similarly, if several filters are used (HFilter* functions), only the last filter will be taken into account.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 25
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/11/2024

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