Color Column
Posted by adolfo a flores on 31.Dec.11 at 07:14 AM using a Web browser Category : Notes Client Release: 7.0.3 FP1 Platform: Windows XP
Hi,
for some time I have been using this code to assign colors to all mails based on
Blue addressed to me, green important, black font =FYI
Red sent out by me
but the code crashes when there is a rule to forward specific mails to other persons.
There goes the code: is the one I have under Color Column on Lotus notes Client on private views
------Start code-----
REM {============Assign the icon numbers};
TO1:=250;
TO2:=163;
CC1:=70;
CC2:=21;
BCC:=4;
DISTR:=3;
userName:= @ProperCase(@Name([CN];@UserName));
tmpvar:=@If(
DeliveredDate = ""; 0;
@ProperCase(@Name([CN];SendTo)) = userName; @If(@Elements(SendTo)=1; TO1; TO2);
@ProperCase(@Name([CN];CopyTo)) = userName; @If(@Elements(CopyTo)=1; CC1; CC2);
BlindCopyTo != ""; BCC;
SendTo != ""; DISTR;
0);
@If(DeliveredDate = "";
@If(PostedDate="" | @IsUnavailable(PostedDate);
@If(@IsAvailable(IsMailStationery);
21;
@IsAvailable(_ViewIcon);
_ViewIcon;
58);
@If(Importance="1";
224;
222));
Importance = "1";
250;
tmpvar != 0; tmpvar;
@IsAvailable(_ViewIcon);
_ViewIcon;
$TypeIcon);
PersonVip := @ToNumber(@If(From = "CN=Ruhail M Tromboo/OU=AER/OU=EXT/O=AEP"; 133; From = "CN=FistName N Reddy/OU=NonAEP/OU=TRS/O=AEP"; 133; From = "CN=Katia O Rough/OU=AER/OU=TRS/O=AEP"; 133; From = "CN=Iliana D Lasrme/OU=AER/OU=TRS/O=AEP"; 133 ; 0 ));
REM {This icon formula is used in ($Inbox) folder, (MailThreads) view, and ($All) view};
CSisPrivate := @If(@IsUnavailable($PublicAccess) & @IsAvailable($CSVersion);"1";"0");
isImportant := @If(Importance="1";"1";"0");
ViewIcon2 := @If(_ViewIcon = 158 & AppointmentType != "1" & BookFreeTime = "1"; 12; _ViewIcon);
tmpIcon := @If(ExpireDate !="" ;64;displaycopyto_icon = "1";"sentto.gif";
@If(DeliveredDate = "";
@If(PostedDate="" | @IsUnavailable(PostedDate);
@If(@IsAvailable(IsMailStationery);
21;
@IsAvailable(_ViewIcon);
ViewIcon2;
58);
@If(IsImportant="1";
224;
222));
@IsAvailable(_ViewIcon);
ViewIcon2;
$TypeIcon));
REM; "If the Task has no icon, display the invitation icon - backward compatibility";
varTaskIcon := @If(Form = "Task" & (!@IsAvailable(_ViewIcon) | ViewIcon2 = "") & (!@IsAvailable(_ViewIcon2) | ViewIcon2 = ""); @False; @True);
REM; "If the Task has replied icon, display the icon - backward compatibility";
rfNum := @Text($RespondedTo);
@If(rfNum = ""; 0; rfNum );
iconOne := @If(!varTaskIcon; 133; _ViewIcon=6;105; @If(tmpIcon = ""; 0; tmpIcon));
iconTwo := @If(_ViewIcon=6;150;iconOne=224;0;iconOne=178;0;iconOne=179;0;iconOne=180;0;CSisPrivate="1"; 164; isImportant="1"; 150; 0);
iconThree:=@If(_ViewIcon=6;163; AddressableUsers = "0" ; 30; PersonVip=133 ; 249; tmpvar);
hasReturnReceipt := @If(ReturnReceipt="1";0;255);
hasReturnReceipt:hasReturnReceipt:hasReturnReceipt : iconOne:iconTwo:iconThree
Resources
Lotus Support
Wikis
Lotus Forums