I have an Outline that contains Computed Named Elements. These named elements are pointing to a view in another database.
I have written a formula to choose the correct database on the correct server. I am using @ServerName to get the current server and if it is the same as the @UserName value, according to Designer help, it means it is on the local:
delimiter := “~~”;
currentUser := @UserName;
appDoc := @DbLookup(“” : “”; “” : “”; “AppProfilesByUserName”; currentUser; 2);
appDocToGet := @Word(appDoc; delimiter; 1);
userDoc := @DbLookup(“” : “”; “” : “”; “UserProfilesByUserName”; currentUser; 5);
docToGet := @Word(userDoc; delimiter; 1);
empDB := @GetDocField(appDocToGet; “refEmp”);
serverName := @GetDocField(docToGet; “ServerName”);
currentServer := @Name([Canonicalize]; @ServerName);
currentUserFull := @Name([Canonicalize]; currentUser);
fullServer := @If(currentServer = currentUserFull;
"";
serverName + "!!"
);
fullServer + empDB
However, this needs to work when users are disconnected (Island location document) from the server. They have replica copies on the laptops, which are in the correct folder structure. When a user is disconnected, they receive:
“You cannot add a directory to your workspace.”
Lost on this one… Is my code incorrect?
Couldn’t find an answer in the forum…
Thanks!
Dan