You can iterate over all connected clients.
From each client you can get data (including asking it's IP address).
Then you can set the required visualization of this client.
Please note that currently you cannot read the current page. According to 3S-Smart Software Solutions with SP11 a new user friendlier library will be released which can do the same as below including reading the actual visualization the client is on.
Below the example code which I used to changed to a certain visualization when a user logged out at a specific client (local client). In this case I remembered who was already logged on. In your case you could use another array to detect if this is a new client. If yes, then set the start visualization.
pClient : POINTER TO VisuElems.VisuStructClientData;
_VisuFbClientTagDataHelper : VisuElems.VisuFbClientTagDataHelper;
_asIP: ARRAY[0..5] OF STRING;
_asPreviousUserName : ARRAY[0..5] OF WSTRING;
// Iterate over all currently active visualization clients
WHILE (pClient := VisuElems.g_ClientManager.GetNextClient()) <> 0 DO
// Switch the visu of a webclient only if it is a specific client where the admin user is logged out. In this case the current user is empty and the previous was Admin.
IF pClient^.GlobalData.ClientType = VisuElems.Visu_ClientType.WebVisualization THEN
_VisuFbClientTagDataHelper(pClientData := pClient);
IF _VisuFbClientTagDataHelper.xIPv4Valid THEN
_asIP[pClient^.GlobalData.GlobalClientID] := _VisuFbClientTagDataHelper.stIPv4;
IF pClient^.GlobalData.CurrentUserName = "" AND _asPreviousUserName[pClient^.GlobalData.GlobalClientID] = "Admin" AND _asIP[pClient^.GlobalData.GlobalClientID] = '127.0.0.1' THEN
_asPreviousUserName[pClient^.GlobalData.GlobalClientID] := pClient^.GlobalData.CurrentUserName;