Starts the execution of a process by programming (which means without any particular action performed by the user). The process run can be:

a process of a control (found in a window, page or report),

a process of a menu option,

a process of a report block,

a process of a window,

a process of a page,

a process of a report,

a process of a procedure.

Versions 17 and laterNote: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.

New in version 17Note: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.

Note: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.

The process run can only be a process belonging to a page control, a page or a procedure. Called in server code, only the server process of the element is run. Called in browser code, the browser code and server code of the element are run.

The process run can be a process belonging to a window control, a menu option, a window or a procedure.

Versions 16 and later

In Windows Phone, the process run can be a process belonging to a window control, a window or a procedure.

New in version 16

In Windows Phone, the process run can be a process belonging to a window control, a window or a procedure.

In Windows Phone, the process run can be a process belonging to a window control, a window or a procedure.

Versions 15 and later

This function is now available for Android applications.

New in version 15

This function is now available for Android applications.

This function is now available for Android applications.

Versions 16 and later

This function is now available for Windows Phone applications.

New in version 16

This function is now available for Windows Phone applications.

This function is now available for Windows Phone applications.

Versions 17 and later

This function is now available for iPhone/iPad applications.

New in version 17

This function is now available for iPhone/iPad applications.

This function is now available for iPhone/iPad applications.

Versions 18 and later

This function is now available in Android Widget mode.

This function is now available in Windows Store apps mode.

New in version 18

This function is now available in Android Widget mode.

This function is now available in Windows Store apps mode.

This function is now available in Android Widget mode.

This function is now available in Windows Store apps mode.

Versions 21 and later

This function is now available in Apple Watch mode.

This function is now available in Universal Windows 10 App mode.

New in version 21

This function is now available in Apple Watch mode.

This function is now available in Universal Windows 10 App mode.

This function is now available in Apple Watch mode.

This function is now available in Universal Windows 10 App mode.

Example

// Runs the click code on a buttonExecuteProcess(BTN_Save, trtClick)

// Runs a local procedure (test) that belongs// to another opened window/page (menu)ExecuteProcess(Menu.Test, trtProcedure)

// Runs the ReadFile procedure// and passes the file name in parameterExecuteProcess(ReadFile, trtProcedure, FileName)

Return value of procedure called. This value is identical to the value obtained if the procedure is run directly.

<Procedure name>: Character string

Name of procedure to run.

The procedure to run corresponds to a server procedure.

<Process>: Integer constant

Procedure to run. This procedure corresponds to:

one of the following constants:

trtProcedure

Run the specified procedure according to the runtime context (procedure of the window, procedure of the WINDEV/WEBDEV component or procedure of the project).

trtProjectProcedure

Runs 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.

For a TreeView controlThe "Collapse/Expand" process of a treeview available in the code editor expects the two following parameters:

<Element path>: Text variable containing the full path of the element currently collapsed or expanded. All you have to do is specify the name of a variable, this variable will be automatically initialized at run time.

<Collapsed>: Boolean variable, used to find out the action performed by the user (collapse = True, expand = False). All you have to do is specify the name of a variable, this variable will be automatically initialized at run time.

These two parameters must be specified when this process is run by ExecuteProcess. In this case, the following syntax must be used: