ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing triggers / WLanguage functions
  • The same trigger is applied to several files or to several WLanguage functions
  • Compatibility with the earlier versions
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
Returns the list of triggers applied to one or more HFSQL data files.

Reminder: A trigger is a WLanguage procedure automatically called whenever one or more HFSQL functions are run. For more details, see Managing the triggers
Example
// Retrieve triggers applied to Customer and Product data files
ListTriggers is string
ListTriggers = HListTrigger("Customer,Product")
 
// Adds the list of triggers into COMBO_COMBO1
ListAdd(COMBO_COMBO1, ListTriggers)
Syntax
<Result> = HListTrigger([<Name of files>])
<Result>: Character string
List of triggers applied to the specified data files. The different triggers are separated by CR characters (Carriage Return).
The list has the following format:

<Data file> + TAB + <WLanguage procedure> + TAB +
<HFSQL function> + TAB + <Type of trigger> +
TAB + <Trigger status> + CR +...
<Data file>Name of the data file to which the trigger applies.
<HFSQL function>HFSQL function onto which the trigger applied.
<Trigger status>
<Type of trigger>
  • "A" for a "BEFORE" trigger (the procedure associated with the trigger is run before the HFSQL function of trigger).
  • "P" for an "AFTER" trigger (the procedure associated with the trigger is run after the HFSQL function of trigger).
<WLanguage procedure>Name of the WLanguage procedure called by the trigger.
<Name of files>: Optional character string
Name of one or more data files. If this parameter is not specified, the triggers of all the data files found in the analysis associated with the current project will be listed.
To specify several names, the names of the data files must be separated by a comma (",").
Remarks
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppUser code (UMC)HFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBODBCNative Connectors (Native Accesses)

The same trigger is applied to several files or to several WLanguage functions

If a trigger (described by HDescribeTrigger) is applied to several data files or to several WLanguage functions, this trigger will be displayed several times in the list (according to the number of HFSQL functions and/or data files).
Example 1: a trigger is applied to several data files:
// Describe a trigger applied to the Customer and Product data files
HDescribeTrigger("Customer,Product", "HAdd", "CheckParam", hTriggerBefore)
MyList is string = HListTrigger()
 
// The content of MyList will be as follows:
// Customer  <TAB>  CheckParam  <TAB>  HAdd  <TAB>  A  <TAB>  1
// Product  <TAB>  CheckParam  <TAB>  HAdd  <TAB>  A  <TAB>  1
Example 2: a trigger is applied to several HFSQL functions:
// Describes a trigger applied to HAdd and HModify
HDescribeTrigger("CUSTOMER", "HAdd,HModify", "CheckParam", hTriggerAfter)
MyList is string = HListTrigger()
// The content of MyList is as follows:
// CUSTOMER  <TAB>  CheckParam  <TAB>  HAdd  <TAB>  P  <TAB>  1
// CUSTOMER  <TAB>  CheckParam  <TAB>  HModify <TAB>  P  <TAB>  1

Compatibility with the earlier versions

The following syntax is kept for backward compatibility:
<Result> = HListTrigger([<File name> [,<Full WDD name>]])
The <Full WDD name> parameter is kept for backward compatibility. This parameter is ignored.
Business / UI classification: Business Logic
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help