AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Tip
  • History of modifications
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
<Source>.HistoryModification (Función)
HFSQL ClassicHFSQL Client/ServerDisponible solo con estos tipos de conexión
Returns the modifications made to one or more items of a given record. The result can be displayed in a List Box or Table control to allow the user to view the modifications made to the specified data file.
Remarks:
  • This function uses the write-to-file log as well as all the archived logs.
  • WINDEV In a window linked to a data file, you have the ability to automatically display the history of the modifications performed on each item of the displayed record. To do so, the data file must be logged.
History of modifications
Ejemplo
// Permet de visualiser dans un champ Liste
// les utilisateurs qui ont changé l'email du client en cours 
// ainsi que les différentes valeurs de l'email au cours du temps
sHistorique is string
sHistorique = Client.HistoriqueModification(IDClient, Client.IDClient, "Email", 5)
sModification, sRubrique, sEtat, sUtilisateur are strings
sModification = sHistorique.ExtraitChaîne(firstRank, CR)
WHILE sModification <> EOT
	sRubrique = sModification.ExtraitChaîne(1, TAB)
	sEtat = sModification.ExtraitChaîne(2, TAB)
	sUtilisateur = sModification.ExtraitChaîne(5, TAB)
	SWITCH sEtat
		CASE "D"
			LISTE_ListeModification.Ajoute(StringBuild(...
					"L'utilisateur %1 a modifié " + ...
					"la rubrique Email pour lui donner la valeur %2", ...
					sUtilisateur, sRubrique))
		CASE "N"
			LISTE_ListeModification.Ajoute(StringBuild(...
					"L'utilisateur %1 a modifié " + ...
					"la rubrique Email pour la rendre NULL", sUtilisateur))
	END
   	sModification = sHistorique.ExtraitChaîne(nextRank, CR)
END
Sintaxis

Modificaciones de un registro identificado por el valor de una clave de búsqueda Ocultar los detalles

<Result> = <Source>.HistoryModification(<Search item> , <Search value> , <List of items> [, <Number of modifications> [, <Separator of values> [, <Separator of modifications>]]])
<Result>: Cadena de caracteres
This result has the following format:
<Valeurs> + <Séparateur de valeurs> + <Informations sur les modifications> +
<Séparateur des modifications>

Where:
  • <Values> has the following format:
    <Valeur de la rubrique 1> + <Séparateur de valeurs> + <Etat de la rubrique 1> +
    <Séparateur de valeurs> + ... + <Séparateur de valeurs> + <Valeur de la rubrique N>
    + <Séparateur de valeurs> + <Etat de la rubrique N>
    • <,Status of item> corresponds to:
      • "D": the item is defined.
      • "N": the field is NULL.
      • "I": the item does not exist in the archived journal.
  • <Information about modifications> has the following format:
    <Date et heure de modification> + <Séparateur de valeurs> +
    <Identifiant du poste (valeur de HPoste)> + <Séparateur de valeurs> + <Login> +
    <Séparateur de valeurs> + <Nom machine> + <Séparateur de valeurs> + <Adresse IP> +
    <Séparateur de valeurs> + <Nom de l'application> + <Séparateur de valeurs> +
    <HInfoMsg> + <Séparateur de valeurs> + <Numéro de fonction>

HFSQL Classic Login always corresponds to an empty string ("").
<Source>: Tipo de fuente especificada
Name of the logged data file where the last modifications must be sought.
<Search item>: Cadena de caracteres
Name of the item used to select the record for which the last modifications are sought. The selected record corresponds to the record whose value is equal to <Sought value>.
We recommend that you use a search key to optimize the performance.
The second syntax enables you to perform a search on a record number.
<Search value>: Tipo de valor
Value of the item that is sought in the data file. The list of modifications will be provided for the record for which the value of <Browse item> corresponds to <Sought value>.
<List of items>: Cadena de caracteres
List of items taken into account for the last modifications. In this list, the different items are separated by commas or by CR characters (Carriage Return).
If this parameter corresponds to "*", all the items found in the data file will be included.
<Number of modifications>: Entero opcional
Maximum number of modifications returned (from the most recent one). All the modifications will be returned if this paramer is not specified.
<Separator of values>: Cadena de caracteres opcional
Separator for the different values. This separator corresponds to TAB if this parameter is not specified.
<Separator of modifications>: Cadena de caracteres opcional
Separator for the different modifications made to the specified record. This separator corresponds to CR if this parameter is not specified.

Modificaciones de un registro identificado por su número de registro Ocultar los detalles

<Result> = <Source>.HistoryModification(<Record number> , <List of items> [, <Number of modifications> [, <Separator of values> [, <Separator of modifications>]]])
<Result>: Cadena de caracteres
Values of the items of <List of items> separated by <Separator of values>. The following information is added after these values:
HFSQL Classic
<Séparateur de valeurs> + <Date et Heure de modification> + <Séparateur de valeurs> +
<Identifiant du poste (valeur de HPoste)> + <Séparateur de valeurs> + <Nom machine> +
<Séparateur de valeurs> + <Adresse IP> + <Séparateur de valeurs> +
<Nom de l'application> + <Séparateur de valeurs> + <HInfoMsg> +
<Séparateur des modifications>
HFSQL Client/Server
<Séparateur de valeurs> + <Date et Heure de modification> + <Séparateur de valeurs> +
<Identifiant du poste (valeur de HPoste)> + <Séparateur de valeurs> + <Login> +
<Séparateur de valeurs> + <Nom machine> + <Séparateur de valeurs> + <Adresse IP> +
<Séparateur de valeurs> + <Nom de l'application> + <Séparateur de valeurs> +
<HInfoMsg> + <Séparateur des modifications>
<Source>: Tipo de fuente especificada
Name of the logged data file where the last modifications must be sought.
<Record number>: Entero
Number of the record where the modifications must be sought. The hRecNumCurrent constant can be used to handle the current record.
<List of items>: Cadena de caracteres
List of items taken into account for the last modifications. In this list, the different items are separated by commas or by CR characters (Carriage Return).
If this parameter is not specified or if it corresponds to "*", all the items found in the data file will be included.
<Number of modifications>: Entero opcional
Maximum number of modifications returned (from the most recent one). All the modifications will be returned if this paramer is not specified.
<Separator of values>: Cadena de caracteres opcional
Separator for the different values. This separator corresponds to TAB if this parameter is not specified.
<Separator of modifications>: Cadena de caracteres opcional
Separator for the different modifications made to the specified record. This separator corresponds to CR if this parameter is not specified.
Observaciones

Tip

We recommend that you use the first syntax by using as search key the automatic identifier of the data file or a unique key. In fact, using the registration number can have certain undesirable effects: the registration number is re-used when deleting and then adding a registration.
For example, in a Customer data file, if a customer is deleted, the number of the deleted record will be reused when adding a new customer. The history of the modifications performed on this record number will take into account the modifications performed on the different customers associated with this record number.
WINDEV

History of modifications

In a window linked to a data file, you have the ability to automatically display the history of the modifications performed on each item of the displayed record. To do so, the data file must be logged.
History of modifications
To customize this window (or to translate it), all you have to do is include it in the project.
To integrate the modification history window into your application:
  1. On the "Proyecto" tab, in the "Proyecto" group, expand "Importar" and select "WINDEV elements and their dependencies".
  2. Select the subdirectory that contains the elements to import. The timer button configuration window is located in the "Programs\Data\Preset Windows\EN\ AAF " subdirectory of the WINDEV installation directory.
  3. WINDEV lists the elements of the directory. This directory contains the different elements corresponding to the customizable AAFs. The window to import is named "WINDEVAaf_HFLogWindow.wdw".
  4. Validate. The window is included in the project and it can be modified. This custom window will be automatically taken into account when running the application.
Remarks:
  • The window must not be renamed.
  • If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
  • Attention: To modify this window, the corresponding file must not be read-only.. Modify the characteristics of the file in Windows if necessary.
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: 04/12/2024

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