Sub PrependToArray( vArray As Variant, vNewValue As Variant )
' eg ... given vArray = 1,2,3,4
' vNewValue = 99
' returns 99,1,2,3,4
' The is returned in the vArray itself
%REM
' Sample call - Copy this bit to the initialize sub ========================
Dim strPreopleNamesArr(0 To 1) As String ' NOTE THAT Dim will not work, you will get an error Illegal REDIM of fixed array
strPreopleNamesArr(0) = "Mary" ' use REDIM and it works fine
strPreopleNamesArr(1) = "Jane"
Call PrependToArray( strPreopleNamesArr, "John" ) ' put the new value at the start
Print Join(strPreopleNamesArr, ", ")
' End Sample call - End of copy to initialize ===== =========================
%ENDREM
' Move all the values by 1 then add the new value at the front
Dim intIndex As Integer
Redim Preserve vArray(Ubound(vArray)+1)
For intIndex = Ubound(vArray) To 1 Step -1
vArray(intIndex)=vArray(intIndex-1)
Next
vArray(0) = vNewValue
End Sub
Posts from a Lotus Notes Client and Domino programmer from Sydney.
Thursday, 6 March 2008
Tuesday, 12 February 2008
Lotus Notes View - All By Date Cat for Mail
<?xml
version="1.0" encoding="utf-8" ?>
<!DOCTYPE view
(View Source for full doctype...)>
- <view name="ATK Mail
All By Date Cat" xmlns="http://www.lotus.com/dxl" version="7.0"
maintenanceversion="2.0" replicaid="802573540034959E"
showinmenu="false" noreplace="true" publicaccess="false"
designerversion="7" unreadmarks="none" onopengoto="lastopened"
onrefresh="displayindicator" headers="simple"
opencollapsed="false" showresponsehierarchy="false"
showmargin="true" shrinkrows="false" extendlastcolumn="false"
unreadcolor="black" rowlinecount="1" headerlinecount="1"
rowspacing="1" bgcolor="white" totalscolor="black"
headerbgcolor="#c0e1ff" boldunreadrows="false"
evaluateactions="false" allownewdocuments="false"
allowcustomizations="true" hidemarginborder="false"
marginwidth="0px" marginbgcolor="white" uniquekeys="false"
useapplet="false" treatashtml="false" default="false"
private="false" defaultdesign="false" allowdocselection="false"
colorizeicons="false" direction="lefttoright"
indexrefresh="autofirstuse" indexdiscard="inactive45days"
noviewformat="false" type="standard">
- <noteinfo noteid="1de" unid="5EB72AE1874C0355802573ED003DC594" sequence="3">
- <created>
<datetime dst="false">20080212T111442,76+00</datetime>
</created>
- <modified>
<datetime dst="false">20080212T111520,32+00</datetime>
</modified>
- <revised>
<datetime dst="false">20080212T111520,31+00</datetime>
</revised>
- <lastaccessed>
<datetime dst="false">20080212T111543,66+00</datetime>
</lastaccessed>
- <addedtofile>
<datetime dst="false">20080212T111442,81+00</datetime>
</addedtofile>
</noteinfo>
- <updatedby>
<name>CN=Anthony Kendrick/OU=UK/OU=GTS/O=PwC</name>
</updatedby>
- <wassignedby>
<name>CN=Anthony Kendrick/OU=UK/OU=GTS/O=PwC</name>
</wassignedby>
- <code event="selection">
<formula>@IsNotMember("A"; ExcludeFromView) & IsMailStationery != 1 &
Form != "Group" & Form != "Person"</formula>
</code>
- <column itemname="$Sender1"
width="14.3750" resizable="true" separatemultiplevalues="false"
sortnoaccent="false" sortnocase="true"
showaslinks="false" showascolor="true" userdefinable="true"
profiledocname="ColorProfile" hidden="true"
align="left" showasicons="false" responsesonly="false"
twisties="false" categorized="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="ColorColumn(Hidden)"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<datetimeformat show="datetime" date="yearmonthday"
time="hourminutesecond" zone="never"
dateformat="weekdaymonthdayyear" dayformat="twodigitday"
monthformat="twodigitmonth" yearformat="fourdigityear"
weekdayformat="shortname" dateseparator1=""
dateseparator2="/" dateseparator3="/" timeseparator=":"
showtodaywhenappropriate="false" fourdigityear="false"
fourdigityearfor21stcentury="false" omitthisyear="false"
timeformat24="false" />
<numberformat format="fixed" digits="0" punctuated="false"
parens="false" percent="false" />
- <code event="value">
<formula>@UserName</formula>
</code>
</column>
- <column sort="descending"
resort="descending" listseparator="comma" itemname="$116"
width="1"
resizable="true" separatemultiplevalues="true" sortnoaccent="true"
sortnocase="true" flatinr5="false" showaslinks="false"
categorized="true" twisties="true" align="left"
showasicons="false" responsesonly="false" hidden="false"
showascolor="false" userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Date"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<datetimeformat show="date" date="yearmonthday" fourdigityear="true"
time="hourminute" zone="never" dateformat="weekdaymonthdayyear"
dayformat="twodigitday" monthformat="twodigitmonth"
yearformat="twodigityear" weekdayformat="shortname"
dateseparator1="" dateseparator2="/" dateseparator3="/"
timeseparator=":" showtodaywhenappropriate="false" fourdigityearfor21stcentury="false"
omitthisyear="false" timeformat24="false" />
<numberformat format="general" digits="2" punctuated="false"
parens="false" percent="false" />
- <code event="value">
<formula>dtDate:=@Date(@If(DeliveredDate != ""; DeliveredDate; PostedDate != "";
PostedDate; @Created)); strMonth := @Text(@Month(dtDate)); strMonth :=
@If(@Length(strMonth)=1; "0" + strMonth; strMonth); @Text(@Year(dtDate)) + " " +
strMonth</formula>
</code>
</column>
- <column sort="descending"
resort="descending" listseparator="comma" itemname="$115"
width="1"
resizable="true" separatemultiplevalues="true" sortnoaccent="true"
sortnocase="true" flatinr5="false" showaslinks="false"
categorized="true" twisties="true" align="left"
showasicons="false" responsesonly="false" hidden="false"
showascolor="false" userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Date"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<datetimeformat show="date" date="yearmonthday" fourdigityear="true"
time="hourminute" zone="never" dateformat="weekdaymonthdayyear"
dayformat="twodigitday" monthformat="twodigitmonth"
yearformat="twodigityear" weekdayformat="shortname"
dateseparator1="" dateseparator2="/" dateseparator3="/"
timeseparator=":" showtodaywhenappropriate="false" fourdigityearfor21stcentury="false"
omitthisyear="false" timeformat24="false" />
<numberformat format="general" digits="2" punctuated="false"
parens="false" percent="false" />
- <code event="value">
<formula>@Date(@If(DeliveredDate != ""; DeliveredDate; PostedDate != "";
PostedDate; @Created))</formula>
</code>
</column>
- <column align="center"
resort="ascending" resort2="descending" resort2column="14"
itemname="$109" width="1.5000" resizable="true"
separatemultiplevalues="false" sortnoaccent="true"
sortnocase="true" showaslinks="false" hidecolumntitle="true"
hideinr5="true" hidden="true" showasicons="true"
responsesonly="false" twisties="false"
categorized="false" showascolor="false" userdefinable="false"
readingorder="lefttoright">
- <columnheader align="left"
readingorder="lefttoright">
<font size="9pt" />
</columnheader>
<datetimeformat show="datetime" date="yearmonthday"
fourdigityearfor21stcentury="true" time="hourminutesecond"
zone="never" dateformat="weekdaymonthdayyear" dayformat="twodigitday"
monthformat="twodigitmonth" yearformat="fourdigityear"
weekdayformat="shortname" dateseparator1=""
dateseparator2="/" dateseparator3="/" timeseparator=":"
showtodaywhenappropriate="false" fourdigityear="false"
omitthisyear="false" timeformat24="false" />
<numberformat format="general" digits="varying"
punctuated="false" parens="false" percent="false" />
- <code event="value">
<formula>REM {DNT}; nFollowUpSet :=
@If(@IsAvailable(FollowUpStatus);@TextToNumber(FollowUpStatus);
!@IsAvailable(FollowUpStatus) & @IsAvailable(FollowUpDate) &
FollowUpDate != ""; 2; 0); nPriority := @Text(nfollowupset);
@If(@IsError(nFollowUpSet); ""; nFollowUpSet = 0; ""; nFollowUpSet = 1; 181;
nFollowUpSet = 2; 182; nFollowUpSet = 3; 183; "")</formula>
</code>
- <code event="hidewhen">
<formula>REM { Test if this is version 6.1 of Notes and 6.1 of the template};
OkToShow := @If(@Version < @Text(192); 0; @HasFeature("650Lic"); 1; 0);
OkToShow != 1 | @IsError(OkToShow)</formula>
</code>
</column>
- <column align="center"
listseparator="comma" itemname="$93"
width="3"
resizable="false" separatemultiplevalues="false" sortnoaccent="true"
sortnocase="true" showaslinks="false" showasicons="true"
responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader align="left"
readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<numberformat format="general" digits="varying"
punctuated="true" parens="false" percent="true" />
- <code event="value">
<formula>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"; 124; 122));
@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); iconOne :=
@If(!varTaskIcon; 133; @If(tmpIcon = ""; 0; tmpIcon)); iconTwo :=
@If(iconOne=124;0;CSisPrivate="1"; 164; isImportant="1"; 150; 0);
iconOne:iconTwo</formula>
</code>
</column>
- <column itemname="$114"
width="2"
resizable="true" separatemultiplevalues="false" sortnoaccent="false"
sortnocase="true" showaslinks="false" showasicons="true"
align="left" responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
- <columnheader align="left"
readingorder="lefttoright">
<font size="9pt"
style="bold" />
</columnheader>
- <code event="value">
<formula>@If(FiledToDMS="1";2;0)</formula>
</code>
</column>
- <column itemname="SametimeInfo"
width="10"
resizable="true" separatemultiplevalues="false" sortnoaccent="false"
sortnocase="true" showaslinks="false" hidden="true"
align="left" showasicons="false" responsesonly="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
- <columnheader title="SametimeInfo"
align="left" readingorder="lefttoright">
<font size="9pt" />
</columnheader>
- <code event="value">
<formula>SentBy := @If(Principal = ""; From; Principal); Attendees :=
@Trim(RequiredAttendees : OptionalAttendees); Who := @If(DeliveredDate != "";
SentBy; @Elements(Attendees) > 0; @Subset(Attendees; 1); SendTo = ""; SentBy;
@Subset(SendTo; 1)); CN1 := @Trim(@Name([Abbreviate]; Who)); CN :=
@If(@Contains(@Right(Who;"@");">") & CN1="";@Trim(Who);CN1); G := @If(CN
= ""; @Trim(@Name([G]; Who)); ""); S := @If(CN = ""; @Trim(@Name([S]; Who));
""); Person := @If(CN != ""; CN; G != ""; G + " " + S; S != ""; S;
@Trim(X400FreeForm)); Person2 := @If(@Left(Person;1)="\"" &
@Right(Person;1)="\""; @LeftBack(@RightBack(Person;1);1); Person); @If(Form =
"Delivery Report" : "NonDelivery Report" : "Trace Report" : "Quota Report";
"Mail Router"; Person2)</formula>
</code>
</column>
- <column resort="ascending"
resort2="descending" resort2column="14"
listseparator="comma" itemname="$102"
width="10"
resizable="true" separatemultiplevalues="false" sortnoaccent="true"
sortnocase="true" showaslinks="false" align="left"
showasicons="false" responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Who"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<numberformat format="general" digits="varying"
punctuated="false" parens="false" percent="false" />
<columnnamesformat showonline="true" columncontainsname="true"
columnname="SametimeInfo" verticalorientation="top" />
- <code event="value">
<formula>SentBy := @If(Principal = ""; From; Principal); Attendees :=
@Trim(RequiredAttendees : OptionalAttendees); Who := @If(DeliveredDate != "";
SentBy; @Elements(Attendees) > 0; @Subset(Attendees; 1); SendTo = ""; SentBy;
@Subset(SendTo; 1)); CN1 := @Trim(@Name([CN]; Who)); CN :=
@If(@Contains(@Right(Who;"@");">") & CN1="";@Trim(Who);CN1); G := @If(CN
= ""; @Trim(@Name([G]; Who)); ""); S := @If(CN = ""; @Trim(@Name([S]; Who));
""); Person := @If(CN != ""; CN; G != ""; G + " " + S; S != ""; S;
@Trim(X400FreeForm)); Person2 := @If(@Left(Person;1)="\"" &
@Right(Person;1)="\""; @LeftBack(@RightBack(Person;1);1); Person); @If(Form =
"Delivery Report" : "NonDelivery Report" : "Trace Report" : "Quota Report" ;
"Mail Router"; Person2)</formula>
</code>
- <code event="hidewhen">
<formula>TemplateLang := "en"; @If(@ClientType = "Notes";
@LocationGetInfo([NamePreference]) = "1"; @False)</formula>
</code>
</column>
- <column resort="ascending"
resort2="descending" resort2column="14"
listseparator="comma" itemname="$107"
width="10"
resizable="true" separatemultiplevalues="false" sortnoaccent="true"
sortnocase="true" showaslinks="false" hideinr5="true"
hidden="true" align="left" showasicons="false"
responsesonly="false" twisties="false"
categorized="false" showascolor="false" userdefinable="false"
hidecolumntitle="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Who"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<numberformat format="general" digits="varying"
punctuated="false" parens="false" percent="false" />
<columnnamesformat showonline="true" columncontainsname="true"
columnname="SametimeInfo" verticalorientation="top" />
- <code event="value">
<formula>REM {This column is an alternative column for alternate names}; REM
{The variable TemplateLang should much the language of the template.}; REM {For
example, en for English, de for German, and ja for Japanese.}; REM {The variable
in the hide column when formula in both Who columns should be same.};
TemplateLang := "en"; bUseAltName := @IsMember($LangFrom; TemplateLang);
bUseAltPrincipal := @IsMember($LangPrincipal; TemplateLang); bUseAltSendTo :=
@IsMember($NameLanguageTags; TemplateLang); tmpFrom := @If(bUseAltName &
(AltFrom != "") & (AltFrom != From); AltFrom; From); tmpPrincipal :=
@If(bUseAltPrincipal & ($AltPrincipal != "") & ($AltPrincipal !=
Principal); $AltPrincipal; Principal); tmpSendTo := @If(bUseAltSendTo &
(@Elements(AltSendTo) > 0) & (AltSendTo != SendTo); AltSendTo; SendTo);
SentBy := @If((Principal = "") | (Principal = From); tmpFrom; tmpPrincipal);
Attendees := @Trim(RequiredAttendees : OptionalAttendees); Who :=
@If(DeliveredDate != ""; SentBy; @Elements(Attendees) > 0; @Subset(Attendees;
1); SendTo = ""; SentBy; @Subset(tmpSendTo; 1)); CN1 := @Trim(@Name([CN]; Who));
CN := @If(@Contains(@Right(Who;"@");">") & CN1="";@Trim(Who);CN1); G :=
@If(CN = ""; @Trim(@Name([G]; Who)); ""); S := @If(CN = ""; @Trim(@Name([S];
Who)); ""); Person := @If(CN != ""; CN; G != ""; G + " " + S; S != ""; S;
@Trim(X400FreeForm)); Person2 := @If(@Left(Person;1)="\"" &
@Right(Person;1)="\""; @LeftBack(@RightBack(Person;1);1); Person); @If(Form =
"Delivery Report" : "NonDelivery Report" : "Trace Report" : "Quota Report" ;
"Mail Router"; Person2)</formula>
</code>
- <code event="hidewhen">
<formula>TemplateLang := "en"; @If(@ClientType = "Notes";
@LocationGetInfo([NamePreference]) != "1"; @True)</formula>
</code>
</column>
- <column resort="ascending"
itemname="$111" width="1.3750" resizable="true"
separatemultiplevalues="false" sortnoaccent="false"
sortnocase="true" showaslinks="false" hidecolumntitle="true"
showasicons="true" align="left" responsesonly="false"
hidden="false" twisties="false" categorized="false"
showascolor="false" userdefinable="false" hideinr5="false"
readingorder="lefttoright">
- <columnheader align="left"
readingorder="lefttoright">
<font size="9pt" />
</columnheader>
<numberformat format="general" digits="varying"
punctuated="false" parens="false" percent="false" />
- <code event="value">
<formula>rfNum := @Text($RespondedTo); @If(rfNum = "1"; 178; rfNum = "2"; 179;
rfNum = "3"; 180; "")</formula>
</code>
</column>
- <column sort="ascending"
resort="descending" listseparator="comma" itemname="$68"
width="8"
resizable="true" separatemultiplevalues="false" sortnoaccent="true"
sortnocase="true" showaslinks="false" align="left"
showasicons="false" responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Date"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<datetimeformat show="date" date="yearmonthday" fourdigityear="true"
time="hourminute" zone="never" dateformat="weekdaymonthdayyear"
dayformat="twodigitday" monthformat="twodigitmonth"
yearformat="twodigityear" weekdayformat="shortname"
dateseparator1="" dateseparator2="/" dateseparator3="/"
timeseparator=":" showtodaywhenappropriate="false" fourdigityearfor21stcentury="false"
omitthisyear="false" timeformat24="false" />
<numberformat format="general" digits="2" punctuated="false"
parens="false" percent="false" />
- <code event="value">
<formula>@If(DeliveredDate != ""; DeliveredDate; PostedDate != ""; PostedDate;
@Created)</formula>
</code>
</column>
- <column align="right"
sort="ascending" resort="descending" itemname="$106"
width="5.6250" resizable="true" separatemultiplevalues="false"
sortnoaccent="true" sortnocase="true" showaslinks="false"
showasicons="false" responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Size"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
<datetimeformat show="datetime" date="yearmonthday"
time="hourminutesecond" zone="never"
dateformat="weekdaymonthdayyear" dayformat="twodigitday"
monthformat="twodigitmonth" yearformat="twodigityear"
weekdayformat="shortname" dateseparator1=""
dateseparator2="/" dateseparator3="/" timeseparator=":"
showtodaywhenappropriate="false" fourdigityear="false"
fourdigityearfor21stcentury="false" omitthisyear="false"
timeformat24="false" />
<numberformat format="general" digits="varying"
punctuated="true" parens="false" percent="false" />
- <code event="value">
<formula>@If( @IsDocTruncated; @If(@TextToNumber(@Version) < 172; @DocLength;
@DocOmittedLength + @DocLength); @DocLength)</formula>
</code>
</column>
- <column align="center"
itemname="$105" width="2" resizable="false" separatemultiplevalues="false"
sortnoaccent="true" sortnocase="true" showaslinks="false"
showasicons="true" responsesonly="false" hidden="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader align="left"
readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
- <code event="value">
<formula>@If(@TextToNumber(@Version) > 122; @If(@IsAvailable(_ViewIcon2);
_ViewIcon2; @Contains(@LowerCase(@AttachmentNames); "smime.p7s"); 12;
@Contains(@LowerCase(@AttachmentNames); "smime.p7m"); 61; @IsDocTruncated; 30;
@IsAvailable($ContentIcon); $ContentIcon; (@Contains(@LowerCase(From); " pager
") | @Contains(@LowerCase(SendTo); " pager ")); 46; @Attachments;
@If(@Contains(@LowerCase(@AttachmentNames); "message.wav" : "vmsg_hdr.wav"); 44;
@Contains(@LowerCase(@AttachmentNames); ".wav"); 15;
@Contains(@LowerCase(@AttachmentNames); ".tif"); 47; 5); 0);
@IsAvailable($ContentIcon); $ContentIcon; @Attachments; 5; 0)</formula>
</code>
</column>
- <column itemname="$74"
width="49.2500" resizable="true" separatemultiplevalues="false"
sortnoaccent="true" sortnocase="true" showaslinks="false"
align="left" showasicons="false" responsesonly="false"
hidden="false" twisties="false" categorized="false"
showascolor="false" userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
<font size="9pt" />
- <columnheader title="Subject"
align="left" readingorder="lefttoright">
<font size="9pt" name="multilingual"
/>
</columnheader>
- <code event="value">
<formula>@If( form = "NonDelivery Report" & (!@IsAvailable(SMTPDSNType) |
SMTPDSNType = "0"); "DELIVERY FAILURE: " + FailureReason; form = "NonDelivery
Report" & @IsAvailable(SMTPDSNType) & SMPTDSNType != "0"; "DELIVERY
NOTIFICATION: " + FailureReason; Form = "Delivery Report"; "DELIVERED: " +
Subject; Form = "Return Receipt"; "RECEIVED: " + Subject; Form =
"ReturnNonReceipt"; "NOT RECEIVED: " + Subject; Subject)</formula>
</code>
</column>
- <column itemname="$113"
width="10"
resizable="true" separatemultiplevalues="false" sortnoaccent="false"
sortnocase="true" showaslinks="false" hidden="true"
align="left" showasicons="false" responsesonly="false"
twisties="false" categorized="false" showascolor="false"
userdefinable="false" hidecolumntitle="false"
hideinr5="false" readingorder="lefttoright">
- <columnheader title="$ExchangeMigRequireAddrFixUp" align="left" readingorder="lefttoright">
<font size="9pt"
style="bold" />
</columnheader>
- <code event="value">
<formula>@If( @IsAvailable($ExchangeMigRequireNameFixup);
$ExchangeMigRequireNameFixup; "2")</formula>
</code>
</column>
- <item name="$FormatNote"
summary="true" sign="false" seal="false"
sealed="false" authors="false" names="false"
readers="false" placeholder="false">
<rawitemdata
type="4">AQDLtLkShfEiYdlTXAC0cyWA</rawitemdata>
</item>
</view>
Monday, 10 December 2007
My on Error in LotusScript Agents
ExitNow:
Exit Sub
HandleError:
Dim strNewLineChar As String
Dim atkDb As NotesDatabase
Dim atkSession As New NotesSession()
Dim strErrMessage As String
strNewLineChar = Chr(13) + Chr(10)
If Not atkSession.CurrentAgent Is Nothing Then
strErrMessage = strErrMessage + "While running the agent named ["+_
atkSession.CurrentAgent.Name +"]" + strNewLineChar
strErrMessage = strErrMessage + " under the username ["+_
atkSession.CurrentAgent.OnBehalfOf +"]" + strNewLineChar
strNewLineChar = strNewLineChar + "
"
End If
strErrMessage = strErrMessage + "There has been an error encountered in the database with the title [" + _
atkSession.CurrentDatabase.Title + "]" + strNewLineChar + " on the server [" + _
atkSession.CurrentDatabase.Server + "] at the file location [" +_
atkSession.CurrentDatabase.FilePath + "]" + strNewLineChar
strErrMessage = strErrMessage + "The session username is ["+_
atkSession.username +"]" + strNewLineChar
strErrMessage = strErrMessage + "The error occurred at " + strNewLineChar + _
"Line number "+ Cstr(Erl) + strNewLineChar + _ ' Current line number (in the LS source)
"Function Name " + Lsi_info(2) + strNewLineChar + _ ' The current function or sub
"Module " + Lsi_info(3) + strNewLineChar + _ ' The current module
"Caller function: " + Lsi_info(12) + strNewLineChar +_ ' The name of the function that called this one, "the caller"
"The error code is " + Cstr(Err) + strNewLineChar +_
"The error message is " + Cstr(Error)
Print strErrMessage
Goto ExitNow
End Sub
provided by Julian Robichaux at nsftools.com.
| Name | Description | Type |
|---|---|---|
| Err | Numeric error code | integer |
| Error | Error text | string |
| GetThreadInfo(LSI_THREAD_LINE) | Current line number | variant |
| GetThreadInfo(LSI_THREAD_PROC) | Current procedure | variant |
| GetThreadInfo(LSI_THREAD_MODULE) | Current module | variant* |
| GetThreadInfo(LSI_THREAD_VERSION) | Lotusscript version | variant |
| GetThreadInfo(LSI_THREAD_LANGUAGE) | Language setting | variant |
| GetThreadInfo(LSI_THREAD_COUNTRY) | Country/Region setting | variant |
| GetThreadInfo(LSI_THREAD_TICKS) | Current clock ticks | variant |
| GetThreadInfo(LSI_THREAD_TICKS_PER_SEC) | Clock ticks per second | variant |
| GetThreadInfo(LSI_THREAD_PROCESS_ID) | Current process ID | variant |
| GetThreadInfo(LSI_THREAD_TASK_ID) | Current task ID | variant |
| GetThreadInfo(LSI_THREAD_CALLPROC) | Calling procedure | variant |
| GetThreadInfo(LSI_THREAD_CALLMODULE) | Calling module | variant |
| Lsi_info(1) | Current line number | string |
| Lsi_info(2) | Current procedure | string |
| Lsi_info(3) | Current module | string |
| Lsi_info(6) | Lotusscript version | string |
| Lsi_info(9) | Language setting | string |
| Lsi_info(12) | Calling procedure | string |
| Lsi_info(50) | LS memory allocated | string |
| Lsi_info(51) | OS memory allocated | string |
| Lsi_info(52) | LS blocks used | string |
* = this call returns a hex code, not the module name
Note:To use the GetThreadInfo constants, you must include LSPRVAL.LSS, which is automatically included through LSCONST.LSS
Wednesday, 10 October 2007
IBM/Lenovo Laptop Beeps. Very Loud.
IBM/Lenovo Laptop Beeps. Very Loud.
These beeps come from 3 places. Do not try to recreate these wearing headphones as it might hurt your ears.
1. Pressing 3 keys at once
2. Battery related beep
3. Changing volume beep.
All three can be disabled.
1. Press Function and Backspace
2. Modify in the Battery settings
Power Manager, then Global Power Settings tab, and deselect “Beep on power state changes.”
3. Open Thinkpad configuration and disable the beep after selecting audio properties, bottom left. Alternatively, in control panel, find the device manager, show hidden devices, in the Non-plug and play list disable the one named Beep.
Information from here
http://www.lenovoblogs.com/insidethebox/?p=42
These beeps come from 3 places. Do not try to recreate these wearing headphones as it might hurt your ears.
1. Pressing 3 keys at once
2. Battery related beep
3. Changing volume beep.
All three can be disabled.
1. Press Function and Backspace
2. Modify in the Battery settings
Power Manager, then Global Power Settings tab, and deselect “Beep on power state changes.”
3. Open Thinkpad configuration and disable the beep after selecting audio properties, bottom left. Alternatively, in control panel, find the device manager, show hidden devices, in the Non-plug and play list disable the one named Beep.
Information from here
http://www.lenovoblogs.com/insidethebox/?p=42
Thursday, 30 August 2007
RightBack
Option Compare Text
Function RightBack(strBigString As String, strSmallString As String) As String
' Finds the text after a string
' eg =RightBack( "I love life and other stuff, do you", "," ) returns " do you"
Dim lngIndexOf As Long
lngIndexOf = InStrRev(strBigString, strSmallString)
If lngIndexOf = 0 Then
strRightBack = ""
Else
strRightBack = Mid(strBigString, lngIndexOf + 1)
End If ' we found one instance
RightBack = strRightBack
End Function
Function InStrRev2(strBigString As String, strSmallString As String) As Long
InStrRev2 = InStrRev(strBigString, strSmallString)
End Function
http://www.ozgrid.com/Excel/find-nth.htm
Function RightBack(strBigString As String, strSmallString As String) As String
' Finds the text after a string
' eg =RightBack( "I love life and other stuff, do you", "," ) returns " do you"
Dim lngIndexOf As Long
lngIndexOf = InStrRev(strBigString, strSmallString)
If lngIndexOf = 0 Then
strRightBack = ""
Else
strRightBack = Mid(strBigString, lngIndexOf + 1)
End If ' we found one instance
RightBack = strRightBack
End Function
Function InStrRev2(strBigString As String, strSmallString As String) As Long
InStrRev2 = InStrRev(strBigString, strSmallString)
End Function
http://www.ozgrid.com/Excel/find-nth.htm
Subscribe to:
Posts (Atom)