4D v14.3

EXECUTE ON CLIENT

Home

 
4D v14.3
EXECUTE ON CLIENT

EXECUTE ON CLIENT 


 

EXECUTE ON CLIENT ( clientName ; methodName {; param}{; param2 ; ... ; paramN} ) 
clientName  String in 4D Client’s registered name
methodName  String in Name of the method to execute
param  in Method’s parameter(s)

The EXECUTE ON CLIENT command forces the execution of the methodName method, with the parameters param1... paramN, if necessary, on the registered 4D Client whose name is clientName. 4D Client’s registered name is defined by the REGISTER CLIENT command.

This command can be called from a 4D Client or a stored method from 4D Server.

If the method requires one or more parameters, pass them after the name of the method.
The execution of the method on 4D Client is done in a process automatically created on the client workstation, and its name will be the 4D Client’s registered name.

If this command is called many times in a row on the same 4D Client, the execution orders will be stacked. Therefore, the methods will be treated one after another in asynchronous mode. The more methods that are stacked, the bigger the workload is for the 4D Client. You can know the state of the workload of each client by using the GET REGISTERED CLIENTS command.

Note: The stacking of the execution orders cannot be modified or stopped unless 4D Client is unregistered by using the UNREGISTER CLIENT command.

You can simultaneously execute the same method on many or all of the registered 4D Clients. To do so, use the wildcard character (@) in the clientName parameter.

Let’s assume that you want to execute the “GenerateNums” method on the “Client1” client station:

 EXECUTE ON CLIENT("Client1";"GenerateNums";12;$a;"Text")

If you want all the clients to execute the “EmptyTemp” method:

 EXECUTE ON CLIENT("@";"EmptyTemp")

Refer to the example of the REGISTER CLIENT command.

The OK system variable is equal to 1 if 4D Server has correctly received the execution request of a method; however, this does not guarantee that the method has been properly executed by 4D Client.

 
PROPERTIES 

Product: 4D
Theme: Processes
Number: 651

The OK variable is changed by the commandDifferent in remote mode

 
HISTORY 

Created: 4D v6.5

 
SEE ALSO 

GET REGISTERED CLIENTS
REGISTER CLIENT
UNREGISTER CLIENT

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)