PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Tip
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
HHistoryModification (Function)
In french: HHistoriqueModification
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
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 is using the write-to-file log as well as all the archived logs.
History of modifications
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// 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 = HHistoryModification(Client, IDClient, Client.IDClient, "Email", 5)
sModification, sRubrique, sEtat, sUtilisateur are strings
sModification = ExtractString(sHistorique, firstRank, CR)
WHILE sModification <> EOT
sRubrique = ExtractString(sModification, 1, TAB)
sEtat = ExtractString(sModification, 2, TAB)
sUtilisateur = ExtractString(sModification, 5, TAB)
SWITCH sEtat
CASE "D"
ListAdd(LISTE_ListeModification, ...
StringBuild("L'utilisateur %1 a modifié " + ...
"la rubrique Email pour lui donner la valeur %2", ...
sUtilisateur, sRubrique))
CASE "N"
ListAdd(LISTE_ListeModification,...
StringBuild("L'utilisateur %1 a modifié " + ...
"la rubrique Email pour la rendre NULL", sUtilisateur))
END
  sModification = ExtractString(sHistorique, nextRank, CR)
END
Syntax

Modifications in a record identified by the value of a search key Hide the details

<Result> = HHistoryModification(<Data file> , <Search item> , <Sought value> , <List of items> [, <Number of modifications> [, <Separator of values> [, <Separator of modifications>]]])
<Result>: Character string
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 item is NULL.
      • "I": the item does not exist in the archived log.
  • <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 Login always corresponds to an empty string ("").
<Data file>: Character string
Name of the logged data file where the last modifications must be sought.
<Search item>: Character string
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.
<Sought value>: Type corresponding to the value
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>: Character string
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>: Optional integer
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>: Optional character string
Separator for the different values. This separator corresponds to TAB if this parameter is not specified.
<Separator of modifications>: Optional character string
Separator for the different modifications made to the specified record. This separator corresponds to CR if this parameter is not specified.

Modifications in a record identified by its record number Hide the details

<Result> = HHistoryModification(<Data file> , <Record number> , <List of items> [, <Number of modifications> [, <Separator of values> [, <Separator of modifications>]]])
<Result>: Character string
Values of the items of <List of items> separated by <Separator of values>. The following information is added after these values:
HFSQL
<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>
<Data file>: Character string
Name of the logged data file where the last modifications must be sought.
<Record number>: Integer
Number of the record where the modifications must be sought. The hRecNumCurrent constant can be used to handle the current record.
<List of items>: Character string
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>: Optional integer
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>: Optional character string
Separator for the different values. This separator corresponds to TAB if this parameter is not specified.
<Separator of modifications>: Optional character string
Separator for the different modifications made to the specified record. This separator corresponds to CR if this parameter is not specified.
Remarks

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. Indeed, using the record number may cause some unexpected effects: the record number is re-used when deleting and adding a record.
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.
Component: wd270hf.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment