EXECUTE ON CLIENT

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.5


EXECUTE ON CLIENT (clientName; methodName{; param}{; param2; ...; paramN})

ParameterTypeDescription
clientNameString4D Client's registered name
methodNameStringName of the method to execute
paramMethod's parameter(s)

Description

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.

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.

Examples

1. Let's assume that you want to execute the "GenerateNums" method on the "Client1" client station:

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

2. If you want all the clients to execute the "EmptyTemp" method:

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

3. Refer to the example of the REGISTER CLIENT command.

See Also

GET REGISTERED CLIENTS, REGISTER CLIENT, UNREGISTER CLIENT.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next