Block Operation (Magic xpa 3.x)
The Block operation will execute client-side or server-side, depending on the Condition expression.
When you have a Block IF operation, it's good to group the client and server side together. The module will test each condition until a TRUE line is found. So in this example, if no condition was TRUE:
1. Executes on the client.
4. Executes on the server.
6. Executes on the client.
8. Executes on the server.
10. Back to the client.
Now, with a little shuffling, we can change that to:
1, 4 Execute on the client.
6, 8 Execute on the server.
10 Back to the client.
We could further optimize this by using a variable to hold the CallDLL(), so that it doesn't need to execute twice. If the CallDLL() is done in Task Prefix, the comparison done in the Block could be client-side, and no accesses to the server would need to be done during the Block until and unless the Batch task is called.
It is not a good idea to have both client-side and server-side operations in the same loop, as shown here, because this will require multiple jumps between the server and the client to perform the operations.