ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Your version: XXA150056M

This content has been translated automatically.  Click here  to view the French version.
The content of this page has been updated to version 2024.  See documentation 2024 now.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Calling a global component procedure
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
ExecuteProcess (Function)
In french: ExécuteTraitement
Starts the execution of an event or process programmatically, i.e. without the user having to perform any particular action in the interface. The event/process executed can be:
  • an event of a control (in a window, a page or a report),
  • an event of a menu option,
  • an event of a report block,
  • an event of a window,
  • an event of a page,
  • an event of a report,
  • a process of a procedure.
    Versions 17 and later
    Remark: To execute of a procedure in the main thread of the application, use:
WEBDEV - Server codeWEBDEV - Browser codePHP The event/process executed can only be from a control in a page, from a page or from a procedure. When called in server code, only the server code of the element is executed. When called in browser code, both the browser and server codes of the element are executed.
Example
// Exécute le traitement de clic sur un champ Bouton
ExecuteProcess(BTN_Sauve, trtClick)

// Exécute le traitement de clic sur un champ via indirection
ExecuteProcess({NChamp}..Value, trtClick)
// Exécute une procédure locale (test) appartenant
// à une autre fenêtre/page ouverte (menu)
ExecuteProcess(Menu.Test, trtProcedure)
// Exécute la procédure LitFichier
// en lui passant en paramètre le nom du fichier
ExecuteProcess(LitFichier, trtProcedure, NomFichier)
Syntax

Executing an event associated with a control Hide the details

