I have a view in which one of columns is computed and defines the HREF depending on who is logged in. I used @UserName but it doesn’t always give the correct value. While Remote_user (CGI variable) gives the correct logged user but works only within a form and not within a view. Here’s my code below for the column in the view.
tmp := @If(@IsNull(LastUpdated); “”; “(”+ @Text(LastUpdated) + “)”);
unid := @Text(@DocumentUniqueID);
db := @ReplaceSubstring(@Subset(@DbName; -1); “\”; “/”);
url := “/” + db + “/Assessment/” + unid;
user := @Name([CN]; Remote_User); (no value)
isAssessor := @IsMember(user; COAssessor);
isREA := @IsMember(user; REA);
url := url + @If(isAssessor & @IsMember(Status; “”:“For Review”:“Confirmed”); “?EditDocument”;
@If (isAssessor; “?OpenDocument”; @If (isREA & @IsMember(Status; “Submitted”:“Sent to RD”); “?EditDocument”; @If (!isAssessor & !isREA & Status=“Confirmed”; “?OpenDocument”; “”))));
<a href=""+ url + “" Target="_top">” + Country + “ + <FONT SIZE=1 FACE="Arial">” + tmp + "
Is there another way of determining the user who logged in while i’m recreating the Href in a view column?
Appreciate any ideas.