Client and Server-Side Properties (Magic xpa 4.x)
Some properties, such as form properties and task properties, are defined as client-side properties in order to minimize server interaction.
Server-side functions, such as CallDLL, cannot be used in a client-side property. If we were to use a server-side function for a client-side property, then for every Screen Refresh, for example, the Rich Client module would approach the server to evaluate the expression.
Implementation
To implement this scenario, we need to understand that the Task Prefix logic unit is a server-side operation. We can utilize this information to solve our dilemma, as follows:
-
Define a new variable.
-
In the Task Prefix, update the new variable with the server-side function.
-
In the client-side property, use the new variable instead of the server-side function.
Some task properties are evaluated when the task loads. These properties, such as the Range Expression, are defined as server-side properties. If a property is server-side, we are unable to use a client-side function, such as ClipRead. When the task is initializing, there is still no Rich Client interface and so the module cannot return to the client to evaluate the expression.
Implementation
To implement this scenario, we need to use a program that already exists in the runtime task tree, as follows:
-
Define a new variable in a parent program or the Main Program.
-
Before calling the new program, update the new variable with the client-side function.
-
In the server-side property, use the new variable in the expression.