ExecuteProcess(<Control used> , <Process> [, <Parameter 1> [... [, <Parameter N>]]])
<Control used>: Control name
Name of the control (or menu option) associated with the process (or event) to run.
For an option in a popup menu, use the following notation: <Name of popup menu>.<Option name>.
Caution: If the name of the control is not directly specified (with an indirection, for example), you must explicitly use the Value property.
<Process>: Integer constant
Event to be executed among the WLanguage events available for controls:
Versions 22 and later
trtAction
Action code of the Web Component control. This code is available in server code and in browser code.
Versions 27 and later
trtAddDiagShape
Code executed when a shape is added in a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
Versions 28 and later
trtAddKanbanCard
Code executed when a card is added in a Kanban control.
Versions 24 and later
trtAddToken
Code executed when a token is added in a "Text token" Edit control.
Versions 20 and later
trtAddWidget
Code executed when a widget is added to a Dashboard control.
Versions 23 and later
trtAfterOpeningDocument
"After opening a document" code of the Word Processing, Image Editor, Spreadsheet and PDF Reader controls.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 23 and later
trtBeforeClosingDocument
"Before closing a document" code of the Word Processing, Image Editor, Spreadsheet and PDF Reader controls.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
New in version 15
trtBeforeCreatingOrganizerApt
"Before creating the appointment" code of the Organizer control.
Versions 16 and later
trtBeforeCreatingScheduleApt
"Before creating the appointment" code of Scheduler control.
trtChange"Whenever modified" code of control.
WEBDEV - Browser code This constant is not available.
Versions 27 and later
trtChangeDiagShape
Code executed when a shape is modified in a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
New in version 15
trtChangeOrganizerPeriod
"Whenever changing period" code of Organizer control.
Versions 22 and later
trtChangePlane
"Whenever changing plane" code of a Sliding Banner control.
Versions 20 and later
trtChangePositionMap
"Whenever changing position" code of Map control.
Versions 16 and later
trtChangeSchedulePeriod
"Whenever changing period" code of Scheduler control.
trtClickClick code of the control.
Versions 22 and later
trtClickButtonArrow
Click code on the arrow associated with a button.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 2024 and later
trtClickButtonEditControlLeft
Code "Click on the left button of the edit control"..
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 2024 and later
trtClickButtonEditControlRight
Code "Click on the right button of the edit control"..
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 26 and later
trtClickHTMLLink
"Click on a link" code of an HTML Display control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 24 and later
trtClickToken
Click code on a token in a "Text token" Edit control.
trtCollapseExpandBranchCollapsed/Expanded code of a node in a TreeView or TreeView Table control.
Caution: This parameter requires a specific syntax. For more details, see the remarks.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 22 and later
trtCollapseExpandBreak
Collapsed/Expanded code of a break in a Looper or Table control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 25 and later
trtCollapseExpandDrawer
Browser code run each time the Drawer control is collapsed or expanded.
WEBDEV - Server code This constant is not available.
trtComboClosingCode executed when the drop-down list is closed.
WEBDEV - Server code This constant is not available.
trtComboOpeningCode executed the drop-down list of a Combo Box control is expanded.
WEBDEV - Server code This constant is not available.
Versions 22 and later
trtDelayedPlaneLoad
"Delayed plane load" code of a plane.
Versions 27 and later
trtDeleteDiagShape
Code executed when a shape is deleted from a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
Versions 28 and later
trtDeleteKanbanCard
Code executed when a card is deleted from a Kanban control.
New in version 15
trtDeleteOrganizerApt
Code executed when an appointment is deleted from an Organizer control.
Versions 16 and later
trtDeleteScheduleApt
Code executed when an appointment is deleted from a Scheduler control.
Versions 24 and later
trtDeleteToken
Code executed when a token is deleted from a "Text token" Edit control.
Versions 20 and later
trtDeleteWidget
Code executed when a widget is deleted from a Dashboard control.
trtDoubleClickDouble-click code.
trtEndChange"End of modification" code (Slider and Scrollbar control only).
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtEndInitialization"End of initialization" code (List Box, Table and Combo Box control based on a data file).
WEBDEV - Browser code This constant is not available.
Versions 26 and later
trtEndLoadingHTMLPage
"After loading the HTML page" code of an HTML Display control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 28 and later
trtEndMovingKanbanCard
Code executed when the user stops moving a card in a Kanban control.
trtEnterEntry code of the control.
New in version 15
trtEnterInputOrganizerApt
Code executed when the user enters an appointment in an Organizer control.
WEBDEV - Server code This constant is not available.
Versions 16 and later
trtEnterInputSchedulerApt
Code executed when the user enters an appointment in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtExitExit code of the control.
trtInitControl initialization code.
WEBDEV - Browser code This constant is not available.
Versions 28 and later
trtKanbanCardDetails
Code executed when the details of a card are displayed in a Kanban control.
trtLineDisplayCode executed when a row is displayed (Table control only).
WEBDEV - Browser code This constant is not available.
trtLineEnterEntry code of a row (Table control only).
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtLineExitExit code of the row (Table control only).
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 26 and later
trtLoadingHTMLResource
"Load resources" code of an HTML Editor or HTML Display control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtMenuOptionCode of a menu option (main or context menu).
Versions 24 and later
trtModificationColumnFilter
Code "Whenever modifying the filter (user input in header)" of a Table Column control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 22 and later
trtModificationSpreadsheetCell
"Cell modification" code of Spreadsheet control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 27 and later
trtMoveDiagShape
Code executed when the user moves a shape in a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
Versions 28 and later
trtMoveKanbanCard
Code executed when the user moves a card in a Kanban control.
New in version 15
trtMoveOrganizerApt
Code executed when the user moves an appointment in an Organizer control.
Versions 16 and later
trtMoveScheduleApt
Code executed when the user moves an appointment in a Scheduler control.
Versions 20 and later
trtMoveWidget
"Moving a widget" code of Dashboard control.
New in version 15
trtOrganizerInputExitApt
Code executed when the user leaves the input field of an appointment in an Organizer control.
Versions 20 and later
trtPullToRefresh
"Pull to refresh" code of a Table or Looper control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtReadFirstCode executed when the first record is read (Table control only).
WEBDEV - Browser code This constant is not available.
trtReadLastCode executed when the last record is read (Table control only)
WEBDEV - Browser code This constant is not available.
trtReadNextCode executed when the next record is read (Table control only).
WEBDEV - Browser code This constant is not available.
trtReadPreviousCode executed when the previous record is read (Table control only).
WEBDEV - Browser code This constant is not available.
Versions 16 and later
trtReassignResourceScheduleApt
Code executed when an appointment is reassigned in a Scheduler control.
Versions 23 and later
trtRefreshRibbon
Code executed when the ribbon of the PDF Reader or Word Processing control is refreshed.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 27 and later
trtResizeDiagShape
Code executed when a shape is resized in a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
New in version 15
trtResizeOrganizerApt
Code executed when an appointment is resized in an Organizer control.
WEBDEV - Server code This constant is not available.
Versions 16 and later
trtResizeScheduleApt
Code executed when an appointment is resized in a Scheduler control.
WEBDEV - Server code This constant is not available.
Versions 20 and later
trtResizeWidget
"Resizing a widget" code of Dashboard control.
trtRightClickRight-click code (for TreeView controls only).
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 26 and later
trtRightClickHTMLLink
"Right click on a link" code of an HTML Display control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 16 and later
trtScheduleInputExitApt
Code executed when the user leaves the input field of an appointment in a Scheduler control.
Versions 27 and later
trtSelectDiagShape
Code executed when a shape is selected in a Diagram Editor control.
WEBDEV - Browser code This constant is not available.
trtSelectionSelection code (Combo Box, List Box and Table control).
WEBDEV - Browser code This constant is not available.
New in version 15
trtSelectOrganizerApt
Code executed when an appointment is selected in an Organizer control.
WEBDEV - Server code This constant is not available.
New in version 15
trtSelectOrganizerPeriod
Code executed when a time range is selected in an Organizer control.
WEBDEV - Server code This constant is not available.
Versions 16 and later
trtSelectScheduleApt
Code executed when an appointment is selected in a Scheduler control.
WEBDEV - Server code This constant is not available.
Versions 16 and later
trtSelectSchedulePeriod
Code executed when a time range is selected in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtSliderChange"Whenever modified" code (Slider control only).
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtSpinMinusCode executed when the value decreases in a Spin control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
trtSpinPlusCode executed when the value increases in a Spin control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 26 and later
trtStartLoadingHTMLPage
"Before loading the HTML page" code of an HTML Display control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.
Versions 28 and later
trtStartMovingKanbanCard
Code executed when the user starts moving a card in a Kanban control.
Versions 22 and later
trtValueAssignment
Code executed when the Value property of the Web Component control is assigned. This code is available in browser code only.
Versions 22 and later
trtValueRetrieval
Code executed when the Value property of a Web Component control is retrieved. This code is available in browser code only.
New in version 15
trtZoomModification
Code executed when the zoom value changes in a Range Slider control.
WEBDEV - Server codeWEBDEV - Browser code This constant is not available.


Control or block of a report: Event to be executed among the available WLanguage events:
trtPostPrint"Post Print" code of a block.
WEBDEV - Browser codePHP This constant is not available.
trtPrePrint"Pre Print" code of control or block.
WEBDEV - Browser codePHP This constant is not available.
<Parameter 1>: Any optional type
First optional parameter to be passed to the code (for WLanguage events that expect parameters).
<Parameter N>: Any optional type
Nth optional parameter to be passed to the code (for WLanguage events that expect parameters).
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Executing a WLanguage event associated with a page Hide the details

ExecuteProcess(<Page used> , <Process> [, <Parameter 1> [... [, <Parameter N>]]])
<Page used>: Page name
Name of the page with a WLanguage event to be executed.
PHP The name of the page must be enclosed in quotes.
<Process>: Integer constant
Event to be executed among the WLanguage events available for pages.
Versions 25 and later
trtChangeLayout
WEBDEV - Server code "Whenever changing layout" code of the page.
Versions 22 and later
trtChangeSlice
WEBDEV - Browser code "Whenever changing blade" code (page in Responsive Web Design mode).
trtClosing
WEBDEV - Server code Page closing code.
PHP This constant has no effect.
trtInit
WEBDEV - Server code Page initialization code.
trtLoad
WEBDEV - Browser code Code executed when the page is loaded.
trtOpening
WEBDEV - Server code Page opening code.
WEBDEV - Server code "Request for updating the display" code.
trtReset
WEBDEV - Browser code Code executed when the page is reset (when a form is reset).
Versions 22 and later
trtScroll
WEBDEV - Browser code "Scroll" code of the page.
trtSubmit
WEBDEV - Browser code Code executed when a page is submitted (when a form is sent).
trtUnload
WEBDEV - Browser code Code executed when the page is unloaded.
<Parameter 1>: Any optional type
First optional parameter to be passed to the code (for WLanguage events that expect parameters).
<Parameter N>: Any optional type
Nth optional parameter to be passed to the code (for WLanguage events that expect parameters).
WEBDEV - Server code

Executing a WLanguage event associated with a report Hide the details

ExecuteProcess(<Report used> , <Process> [, <Parameter 1> [... [, <Parameter N>]]])
<Report used>: Report name
Name of the report whose process must be run.
<Process>: Integer constant
event to be executed among the WLanguage events available for reports.
trtClosingReport closing code.
trtFilterCode executed when the report data is filtered.
trtOpening or trtInitReport opening code.
trtReadDataCode executed when the report data is read.
<Parameter 1>: Any optional type
First optional parameter to be passed to the code (for WLanguage events that expect parameters).
<Parameter N>: Any optional type
Nth optional parameter to be passed to the code (for WLanguage events that expect parameters).
WEBDEV - Server codePHPAjax

Executing a WLanguage procedure Hide the details

<Result> = ExecuteProcess(<WLanguage procedure> , <Process> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Any
Return value of the procedure called. This value is identical to the value obtained if the procedure is run directly.
<WLanguage procedure>: Procedure name
Name of the procedure to be executed.
WEBDEV - Server code The procedure to run corresponds to a server procedure.
<Process>: Integer constant
Procedure to run. This procedure corresponds to:
  • one of the following constants:
    trtProcedureRun the specified procedure according to the execution context (procedure of the window, procedure of the WINDEV/WEBDEV component or procedure of the project).
    trtProjectProcedureRuns the specified procedure. This procedure is a procedure of the project that is hosting the WINDEV/WEBDEV component.
    This parameter can only be used for a WINDEV/WEBDEV component included in another project.
  • Versions 16 and later
    a variable of type Procedure Description (usable only to execute a class method). For more details, see Enumerating and handling the objects of a class.
<Parameter 1>: Any optional type
First optional parameter that will be passed to the procedure.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure.
Remarks
WEBDEV - Server codeAjax

Calling a global component procedure

ExecuteProcess is used to call a global component procedure. To do so, use the following syntax:
ExécuteTraitement(<Composant>.<Collection de procédures>.<Procédure>, ...
trtProcédure)
Example:
ExecuteProcess("MonComposant.Collection_WDExemple.MaProcédure", trtProcedure)
In a thread started by a component, ExecuteProcess cannot be used to call a local procedure of a window from the host project.
You must use a global procedure of the host project to call the local procedure of the window.
Business / UI classification: Neutral code
Component: wd290vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Dynamically Execute Class Methods using ExecuteProcess()
Hi

In order to dynamically call class methods use the following syntax.
ClassInst is ClassObject
MethodToCall is string = "ClassMethod"
ReturnVal is string (e.g. if the method returns a string value)

ReturnVal = ExecuteProcess(ClassInst,MethodToCall,Param1,Param2, ...)

PeHoBe
28 Oct. 2021

Last update: 12/22/2023

Send a report | Local help