Submit a Code Fragment... Submit a Code Fragment...

Previous Next Expand Collapse Search
NameLink to viewDescriptionTypeLink to viewSourceLink to view
1
Hide details for 01/15/202301/15/2023
Anonymous
1
Hide details for 01/12/202301/12/2023
Anonymous
2
Hide details for 01/11/202301/11/2023
Anonymous
Anonymous
1
Hide details for 04/28/202004/28/2020
Anonymous
1
Hide details for 03/10/202003/10/2020
Anonymous
1
Hide details for 01/25/202001/25/2020
Anonymous
1
Hide details for 12/10/201912/10/2019
Anonymous
1
Hide details for 10/26/201910/26/2019
Anonymous
1
Hide details for 10/08/201910/08/2019
Anonymous
1
Hide details for 09/28/201909/28/2019
Anonymous
1
Hide details for 09/02/201909/02/2019
Anonymous
3
Hide details for 07/19/201907/19/2019
APIAnonymous
APILotusScriptAnonymous
APIAPI LotusScriptAnonymous
1
Hide details for 06/21/201906/21/2019
Anonymous
1
Hide details for 04/06/201904/06/2019
Anonymous
1
Hide details for 02/20/201902/20/2019
Anonymous
1
Hide details for 02/05/201902/05/2019
Anonymous
1
Hide details for 05/31/201605/31/2016
asPyncb6s7ig<a href=http://avodart.link/>avodart</a> <a href=http://clindamycingel.eu/>clindamycin gel price</a> <a href=http://buy-robaxin.in.net/>robaxin cost</a> <a href=http://bupropion.site/>bupropion tablets</a> <a href=http://buy-sildalis.trade/>generic sildalis</a> Anonymous
1
Hide details for 04/26/201604/26/2016
asPyncqe8gmrhttp://buyalli.date/ - price of alli http://buy-cephalexin.accountant/ - buy cephalexin 250 mg http://buyarimidex.top/ - where to buy arimidex http://buypropranolol.racing/ - buy propranolol online http://buy-albendazole.science/ - albendazole http://levitra-20-mg.eu/ - levitra 20 mg http://amoxil.site/ - amoxil Anonymous
2
Hide details for 02/25/201602/25/2016
xrawqko3RqfM9 <a href="http://foxqicuojbar.com/">foxqicuojbar</a>, [url=http://rugpphkcromr.com/]rugpphkcromr[/url], [link=http://zprymmyrjnft.com/]zprymmyrjnft[/link], http://kemlphfxqfxr.com/ActiveX/OCX/OLE,Graphics,SQLAnonymous
Anonymous
2
Hide details for 03/04/201503/04/2015
cuqxuabkqpnsl <a href="http://ahhhyieehvbo.com/">ahhhyieehvbo</a>, [url=http://laubhwvnapug.com/]laubhwvnapug[/url], [link=http://pvgtilmrbzat.com/]pvgtilmrbzat[/link], http://wjapxtymshuq.com/Formula,HTML,JavaScript,ActiveX/OCX/OLEAnonymous
Anonymous
2
Hide details for 11/02/201411/02/2014
voxqtishhHH69YV <a href="http://gqfsgqfqlsnx.com/">gqfsgqfqlsnx</a>, [url=http://jhwrhornaown.com/]jhwrhornaown[/url], [link=http://fvnqhajnjakl.com/]fvnqhajnjakl[/link], http://lzrueecqicro.com/LotusScript,HTML,JavaScript,Java,ActiveX/OCX/OLEAnonymous
Anonymous
1
Hide details for 07/31/201307/31/2013
Anonymous
1
Hide details for 06/29/201306/29/2013
Anonymous
1
Hide details for 05/30/201305/30/2013
Anonymous
1
Hide details for 05/01/201305/01/2013
Anonymous
1
Hide details for 04/12/201304/12/2013
Anonymous
1
Hide details for 04/05/201304/05/2013
Anonymous
1
Hide details for 02/27/201302/27/2013
Anonymous
2
Hide details for 11/21/201211/21/2012
ReneReview by Jeffrey K. White for Rating: This book could be useful if the eaxeplms actually worked. I have barely reached the 50th page and all ready I have found more errors than should be allowed in an entire book. The eaxeplms are mis-quoted and several don't work. The book might be more helpful if the proof reader knew enough on the subject to correct the more obvious errors. If you buy this book be ready to experiment with the syntax which may be close but not always correct.Formula,JavaScript,Java Applet,GraphicsAnonymous
Anonymous
1
Hide details for 10/27/200910/27/2009
getFirstChildElementJavaScriptAnonymous
1
Hide details for 08/29/200808/29/2008
Anonymous
11
Hide details for 09/04/200709/04/2007
HTMLAnonymous
SQLAnonymous
LotusScriptAnonymous
GraphicsAnonymous
JavaAnonymous
Java+AppletAnonymous
JavaScriptAnonymous
FormulaAnonymous
C/C++Anonymous
ActiveX/OCX/OLEAnonymous
Text/Keywords</select></font></td><td+widthAnonymous
1
Hide details for 10/15/200610/15/2006
Anonymous
1
Hide details for 10/12/200610/12/2006
Anonymous
1
Hide details for 05/05/200605/05/2006
Anonymous
2
Hide details for 04/08/200504/08/2005
Anonymous
Anonymous
1
Hide details for 10/19/200410/19/2004
LotusScriptAnonymous
1
Hide details for 03/09/200403/09/2004
Next PaydayCalculates the next payday based on bi weekly pay on ThursdaysFormulapatcote1@airmail.net
11
Hide details for 02/03/200402/03/2004
GraphicsAnonymous
Text/Keywords</select></font></td><td+widthAnonymous
FormulaAnonymous
LotusScriptAnonymous
JavaAnonymous
C/C++Anonymous
SQLAnonymous
ActiveX/OCX/OLEAnonymous
JavaScriptAnonymous
HTMLAnonymous
Java+AppletAnonymous
2
Hide details for 02/07/200302/07/2003
aaSsSAsaSFormulaAnonymous
aaSsSAsaSFormulaAnonymous
1
Hide details for 09/13/200209/13/2002
Prevent large attachmentsSince I couldn't prevent a person from attaching a large file before the document is saved,
I ended up putting this code into the PostSave event. I say, let the person save the doc,
then interrogate the data, and if the file is too large, oh well, see ya..... I give them
a message. I found that I have to close the UI instead of allowing users to stay in edit
mode, as there's some residual pointer left over. Sometimes the pointer or image
shows up as if there is an attachment, but errs out when you click on it. This also takes
into account multiple attachments, and removes only the ones that are over the limit.
Enjoy, Keith Blankenship
LotusScriptk1blankenship@charter.net
1
Hide details for 09/10/200209/10/2002
WordJust like @wordLotusScriptmni
1
Hide details for 07/20/200207/20/2002
Picklist from a ViewReplace with a field name where i put * and add you server . db and view & message . its should work . its handy to pull from NAB or a Company phone directory for workorders or helpdesk ticketPalmi Lord
1
Hide details for 07/09/200207/09/2002
2nd last business dayGets the 2nd last business day of the month - of course, it can be mod'dFormulaGerry Audette
1
Hide details for 06/08/200206/08/2002
export to textExports a view to a textfile which can be used in ExcelLotusScriptbrigitte
1
Hide details for 05/10/200205/10/2002
File Import Agentimports attachments at onceLotusScriptkamil.isik@domco.de
1
Hide details for 03/12/200203/12/2002
Error 4000Notes Error.No mail sent.LotusScriptAnonymous
1
Hide details for 02/01/200202/01/2002
Random Password GeneratorThis button code can be placed in your Journal or any view. It randomly proposes a password. If you select 'Yes' it is saved to your ini file. If 'No' then the password is dicarded.Formulawade_meyer@dominomail.com
1
Hide details for 01/21/200201/21/2002
Change all scheduled Agents to Run on different Server nameR5 - Administrator Assist
Moved/replicated countless databases from old servers to new. Servers were named differently. Had to fix all scheduled agent to set correctly to run on new server.
LotusScriptSuzy@viperss.com
3
Hide details for 12/31/200112/31/2001
Copy ACLLotusScriptAnonymous
killDominoC/C++Anonymous
Meta Tag DemoFormula,JavaScriptAnonymous
1
Hide details for 12/29/200112/29/2001
generic @Replacethis function @Replace all list elements starting with given prefixFormulazp@arcor.de
1
Hide details for 12/17/200112/17/2001
Force British Date FormatSometimes a client/server will work to the American date format even though the regional settings are set to British.
This function will convert any date format to the British format(as a string)
LotusScriptguy@soberskin.co.uk
1
Hide details for 10/01/200110/01/2001
getQualifiedHostName(serverName)Given a serverName, finds the server doc and returns the HTTP_HostName field for use in the prefix to any URL related to that server.LotusScriptJamie Magee
2
Hide details for 09/21/200109/21/2001
Array functions - complete set68 functions for sorting, searching, hashing, moving, copying, adding, deleting arraysLotusScripthttp://philippe.lord.md/
dates comparisonsJust a tip to compare 2 dates in lotusScriptLotusScriptFrancois
1
Hide details for 09/18/200109/18/2001
Format date dd th mmm , yyyyThis code segment will format the current date in to "DD th MMMM , YYYY"
format. EX "31 st may , 2001"
Formulaudarap@www.com
1
Hide details for 09/08/200109/08/2001
hit counterDomino servers die native Notes hit counterFormula,LotusScript,HTMLAnonymous
1
Hide details for 08/29/200108/29/2001
field value must be at 0-9textfield 0-9Formulafidelity
1
Hide details for 07/10/200107/10/2001
OLE/ActiveXWe have used "Olectra" as an Embeded Object to get a graphical display of charts.
The values are passed to the properties of the object.
The graph is displayed by calling the form containing the embeded object using ws.composedocument.
LotusScriptjaideep_pv@yahoo.com
1
Hide details for 06/11/200106/11/2001
ReplaceSubstringLotusScriptjpotts@navsystems.com
1
Hide details for 05/10/200105/10/2001
Convert Number(Int) to TextAny integer number can be converted to its equivalent textJavaScriptmmg@bdonline.com
1
Hide details for 05/08/200105/08/2001
Anonymous
1
Hide details for 04/12/200104/12/2001
getopenfilenameLotusScriptAnonymous
1
Hide details for 03/26/200103/26/2001
Progress Bar classClass file implementation of the code to control a Progress Bar.LotusScriptIan Sherwood
1
Hide details for 02/22/200102/22/2001
Anonymous
1
Hide details for 02/14/200102/14/2001
How to generate a random password for notes or web users.LotusScriptJannan
1
Hide details for 02/04/200102/04/2001
day differenceto find difference between two dates and find the day differenceLotusScriptRajiv Menon
1
Hide details for 01/15/200101/15/2001
Calendar Set-UpThe code determines the date of the first Monday in any given calendar year. @Adjust can be used to determine the dates on which subsequent weeks begin and end. Use it to create a form that serves as a schedule or scheduler. (FIELD FR_2 := @Adjust(FR_1;0;0;7;0;0;0);
FR_2)
Formula<Wellford Dowdy> FourDowdys@cs.com
1
Hide details for 11/30/200011/30/2000
GetHTMLFromRTFGets an HTML string from a RTF field using undocumented methods in Lotus notes for version 5.02 onwards.LotusScriptShane Hollis
1
Hide details for 10/25/200010/25/2000
Fetching Docs within a Date Range DynamicallyThere exists a set of documents in a databse. Inorder to retrieve the documents that exists within a given Date Range,the following code will be helpful.(if there is any simple code than this please inform the same) LotusScriptrkdravid@yahoo.com
1
Hide details for 10/16/200010/16/2000
accessing address book on webhave to access address book on web if he types last name it should pop up with a window when they type in the last name it should go and get it from the server and display on webAnonymous
2
Hide details for 09/15/200009/15/2000
JavaScript function getFieldValueThis function will return the field value (or value list) based on the element typeJavaScriptRlatulippe@romac.com
JavaScript pop-up calendarAllows user to select a date from a calendar, change months, years.JavaScriptesuez@mail.utexas.edu, jake.ochs@binarytree.com
1
Hide details for 09/08/200009/08/2000
Clock in Status BarDisplays a live clock in the user's browser status bar.JavaScriptLotus
1
Hide details for 08/26/200008/26/2000
Check roll in QueryDocumentDelete to prevent deletionsChecks to see if the current member has the DBManager Roll and can therefore delete documents.LotusScriptRlatulippe@romac.com
4
Hide details for 08/17/200008/17/2000
Export to ExcelWill export view to excel and format excel sheetLotusScriptAnonymous
Import from ExcelImport excel Spreadsheet into a view and will update the phone number is the document already existsLotusScriptAnonymous
Número de días, meses y años entre 2 fechasAqui veremos la cuantos días, meses y años hay entre 2 fechasFormulaAnonymous
Número de días, meses y años entre 2 fechasAqui veremos la cuantos días, meses y años hay entre 2 fechasFormulaAnonymous
1
Hide details for 07/12/200007/12/2000
Increment Elapsed Business Days without Company HolidaysThis agent increment elapsed business days without company holidays counted in. The formulae is simple and you can plug n play right away. Just remember you need a fields such RecvDate, HolidayCounter and Elapsed Days in the main form. And if your company does have db which has a listed holidays values in a document the below agent is good to go right away. Also, you can create a field the same document which will store company holidays dates and then you match with this dates field. Have Fun!!!!!Formulajsaiden@yahoo.com
1
Hide details for 07/11/200007/11/2000
Restricts who can run which agentsRestricts who can run this agent to those in at least one of the specified role(s)FormulaJamie Magee
2
Hide details for 07/10/200007/10/2000
Prevent pages from cachingCauses browser to always reload a page from the serverFormula,HTMLJamie Magee
Validation fields onSubmitValidar campos cuando guardamos un FormularioFormula,JavaScriptroccorocco@telepolis.com
10
Hide details for 07/08/200007/08/2000
Calculating array values in JavaScriptThis JavaScript function uses a global variable listSize which is computed from the formula @Elements(someList). The list is really an array of <INPUT> fields called total and quantity. Note that if the array has only one element you cannot use the array construct, you must reference the field directly.JavaScriptRlatulippe@romac.com
Format E-mail AddressesMost Web sites that collect user contact information require users to enter their e-mail addresses. The formatEmail function checks to make sure an e-maill address has been enetered in the correct format - if not, it returns an empty string.JavaScriptRlatulippe@romac.com
Frameset code JavaScriptRlatulippe@romac.com
How do you validate and jump to fields which have validation errors?This example will check that all required fields are filled in. If a field is not filled in, it will move the cursor in the web browser to that field.JavaScriptRlatulippe@romac.com
How to open a new window and navigate to a Web page using a Keyword List and JavaScriptHow to open a new window and navigate to a Web page using a Keyword List and JavaScriptJavaScriptRlatulippe@romac.com
JavaScript function for doing search and replace of a character within a stringThe following function takes three parameters -- the string upon which it operates, the character it is searching for, and the character it is replacing that character with. It returns the new string product of this search and replace operation, and works in Navigator 3x and 4x, as well as IE 3x and 4x. This can be useful if, say, you are doing parameter passing to a Query_String field in a domino document via the URL, and need to replace the spaces in the text you are passing in the URL with underscore characters. If you are confined to using JavaScript to ac complish this search and replace operation, then this function will do the trick.JavaScriptRlatulippe@romac.com
JavaScript function for doing search and replace of a character within a string The following function takes three parameters -- the string upon which it operates, the character it is searching for, and the character it is replacing that character with. It returns the new string product of this search and replace operation, and works in Navigator 3x and 4x, as well as IE 3x and 4x. This can be useful if, say, you are doing parameter passing to a Query_String field in a domino document via the URL, and need to replace the spaces in the text you are passing in the URL with underscore characters. If you are confined to using JavaScript to accomplish this search and replace operation, then this function will do the trick.JavaScriptRlatulippe@romac.com
List-processing functionsThe list-processing functions of the @formula language provide some of the strongest processing capabilities of any built in feature of Notes. Translating them to JavaScript is fairly straightforward. List in JavaScript are implemented as arrays, but you use them in almost the same way you do the @formula language. Perhaps the most obvious use of these functions on a Web page is in string parsing, but your imagination and necessity may suggest many more. Here are the JavaScript versions of some list processing functions:JavaScriptRlatulippe@romac.com
Preventing UI refresh when working with FramesetsOn the Web instead of having your forms reload constantly, create a Frameset where one frame has a size of zero. Open a form in each frame. Using JavaScript to react to button presses or other actions, move the data you want to submit to the hidden frame and force the submit of that document. Now your UI doesn't refresh and the user still executes the submit action.JavaScriptRlatulippe@romac.com
Using the 'With' statement in JavaScriptThe 'with' statement in JavaScript lets you preface an object and all of its properties and methods without a long object address, saving you time while you are coding. For example this function below uses the 'with' statement after the function is declared. The with statement passes the form object which allows the rest of the script to access the form's properties and methods without a full address.JavaScriptRlatulippe@romac.com
1
Hide details for 06/28/200006/28/2000
Anonymous
2
Hide details for 06/22/200006/22/2000
Launch URLLanzar una Url que se encuentra en un campo de un formulario desde una vistaHTMLroccorocco@telepolis.com
Mail by WEB Agent - From FieldSolution to the "From" Field problem in Web AgentLotusScriptflashlr@hotmail.com
1
Hide details for 06/21/200006/21/2000
Launch URLLanzar el valor de un campo URL desde una vistaHTMLroccorocco@telepolis.com
1
Hide details for 06/06/200006/06/2000
How to determine if the browser has JavaScript enabledHTML,JavaScriptawsllc@yahoo.com
1
Hide details for 05/26/200005/26/2000
C/C++Anonymous
1
Hide details for 05/12/200005/12/2000
Text ExporterLotusScripthaughton@ifrc.org
633
Hide details for 04/19/200004/19/2000

Formula lookup for frequently changing data
Problem: You have some data on a document that you are looking up from another. The data changes frequently and is difficult to keep synchronized. Solution: Instead of trying to manipulate the data each time it changes for hundreds of documents, make your lookups dynamic. However, lots of dynamic lookups will slow your application. Instead use this technique.FormulaRlatulippe@romac.com
12-digit "unique" number based on date&timeThis formula creates a 12-digit document number...FormulaRlatulippe@romac.com
16 bit free resources and available memoryReturns Free Resources on 16 Bit SystemLotusScriptRlatulippe@romac.com
16 bit GetPrivateProfileString function call to get ScreenSaver and WallPaper in Windows.Returns Screen Saver and Wallpaper settings on Windows system.LotusScriptRlatulippe@romac.com
1. Select ButtonThis formula is the first of a series -- for a set of four buttons: SELECT, ADD, EDIT, and CLEAR. These are simple formulas but they allow you to have a multi-value field showing a list of names (or of any text items) which you can initialize by selecting, add to, edit, or clear. The first button, SELECT, does a select and loads a field called ReaderList. For simplicity, we are using an R4 N&A picklist, but you could also use @DbLookup, or an @PickList view lookup.FormulaRlatulippe@romac.com
2. Add ButtonThis formula is the second of a series -- for a set of four buttons: SELECT, ADD, EDIT, and CLEAR. These are simple formulas but they allow you to have a multi-value field showing a list of names (or of any text items) which you can initialize by selecting, add to, edit, or clear. The second button, ADD, adds names to a field called ReaderList. For simplicity, we are using an R4 N&A picklist, but you could also use @DbLookup, or an @PickList view lookup.FormulaRlatulippe@romac.com
32 bit free disk space funtion call In Windows to check Freespace on Disk.Returns Freespace on C: DriveLotusScriptRlatulippe@romac.com
32 bit GetPrivateProfileString funtion call to get Screen Saver and WallpaperReturns Screen Saver and Wallpaper used on Windows system.LotusScriptRlatulippe@romac.com
3. Edit ButtonThis formula is the third of a series -- for a set of four buttons: SELECT, ADD, EDIT, and CLEAR. These are simple formulas but they allow you to have a multi-value field showing a list of names (or of any text items) which you can initialize by selecting, add to, edit, or clear. The third button, EDIT, calls up a multivalued list box to edit the field ReaderList.FormulaRlatulippe@romac.com
4. Clear ButtonThis formula is the fourth of a series -- for a set of four buttons: SELECT, ADD, EDIT, and CLEAR. These are simple formulas but they allow you to have a multi-value field showing a list of names (or of any text items) which you can initialize by selecting, add to, edit, or clear. The third button, CLEAR, very simply clears the field ReaderList. It would not be necessary to have such a button, except that you cannot de-select ALL names in the multivalued list box shown by the EDIT button.FormulaRlatulippe@romac.com
A very forgiving date parser. Let's you enter dates like Nov. 1, 1990A very forgiving date parser. Let's you enter dates like Nov. 1, 1990FormulaRlatulippe@romac.com
A WAIT FUNCTION???Yes, you'll need to use script and set up a NotesTimer in the form initialize event, when the timer expires it can check the field in the UIDoc and close the whole lot down if there is nothing there....LotusScriptRlatulippe@romac.com
Access the names of users in a specific group in the Domain Address Book using formulas. Access the names of users in a specific group in the Domain Address Book using formulas.FormulaRlatulippe@romac.com
Access Win32 registry keys in LotusScript?Access Win32 registry keys in LotusScript?LotusScriptRlatulippe@romac.com
Accessing Notes agentsThis example sends a memo to the managers of the current database containing the name and comment of each agent in the database.JavaRlatulippe@romac.com
Accessing Notes Session PropertiesUsing the object.property syntax, you can access all the session properties. Let’s look at an example:LotusScriptRlatulippe@romac.com
Accessing Notes View PropertiesYou can access Notes view properties using the NotesView class properties.LotusScriptRlatulippe@romac.com
Accessing session propertiesThis agent uses the Session properties.JavaRlatulippe@romac.com
Add Rich Text thru the UILotusScriptRlatulippe@romac.com
Add Rich Text thru the UI no views used in code!Refresh the current UI doc when an attachment is added.LotusScriptRlatulippe@romac.com
Add Roles To ACLThis formula uses LotusScript to add roles to the ACL of a database. Event = "Initialize". No other subroutines are used.LotusScriptRlatulippe@romac.com
Add together two one-dimensional arrays!Takes two arrays and builds them into one.LotusScriptRlatulippe@romac.com
Adding a Variable into String for LotusScript Search MethodAdding a Variable into String for LotusScript Search MethodLotusScriptRlatulippe@romac.com
Adding an Item to All Documents Using AppendItemValue of NotesDocumentAdding an Item to All Documents Using AppendItemValue of NotesDocumentLotusScriptRlatulippe@romac.com
AddressBooks propertyThis program prints the server name (or "Local"), file name, and title of all the address books known to the current session.JavaRlatulippe@romac.com
Adjust a Date Into the FutureAdjusts a date field ahead by one year. This type of formula is ideal when you want to compute a date into the future based on a date entered into a particular field. For example, the formula listed below is used to set a warranty expiration date (WarrantyExpires) one year from the date of purchase (DatePurchased).FormulaRlatulippe@romac.com
AdjustDay methodThis agent decrements the date by 10 days.JavaRlatulippe@romac.com
AdjustHour methodThis agent decrements the time by 10 hours..JavaRlatulippe@romac.com
AdjustMinute methodThis agent decrements the time by 10 minutes.JavaRlatulippe@romac.com
AdjustMonth methodThis agent decrements the date by 10 months.JavaRlatulippe@romac.com
AdjustSecond methodThis agent decrements the time by 10 seconds.JavaRlatulippe@romac.com
AdjustYear methodThis agent decrements the date by 10 years.JavaRlatulippe@romac.com
Agent for Encrypting DocumentsAgent for Encrypting DocumentsLotusScriptRlatulippe@romac.com
Agent that prints mail as soon as it arrives Agent that prints mail as soon as it arrivesLotusScriptRlatulippe@romac.com
Agent to change $Ref to new parent documentTakes a given document ID and makes all selected documents responses to that document.LotusScriptRlatulippe@romac.com
Agent to copy all documents from a Target Db to your DbCopies all documents from another database to the current databaseLotusScriptRlatulippe@romac.com
Agent to Lookup and update another databaseWith a scheduled agent, go through database A and match a field on a document with a field from another document in a different database B. If there is a match, update a couple of fields in database B from information on the document from database A.LotusScriptRlatulippe@romac.com
Agent to set Readers field security using IsReaders property.This agent is used to reset a readers field once it has been changed to a type text.LotusScriptRlatulippe@romac.com
Agent used to create User Profile Documents From Office Profile DocumentsBuild a set of documents from information gathered from a different set of documents.LotusScriptRlatulippe@romac.com
AgentContext classThis example gets the context for the current agent, then gets the agent itself and prints the agent name and comment.JavaRlatulippe@romac.com
AlphaQuickSort FunctionSorts an array of alphanumeric elements. The function returns an array of the elements sorted alphanumerically.LotusScriptRlatulippe@romac.com
AlphaQuickSort function which sorts the elements in the array. This example asks the user for input of names and assigns each name to an element in the array. On NULL input it calls the AlphaQuickSort function which sorts the elements in the array.LotusScriptRlatulippe@romac.com
AMString, isDST, isTime24Hour, PMString, TimeSep, and TimeZone propertiesThis agent displays international time settings: 24-hour or 12-hour; for 12-hour, the AM and PM strings; the hour-minute-second separator; and the time zone.JavaRlatulippe@romac.com
Another Hit Counter Using Profile DocumentsDoesn't create unique fieldnames for each document that you are counting (i.e. creates unique documents instead). Stores both the first access date and the last access date. Doesn't increment the counter unless it is accessed by a web user (this prevents ultiple increments from happening when editting a document internally while still allowing internal users to view the count info)FormulaRlatulippe@romac.com
API Call to access the Clipboard in Notes?This function (thanks to Manfred_Doerwald@IDG.DE) calls Win32 functions to put a field in the clipboard:LotusScriptRlatulippe@romac.com
API Call to Add Shortcuts to the Win95 DesktopThis script sample will add Shortcuts to the Win95 Desktop.LotusScriptRlatulippe@romac.com
API Call to Get a filename from the user in Lotuscript?This example illustrates how Lotuscript can be used to call a Win32 API Common File Dialog to get a file. Similiar techniques can be used on other operating systems:LotusScriptRlatulippe@romac.com
API call to NNOTESWS.DLL to display Progress Barmakes API calls to display progress barLotusScriptRlatulippe@romac.com
API call to NNOTESWS.DLL to display Windows BrowserUses a call to a function in the notes DLL to display the windows browserLotusScriptRlatulippe@romac.com
API Call to NNOTESWS.DLL to get and Set Active Window TitleThis example demonstrates the declaration of the NEMSetWindowText function located in NNOTESWS.DLL file:LotusScriptRlatulippe@romac.com
API Call to NNOTES.DLL to get User NameMakes an API call to retrive the Current User NameLotusScriptRlatulippe@romac.com
API Call to reference functions in Dynamic Link Libraries ?Calls a C function exported from Windows DLL to get WinDirLotusScriptRlatulippe@romac.com
API Call to Retrive Local Time (Win95 & WinNT)Uses the function GetLocalTime in the Kernel32.DLL to retrive Time.LotusScriptRlatulippe@romac.com
API Call to Retrive Windows System Directory!Uses the function GeSystemDirectoryA in the Kernel32.DLL to retrive the Windows System directory.LotusScriptRlatulippe@romac.com
API Call to User32 to get and Set Active Window TitleGets the Active Windows Title using WIN32 library calls.LotusScriptRlatulippe@romac.com
API Call to WIN32 to Utilize Windows Get File dialogbox. (Win95 Version)Brings up the Win95 get file dialog and allows you to select a file.LotusScriptRlatulippe@romac.com
API calls and declarations to access the Win RegistryThis will return the path of the Notes Data directoryLotusScriptRlatulippe@romac.com
API Calls in Script Library to write to and from Windows ClipboardScript to write to the windows clipboard.LotusScriptRlatulippe@romac.com
API Calls to NNOTESWS.DLL to Display Progress Bar Along the bottom.Displays Notes Progress Bar.LotusScriptRlatulippe@romac.com
API Call, How to Make Windows API Calls, Taking the Windows Version into AccountWindows API calls usually differ, depending upon the Windows version that is in use when the call is made. The following example illustrates how to call the Windows API GetPrivateProfileString function while taking into account the Windows version in use:LotusScriptRlatulippe@romac.com
API to load Windows browserUses a call to a function in the NNOTESWS.DLLLotusScriptRlatulippe@romac.com
Append "Yesterday", "Today", or "Tomorrow" to DateThis formula makes it easier in your views to see that this date is yesterday, today, or tomorrow's date. For example, a view would appear as follows: 3-09-94 First entry Second entry 3-10-94 (Yesterday) First entry Second entry 3-11-94 (Today) First entry Second Entry 3-12-94 (Tomorrow) First entry Second entry Third entry 3-13-94 First entry Second entry In a Column Formula of a View:FormulaRlatulippe@romac.com
Appending a value to a fieldAppends value to a field and in this particular case, appends value to the left of what is already there. ie Change value in FundNumner field (FLNum) from F888 to 4888.FormulaRlatulippe@romac.com
Approve Workflow ButtonThis formula is a short illustration of a very powerful technique. Suppose you have several routing steps in a workflow application. Each step may have very similar fields and buttons, but of course Notes formulas do not have subroutines to generalize functionality. Here we get our specific stuff out of the way at the top, and have generic code the rest of the way. Thus when you change the way the formula works, you don't have to copy the code, and then go through the painstaking and error-prone process of adapting essentially the same formula to the different sections of code. This sample is based on the approach that there are a number of sets of fields, each essentially the same, where each fieldname ends in an ordinal number, 1, 2, 3, etc., corresponding to the position of the set.FormulaRlatulippe@romac.com
Approved & Mail buttonFormulaRlatulippe@romac.com
Arrays and RedimArrays, like variables, hold values of a single data type. Unlike variables, however, arrays can hold multiple elements of the same data type.LotusScriptRlatulippe@romac.com
Assign Navigator on Database open.The following is used in the PostOpen event of the Database Script to assign a Navigator and View depending on the users Role.FormulaRlatulippe@romac.com
Assign Next Consecutive Number (Uses Environment Variable)In the default value of a field, use this formula to assign the next consecutive number using an environment variable:FormulaRlatulippe@romac.com
Assigns current field the full name of a state, given a field 'State' with
the standard state Abbr.
Assigns current field the full name of a state, given a field 'State' with
the standard state Abbr.
FormulaRlatulippe@romac.com
Author's InitialsThis returns the authors initials (upper case) in a field.FormulaRlatulippe@romac.com
Auto-launching attachments in Win32Launches an attachement.LotusScriptRlatulippe@romac.com
Auto Refreshing a UI document from a back end document.The original goal was to open a UI doc, and keep it open while periodically refreshing the fields from the back end doc.LotusScriptRlatulippe@romac.com
Automated Outlook Mail agent!This agent takes the e-mail field from selected documents and displays the MS Outlook mail template with the To: Field populated with those addresses.LotusScriptRlatulippe@romac.com
Average the elements in a one-dimensional array of integersThis Subroutine will take and array of integers and give you the average, sum and difference from average of the integers.LotusScriptRlatulippe@romac.com
Avoid error messages with DBLookup?How do you avoid error messages with DBLookup?FormulaRlatulippe@romac.com
Avoiding Duplicate EntriesThis formula simply avoids duplicate entries in any database.FormulaRlatulippe@romac.com
Build a Table in Excel from Lotus Notes.Simple code that builds a pivot table in an existing Excel spreadsheetLotusScriptRlatulippe@romac.com
Building a Searchformula$ using several fields amd @IsMemberBuilds a search where Form = "ServerAdmin" and either of the DefaultClass field or OtherClassNames list field = the variable sClassLotusScriptRlatulippe@romac.com
Button adds attachments RTFLotusScriptRlatulippe@romac.com
Button to ask for object to insertFormulaRlatulippe@romac.com
Calculate current relative directory on ServerThis formula calculates the current relative directory on the current server. You can append a filename of a database expected to be found in the same directory in order to access it. This formula allows you to install a suite of databases which will always access each other within the SAME DIRECTORY. Either server-relative paths or full local drive-directory paths will work Note: You also need a formula to compute the server name. This is simply: @Subset( @DbName; 1 ). To get fancier, check the platform using @Platform and use the ! separator for the Macintosh.FormulaRlatulippe@romac.com
Calculate Next Available NumberThis formula will calculate the next available number.FormulaRlatulippe@romac.com
Calculate The Number of Days Between Two DatesUse this formula to calculate the number of days between two dates.FormulaRlatulippe@romac.com
Calculate the number of weekdays between two date fields?The following formula counts the number of weekdays (but not weekend days):FormulaRlatulippe@romac.com
Calculate the week number in a year of a given date.Calculates the week number in a year of a given date.FormulaRlatulippe@romac.com
Calculate Time AssignedSets time field when assigned to help desk person.FormulaRlatulippe@romac.com
Calculate total months between a StartDate and Today (- current month)Possible use: To get total months an employee worked for a company to calculate vacation.FormulaRlatulippe@romac.com
Calculate # days between two datesFormulaRlatulippe@romac.com
Calculating Business Days Between Two DatesIt is elementary for a Notes programmer to calculate the number of calendar days between two dates (It is even quite easy to calculate the non-weekend days between two dates. However, it is much tougher to calculate the number of business days given a list of holidays. This requires some form of recursion or looping to check 1) if a holiday falls anywhere within the range, or 2) if any of the dates in the range is on a list of holidays. The presumption is that you don't know exactly how many calculations you need to make, hence the need for recursion or looping. The following example demonstrates a recursive mechanism to do this calculation. It uses a button and three macros. Two dates are supplied. A button is avialable to calculate and set the value for a third field containing the number of business days. A text list containing the holidays must also be available, either in a variable or through a lookup.FormulaRlatulippe@romac.com
Calculating Window TitlesThis example will display New Patient in the window title for new documents, patient (Owner) for existing documents, and patient (Unknown Owner) for existing documents whose owner is unknown. This example is contrived to illustrate a technique, but is useful in understanding how to calculate window titles.FormulaRlatulippe@romac.com
Calendar Pop-UpThe formula below is a pop-up calendar that can be placed behind an icon. A working example of this function can be found in the Client Service Call Tracker application. Make sure you select "Formula" in the pop-up window for this to work. Click on icon below for demo :FormulaRlatulippe@romac.com
Calling Windows Registery APIs to locates Notes executable pathCalling Windows Registery APIs to retrieve registery values from Lotus ScripLotusScriptRlatulippe@romac.com
Can you have views based on the current user name?Can you have views based on the current user name?FormulaRlatulippe@romac.com
Can you start a program in Notes and wait for it to finish?Starts a program in Lotos NotesLotusScriptRlatulippe@romac.com
Changing field values during testing.Here are a quick set of agents that can help you when developing/testing/implementing an application. They allow you to specify a field at the view level and change it on selected documents.FormulaRlatulippe@romac.com
Changing Field Values From a ButtonWhen trying to change field values through the use of a button, while in read mode, follow this tip. If you set fields in read mode, they actually are set in the field. Therefore, all you have to do is set some dummy temp fields in read mode, and compute the translation formulas for the fields you want to set to look for their twin temp field and get the contents if available.FormulaRlatulippe@romac.com
Check and set a File's AttributesYou can check a file's attributes and then set an attribute using LotusScript. For example, the following code checks whether a file is Hidden, and if it is, sets its Hidden attributeLotusScriptRlatulippe@romac.com
Check for down serversChecks for Down ServersLotusScriptRlatulippe@romac.com
Check off "Documents pasted or mailed into database" in the filter dialog box.";
Required Field(s): Categories, From ;

Categorize Incoming Mail If the message is from Barbara Smith, categorize it as Library". If it's from Bob Stark, categorize it as Internal". Otherwise, make it blank".FormulaRlatulippe@romac.com
Check RichText Field for NULLWhen in Edit mode checks RichText Field for NULL.LotusScriptRlatulippe@romac.com
Check specified server until is respondsChecks for server responseLotusScriptRlatulippe@romac.com
Check to see if it is a Leap YearChecks current year to determine if it is a leap year.FormulaRlatulippe@romac.com
Check to see if this is an existing ID to allowing user to continueCheck ID field to ensure that the ID being eneterd does not already exist.LotusScriptRlatulippe@romac.com
Checking for Pre-Existing DocumentsFormulaRlatulippe@romac.com
Checking Validity of Pasted DocumentsThe following script checks to make sure the pasted document uses the correct form and passes all the form's validation formulas. If not, the document is deleted. Use this script with a view's Postpaste event.LotusScriptRlatulippe@romac.com
Client Contact Time PeriodWhen determining when a client needs to be contacted after a specified period of time, follow this tip:FormulaRlatulippe@romac.com
Close methodThis agent opens and then closes a mail log. When the close method is called, the log is mailed.JavaRlatulippe@romac.com
Code for calculating business days in LotusScript.Calculates the business daysLotusScriptRlatulippe@romac.com
Column formula to detect Mail ReceiptsFormulaRlatulippe@romac.com
Comment propertyThis example prints the name and comment of the current agent.JavaRlatulippe@romac.com
CommonOwner propertyThis example prints the common owner name of the current agent.JavaRlatulippe@romac.com
CommonUserName propertyThe following agent prints the common user name.JavaRlatulippe@romac.com
Compact all local databases < 90% utilizedChecks all databases Locally and Compacts those that are less than 90% utilized.LotusScriptRlatulippe@romac.com
Compiling and running a Java program4. This is an agent program with print output that can be seen by a browser:JavaRlatulippe@romac.com
Compiling and running a Java program3. This is an agent program:JavaRlatulippe@romac.com
Compiling and running a Java programThe following examples demonstrate the minimal code needed for a Java program that uses the Notes classes. The examples instantiate a Session object and print the String output of its getPlatform method (Platform property). 1. This is a stand-alone program that extends the NotesThread class:JavaRlatulippe@romac.com
Compiling and running a Java program2. This is a stand-alone program that implements the Runnable interface:JavaRlatulippe@romac.com
Compose a New Document With Inheritance When Current Document is OpenIf you are composing a document, and want to create a new document that inherits information from the currently open document, then you need to save the currently open document, and then compose the new one. Using this formula will let you save the existing open document without closing it, and then compose a second document that may inherit values from the first.FormulaRlatulippe@romac.com
Compose Form in Other DatabaseButton : Application request Asks if user wishes to continue, the saves audit trail information for the transaction, and launches the appropriate DB compose form Note: Notice where the @Compose is located in the button formula (at the end !!). This was necessary so the File save, window close would execute on the initiating form (Request router), not on the target compose form command.FormulaRlatulippe@romac.com
Compute With FormThis agent runs on a selected document. When run it "recomputes" the form. I use this a lot when I need to change something like a reader field that is computed when composed. Instead of adding an additional readers field to a form and then modifying each form this will allow you to recompute the values of such fields after you have changed the field formula. This is handy especially if you forget to give yourself access to certain fields (in which case you have to run this at the server) but it can save a lot of time and heartache.LotusScriptRlatulippe@romac.com
Concatenate multiple keyword fields for a viewFormulaRlatulippe@romac.com
Conditional Branching: The FOR StatementThe For statement gives you the ability to execute a block of code a certain number of times.LotusScriptRlatulippe@romac.com
Conditional Branching: The ForAll StatementThe ForAll statement was made especially for arrays. It has the ability to operate on all the elements in an array without you knowing how many elements are in the array.LotusScriptRlatulippe@romac.com
Conditional Branching: The IF StatementThe IF statement is used to execute other statements based on one or more conditions. Some of the logic used for an IF statement is demonstrated in the following pseudo-code examples:LotusScriptRlatulippe@romac.com
Conditional Branching: The Select Case StatementThe Select Case statement allows a program to conditionally execute statements based on any number of conditions.LotusScriptRlatulippe@romac.com
Conditional Branching: The WHILE StatementWhile loops execute code conditionally.LotusScriptRlatulippe@romac.com
Convert a numerical value to the equivalent written text?Converts a field called NUMBER to written textFormulaRlatulippe@romac.com
Convert Date to Day of the WeekUse this formula in the input translation of a Date/Time field to translate to day of the week:FormulaRlatulippe@romac.com
Convert Month Name to Month NumberThe following code will convert a Month long name to the corresponding Month number.FormulaRlatulippe@romac.com
Convert Month Number to Month NameThe following code will convert a Month number to the corresponding Month long name.FormulaRlatulippe@romac.com
Convert @Today to Month Day, YearFormulaRlatulippe@romac.com
Converting C Strings To Lotusscript StringsWhen calling Windows API functions, you usually have to pass in a fixed length buffer in which the API call returns a null-terminated (C style) string. To convert this string back to a normal LotusScript string, use the Instr function to search for Chr$(0).LotusScriptRlatulippe@romac.com
ConvertToZone method and ZoneTime propertyThis agent converts the current time to zone 15 time.JavaRlatulippe@romac.com
Copy one Richtext field to anotherCopies richtext field from docA and writes it to docBLotusScriptRlatulippe@romac.com
Count the number of documents in a viewCounts documents in the view "By Author" in the learning.nsf database.LotusScriptRlatulippe@romac.com
Country KeywordsKeywords for 200 States and abbreviationsText/KeywordsJamie Magee
Create a new class to display objectsA very simple example might be to create a class to display a message. We’ll do this in LotusScript by creating a class called DisplayMsg. In the following listing, the DisplayMsg class is shown, where you will see a property called Text and a method called Display.LotusScriptRlatulippe@romac.com
Create and send mailIn LotusScript, to send a message in Notes requires the following type of code: Sub Click (source as Button)' a button to send info with...LotusScriptRlatulippe@romac.com
Create Discard Button to Exit DocumentWhen used in a button or action button, this formula provides the users a quick way to exit and not save a document.FormulaRlatulippe@romac.com
Create error handling classLotusScriptRlatulippe@romac.com
Create Unique ID in a DocumentCreates a Unique ID for each document you compose.FormulaRlatulippe@romac.com
Creating a databaseCreates a databaseLotusScriptRlatulippe@romac.com
Creating a database from a templateCreating a database from a templateLotusScriptRlatulippe@romac.com
Creating a document with Authors field using LotusScriptHere's some sample code showing how to set the appropriate properties on the field. This code is run from an agent in the initialize event.LotusScriptRlatulippe@romac.com
Creating a Domino agent to count the number of hits on a web pageCreating a Domino agent to count the number of hits on a web pageLotusScriptRlatulippe@romac.com
Creating a New and ModifiedCreating a New and ModifiedLotusScriptRlatulippe@romac.com
Creating a New and Modified - Challenge*Creating a New and Modified - Challenge*LotusScriptRlatulippe@romac.com
Creating a Rich Text FieldCreating a Rich Text FieldLotusScriptRlatulippe@romac.com
Creating a Search AgentCreating a Search AgentLotusScriptRlatulippe@romac.com
Creating a Search Agent - Challenge*Creating a Search Agent - Challenge*LotusScriptRlatulippe@romac.com
Creating a Search Agent to Search the InternetCreating a Search Agent to Search the InternetLotusScriptRlatulippe@romac.com
Creating an Edit History 1-99 editsThis formula compiles a list of edits that can be adjusted from 1-99 edits. This formula is from the Advanced App Dev courseware in the Appendix "Tips and Tricks" page 189. Create a computed, text field called "SaveHistory".FormulaRlatulippe@romac.com
Creating NewslettersCreating NewslettersLotusScriptRlatulippe@romac.com
Creating Newsletters - Challenge*Creating Newsletters - Challenge*LotusScriptRlatulippe@romac.com
Credit Card Verification FormulaA Luhn formula (Mod10) for credit card number verification, The main purpose of this algorithm is to avoid data entry errors, but it can also be used as a security tool. But BEWARE, it's a very weak security tool, that anybody can crack !LotusScriptRlatulippe@romac.com
CurrencySymbol, IsCurrencySpace, and IsCurrencySuffix propertiesThe following agent displays the currency international settings: the currency symbol; whether a space is between the currency symbol and the number; whether the currency symbol follows the number.JavaRlatulippe@romac.com
CurrentAgent propertyThis example prints the name of the current agent.JavaRlatulippe@romac.com
CurrentDatabase propertyThis example prints the title of the current database.JavaRlatulippe@romac.com
Daily Dilbert AgentThis agent is hardcoded to the specific URL to retrieve the daily dilbert page that is available and send it to a user. It should be run in the background on the server.LotusScriptRlatulippe@romac.com
Date Computation FormulaThe formula calculates the difference in Years between two Dates. For example, the formula below calculates your Age by subtracting Today's date from your Birthday. Don't forget to add your Birthday field to a form or it won't work.FormulaRlatulippe@romac.com
Date Routines in LotusScriptThis routine returns the first date a specificed weekday falls in the year when passed a year and weekday.LotusScriptRlatulippe@romac.com
Date validation...# days between date MUST be less than X...This validation technique is from the NET support database and is used to ensure that a NET
trial installation does not exceed 60 days (otherwise, a message is displayed asking that the
end date be adjusted). In the example, Seed is the date the trial was installed, and DeSeed is the date the trial is to be
de-installed (which cannot exceed 60 days).
FormulaRlatulippe@romac.com
DateOnly propertyThis agent prints the creation date of the current database.JavaRlatulippe@romac.com
DateSep, isDateDMY, isDateMDY, isDateYMD, Today, Tomorrow, and Yesterday propertiesThis agent displays the date international settings: whether the date format is DMY, MDY, or YMD; the month-day-year separator; the keywords for yesterday, today, and tomorrow.JavaRlatulippe@romac.com
Day of Year FormulaDay of Year FormulaFormulaRlatulippe@romac.com
DB-LookupTakes value (KEY) and does a lookup. By setting the value of the DBLookup to the tempororary variable LookUp, the value can be checked for errors before attempting to set the field to the value.FormulaRlatulippe@romac.com
DB Column (same server)This is a standard way to perform an @DbColumn.FormulaRlatulippe@romac.com
DB Lookups and Keyword FieldsIn order to set a default value for a keyword field when the formula was used
to defined the keyword selection, follow this tip: For the default value of the keyword use the formula below. Then all you have to do is make the first value of your List that you are looking up be the default value. Beware that if the key you use to do the Lookup is not present when composing, you will not have a default value.
FormulaRlatulippe@romac.com
DBLookup for a Range of ValuesTo use a DBLookup to return a text field (i.e. Approver for a specified dollar amount) which relates to a range of values, follow this tip: Your criteria: Low Amount High Amount Approver
$0 $499 Bill Smith
$500 $2,499 Fred Jones
$2,500 $4,999 Mike Williams
$5,000 Joe Smith
Set up the view this way: Column1: Formula: @Text(LowAmount)+"@"+ApproverName 0@Bill Smith
500@Fred Jones
2,500@Mike Williams
5,000@Joe Smith
FormulaRlatulippe@romac.com
DbLookups that work on a local database and on the server.Writing DbLookups so they work on a local database and on the server.FormulaRlatulippe@romac.com
Debugging Notes Java CodeDebugs your Notes Java AgentsJavaRlatulippe@romac.com
DecimalSep, CurrencyDigits, isCurrencyZero, and ThousandsSep propertiesThis agent displays the decimal international settings: the number of decimal (fraction) digits; the decimal separator (between the whole and fraction parts); the 1000s separator; and whether a zero precedes the decimal point if the number is a fraction (no whole part).JavaRlatulippe@romac.com
DeflateArray Function will remove all duplicate elements in an alphanumeric array (@Unique)This example will take an array of elements containing duplicate names. The function DeflateArray will remove all duplicate elements and pass back the array as a variant. The array will then be formated into a string variable for display in messagebox.LotusScriptRlatulippe@romac.com
Delete a default zero after a form is opened when the field is being calculated in another fieldThis code is used to to delete a default zero after a form is opened when the field is being calculated in another field. This code should go in the Postopen mode of the form.LotusScriptRlatulippe@romac.com
Delete all orphaned response documentsDeletes all Orphaned response documentsLotusScriptRlatulippe@romac.com
Delete Environment variables from the notes.ini file.Delete Environment variables from the notes.ini fileFormulaRlatulippe@romac.com
Deletes an Item from a List Deletes and item from a listFormulaRlatulippe@romac.com
Deleting Duplicate Documents from a DatabaseProblem: There are many instances when one needs to know whether there are duplicate documents in a database. Having a macro which could identify or even delete these duplicate docs would be great! Solution: By duplicate documents, we really mean documents with the same ID, where ID can be any unique identifier you choose; CallNumber, CustomerName, SocialSecurityNumber, etc... (this should not be confused with Replication Conflicts, which are multiple instances of the same document!) Given this definition, there are two principal cases we will consider: 1. Duplicate documents within a database 2. New versions of some documents are to be imported, and the user doesn't want to create a condition where there are duplicate docs. Therefore, they want to delete the old docs before importing their new counterparts.FormulaRlatulippe@romac.com
Deleting Fields Permanently From a DatabaseIf you are looking for a clean and easy way to delete "obsolete" fields from the listing of available fields for a given database, follow this tip.FormulaRlatulippe@romac.com
Deleting Main Documents and Their ResponsesIf you would like all response documents to be deleted from a database when the main document is marked for deletion, follow this tip:FormulaRlatulippe@romac.com
Dependant keyword List. Final list depends on selection of second list which depends on selection of first list.FormulaRlatulippe@romac.com
Derive textual date from date & timeThis database has a DATE field as well as StartTime and EndTime fields. This displays the start time as something like: Tue, Jan 29, 8:00:00 AM, or replaces the time
with a couple of dashes if it wasn't entered yet.
FormulaRlatulippe@romac.com
Determine if a document is a profile documentWith the advent of profile documents in Notes 4.5, it will become neccessary to determine if a document is a profile document or not. A new NotesDocument property, IsProfile, will return True if a document is a profile document, and False if it is not. To use IsProfile, set the document in question to a NotesDocument object, and retrieve the value in the property. Syntax variablename = notesdocument.IsProfile The example below will determine if this document is a profile document or not, and display a message with the result.LotusScriptRlatulippe@romac.com
Determine the Number of Rows in a LS:DO Result Set in Notes R4Fetch all the rows using the LastRow method and then use the NumRows property to return the
number of rows in the result set.
LotusScriptRlatulippe@romac.com
Determine the number of seconds, hours, minutes, days and weeks between now and a particular date?The following sample script determines and displays the numbers of seconds, minutes, hours, days and weeks between now and both the start of the next year and the start of the current year. You can modify the script to compute the difference between the current date and any user-defined date.LotusScriptRlatulippe@romac.com
Determine whether a particular field in a form contains an object?HasItemObject checks whether the field that is passed to this function contains an Object and then returns either True (hasObject) or False. A sample script is provided below.LotusScriptRlatulippe@romac.com
Determining if a Notes View is a View or a Folder using the NotesView property, IsFolder.Determine if the object you are dealing with is an actual view, or a folder. To do this, use the NotesView property, IsFolder . IsFolder returns a value of 1, (True) if the object represents a folder, or 0, (False) if the object represents an actual view.LotusScriptRlatulippe@romac.com
Determining the End of a File with LotusScriptLotusScriptRlatulippe@romac.com
Dialogbox calls a Form!This script displays a document in a dialog box using the policy form whenever a user clicks the action button. The first layout region on the policy form is sized to fit in the dialog box.LotusScriptRlatulippe@romac.com
Directing New Users to a Special ViewIn R4.5 you can write a script that executes whenever a user opens the database. For example, you might want to direct new users to a special view, while letting old users proceed straight to the default view. To do this, write a script for the database object's Postopen event, as follows:LotusScriptRlatulippe@romac.com
Directing New Users to a Special ViewThis script executes whenever a user opens the database and directs new
users to a special view, while letting old users proceed straight to the default view.
LotusScriptRlatulippe@romac.com
Display Help Dialog BoxDisplays a Help Form, use with button and hotspotsLotusScriptRlatulippe@romac.com
Displaying Domino hit Counter Values in Profile DocumentsAuthorThe profile documents are a new feature requiring Notes 4.5 to use, set, display, etc. There is no way I know of to select profile documents for use in a view. However, it was fairly simple to write an agent that displays all the counter fields in a profile doc ument. The agent can also be used from the web. Here is the sample agent I have been using (long lines wrapped and you must "unwrap" them to try the agent:LotusScriptRlatulippe@romac.com
Displaying the Date in YY/MM/DD FormatIf you need to display the date in a YY/MM/DD format, use the following formula:FormulaRlatulippe@romac.com
Do not save a field if the user's leaves it blankFormulaRlatulippe@romac.com
Doclinking Parent to Child A Notes formula for doc-linking a parent to a child in Notes R3/4Doclinking Parent to Child A Notes formula for doc-linking a parent to a child in Notes R3/4LotusScriptRlatulippe@romac.com
Document Numbers - UniqueThere are times when, for some reason or another, you need a document to behave as a response but it can't be a response because it's a document in it's own right. When faced with this situation I usually create a serial number for the document with this formula. This formula creates a text value containing the users initials and the current time. It looks something like this: JB11-01-93 01:18:15 AM It's accurate to the second so the chances of two serial numbers being the same are very slim. Inheriting this field allow me to sort by serial number and group related documents together. I believe this has advantages over using @UniqueDocumentID. 1. @UniqueDocumentID is undocumented and cannot be depended on. 2. My serial number uses less memory than @UniqueDocumentID
3. My serial number is meaningful. @UniqueDocumentID is not. Using serial numbers allows you to do other things as well. For instance, the "response" documents can add to the serial number. Not only can you identify a common set of documents but you can calculate how many of a particular type of document exist within the set.
FormulaRlatulippe@romac.com
Documentation and implementation notes.Documentation and implementation notes.LotusScriptRlatulippe@romac.com
DocumentContext propertyThis example prints the value of the Text field of the in-memory document.JavaRlatulippe@romac.com
Doing a DBLookup using LotusScript Notes support services has one....it uses a dummy form that has a field
for each of the parameters in a @dblookup...the dblookup field is a computed
field, and you should do the following:
LotusScriptRlatulippe@romac.com
Dynamic Lookups with DefaultsThis formula will enable the user to create a (dynamic) keyword lookup based on what has been entered. The formula looks into the current database, in this case, the view "by Category" and also includes default values that will remain even if those documents were deleted.FormulaRlatulippe@romac.com
Dynamically calculate the subdirectory and file name portion of the URLDynamically calculates the subdirectory and file name portion of the URL using @dbname results and use that calculation in building your URL's instead of the replica id.FormulaRlatulippe@romac.com
Dynamically select documents per user without using a
ReaderNames field?
Dynamically select documents per user without using a
ReaderNames field?
FormulaRlatulippe@romac.com
Editing a Document with a ButtonEdit a document with a button, without entering into edit mode first. In order to create a button on a form that will do a complete edit of a document, as well as insert data into a field without first having to go into edit mode and save the document in read mode, follow these procedures:FormulaRlatulippe@romac.com
Editor Access to a SectionUse this formula in the section field of a form to indicate who may edit that section (used to disallow the initial author access after composition): When using a form that is divided into two sections, and both sections have computed values, follow this procedure to allow only certain group members editor access after the initial document creation.FormulaRlatulippe@romac.com
EffectiveUserName propertyThis script prints the current effective user name.JavaRlatulippe@romac.com
EKDOCLOC.LSS - Documentation and Sample UsageEKDOCLOC.LSS - Documentation and Sample UsageLotusScriptRlatulippe@romac.com
EKDOCLOC.LSS - Function LibraryEKDOCLOC.LSS - Function LibraryLotusScriptRlatulippe@romac.com
Elapsed working daysFormulaRlatulippe@romac.com
Ensuring that your applications are independent of a particular Domino server.If you want your applications to be independent of a particular Domino server or directory structure, don't hard-code any URLs. Instead, use this formula when you need the path and database name. You can then follow with "view/document" or "form?openform" etc.FormulaRlatulippe@romac.com
Equivalent LotusScript Explode functionHere is an example I use for explode: Lineinput is the string to be parsed out. Sep is the separator (unfortunately this version only supports one character separators) Linearray is the array which is where you want your values.LotusScriptRlatulippe@romac.com
Equivalent Rightback and Leftback functions in LotusScriptEquivalent Rightback and Leftback functions in LotusScriptLotusScriptRlatulippe@romac.com
Error handling using IsOpenError handling using IsOpenLotusScriptRlatulippe@romac.com
Error handling with On ErrorError handling with On ErrorLotusScriptRlatulippe@romac.com
Error handling with OpenError handling with OpenLotusScriptRlatulippe@romac.com
Errors, DebuggingHere are methods you can use to debug code.FormulaRlatulippe@romac.com
Evaluate method1. This agent applies the @ProperCase @function to the Subject field in every document of the current database.JavaRlatulippe@romac.com
Evaluate method2. This agent applies the @Sum @function to the Amount field (which allows multiple values) in each document and prints the result.JavaRlatulippe@romac.com
Evaluate to determine a users role.Use evaluate to determine users role and only then execute block of code.LotusScriptRlatulippe@romac.com
Examples: EnableRole method for a single userThis script enables the Auditor role for Bill Ehrhardt, in the database DISCUSS.NSF.LotusScriptRlatulippe@romac.com
Examples: EnableRole method for multiple users.This sub enables one role for multiple people in an ACL. Its parameters are a NotesACL object, the name of the role to enable, and an array of strings that represent user names.LotusScriptRlatulippe@romac.com
Exchanging items values between
documents.
EKIPUSH.LSS Function Library Notes R4 LotusScript functions for exchanging items values between
documents.
LotusScriptRlatulippe@romac.com
Execute DOS commands from a formula?Execute DOS commands from a formula!FormulaRlatulippe@romac.com
Export a Lotus Notes document to excel (creating the excel spreadsheet) We use the following code to export a lotus notes document to excel
(creating the excel spreadsheet).
LotusScriptRlatulippe@romac.com
Factorial FunctionReceives nFact as the user input plus additional parameters for displaying each factorial between zero and nFact as well as the number of recursive calls. The function returns the factorial of nFact .LotusScriptRlatulippe@romac.com
Factorial of n using iterationReturns the factorial of a number n using iterationLotusScriptRlatulippe@romac.com
Factorial of n using recursionReturns the factorial of a number n using recursionLotusScriptRlatulippe@romac.com
Fibonacci Sequence of n using iterationReturns Fibonacci Sequence of n using iterationLotusScriptRlatulippe@romac.com
Fibonacci Sequence of n using recursionReturns F ibonacci Sequence of n using recursionLotusScriptRlatulippe@romac.com
Field SynchronizationWhen trying to set one field equal to another when the document is loaded into memory, for example, if you want to set FieldX equal to FieldY so that if FieldY is changed, and they will be equal again when the document is reloaded, follow this tip:FormulaRlatulippe@romac.com
Filling Items with Dialog Box on Open of Document!Filling Items with Dialog Box on Open of Document!LotusScriptRlatulippe@romac.com
Find the Parent Document to a Child DocumentIn the script below, the child document is found using GetFirstDocument and GetNextDocument . You might ask yourself `Why not use GetNthDocument instead?'. The reason is GetNthDocument only works in documents in a collection, and we are working in a view!LotusScriptRlatulippe@romac.com
Find the week number for any given date!Use this formula to find the week number for a date (it follows the same pattern as the Calendar View, with Sunday at the week end day).FormulaRlatulippe@romac.com
Finding the Amount of Free Space on a Drive Using LotusScriptListed below is a LotusScript that makes the necessary API call.LotusScriptRlatulippe@romac.com
Five Reusable LotusScript Functions for Working with Lists When working with lists, the same functions seem to come up time and time again. We thought that it would be useful to group some of these LotusScript functions together so that you could find them in a single resource. Here are the basics that are covered: 1. Remove from List
2. Add to List
3. Remove Item from List
4. Entry in List
5. Remove Range from List
LotusScriptRlatulippe@romac.com
Fix Call ID#Used in the support Desk application in the Call form for the CallIDNumber Field.FormulaRlatulippe@romac.com
Flat file importThe routine demonstrates flat file importing with LotusScript. It shows how to read a comma
separated file. To make it more interesting it then merges the results into existing records in the database. These records
are keyed on a unique id. You should be able to easily modify this routine to create instead of merge or perhaps do both depending
on if the record already exists or not.
LotusScriptRlatulippe@romac.com
Flexible lookups, adding keywords "on the fly"The formula below does a lookup to the same database using a hidden view. This allows flexibility because you can enter a word (that now becomes a permanent part of the lookup), or use an existing word (that will always first appear in the lookup).FormulaRlatulippe@romac.com
Force form check on creation of response doc.This checks the current form you are on and ensures that it is viable for the response form to be createdLotusScriptRlatulippe@romac.com
Force the value of a field to be unique.How to force the value of a field to be unique?FormulaRlatulippe@romac.com
Forcing a Date Field to BackdateIf you need a date field to always backdate itself to the previous Sunday, try this formula: Since 1 represents Sunday, (1-@Weekday(@Today)) returns a negative value indicating the number of days between Sunday and today. So if today is Thursday, we get 1 - 5 = -4. @Adjust uses this negative value to return a new time-date value, decremented to the previous Sunday.FormulaRlatulippe@romac.com
Forcing the Use of a ButtonWhen forcing a button to be pressed, use the following formula. Place the code in the field validation formula. See also the Templeton Call Report in the Sales Tracker Database...FormulaRlatulippe@romac.com
Format a date fr displayAnd this formula which shows a date as the format 1995-01-15 - Monday, January 15FormulaRlatulippe@romac.com
Format Phone Number FieldsThis formula will automatically format phone number field entries in which the user does not enter dashes between the area code, prefix and suffix. For example, if a user types 4077888561, Notes will convert the number to 407-788-8561. This formula is ideal if you are importing information from another database in which phone number formatting was not used, or you just want to assist your users in properly formatting a phone number. This is just an example used to illustrate the use of formulas to format text: your formula may take on some additional characteristics depending on the phone number lengths, formatting needs, etc. that are typically entered by the user in an "ideal world" situation.FormulaRlatulippe@romac.com
FormatDocument methodThis agent makes a document collection of all the documents (up to 15) in the current database containing the word "arachnid," and makes a newsletter based on the document collection. The agent formats a newsletter document for each document in the collection and sends them to the current user.JavaRlatulippe@romac.com
Formated NumbersGenerates Formated numbersFormulaRlatulippe@romac.com
FormatMsgWithDoclinks method; IsDoScore, IsDoSubject, and SubjectItemName propertiesThis agent makes a document collection of all documents in the current database containing the word "archanid," then makes a newsletter based on this document collection. The agent formats a messge with links to the newsletter documents and mails it to the current user.JavaRlatulippe@romac.com
Formula for DBLookup and Prompt Box ChooseFormula for DBLookup and Prompt Box ChooseFormulaRlatulippe@romac.com
FTP MirrorCreated By: Teresa Deane on 02/07/96 at 03:59 PM
Category: Miscellaneous Minimum required Notes: Notes 4.0
Author: Teresa Deane
Company: Iris Associates
E-Mail Address: InterNotes@iris.com Description of the Agent: This agent refreshes pages with attachments. It should be run in the background preferably after the refresh agent has run.
LotusScriptRlatulippe@romac.com
FTSearchThis example will find any documents in the Beginning view that contain the string Method* using the view method FTSearch .LotusScriptRlatulippe@romac.com
Function GetParentDocument( doc As NotesDocument )This is a recursive function. It returns the main document at the top of a thread. An example of a thread is a main topic with multiple response documents. Passing the NotesDocument object reference variable to this function would return the main topic at the top of the thread. Call this function using GetParentDocument(doc).LotusScriptRlatulippe@romac.com
Function String ExplodeThis function takes a string and converts it to an array, based on a delimiterLotusScriptRlatulippe@romac.com
Function to remove excess spaces from a stringRemove all excess spaces from the string sLotusScriptRlatulippe@romac.com
Generate Response Docs in LotusSciptThis view action will call a LotusScript agent to generate response documents on an entire database (all it's parent docs, that is). This formula can be found in the World Wide Country Database as a view action called "Add Fund To Countries". This view action first does a lookup on the Fund Library database. The user selects a new fund fromn this library and VIOLA! All the country documents will have a new fund doc (this is the response doc). This action calls the agent to do the actual creation of the response docs. The agent is hidden and is set to run on all docs in the view. The agent name is called Add Fund and it's event is set to INITIALIZE.LotusScriptRlatulippe@romac.com
Generate Response Docs (1 at a time)This macro generates response documents but only one at a time. It could be made to become a "looping" macro, but I advise against that since looping macros in Lotus 4 crashes Notes when run in a 16 bit environment. Anyway, see the Lotusscript version of this if you want "looping". This macro is nice because, even though it generates the response doc one at a time, it is still quicker than manually generating a response document.FormulaRlatulippe@romac.com
Generates Sequential Project IDsCreate a view GetNumber with ProjectID filed sorted largest to smallest. It will take last (largest) number and add 1FormulaRlatulippe@romac.com
Get the Next MonthThe following routine will determine what the next month is following the month curently being displayed. If the next month is January, then the routine will increment the year by one.FormulaRlatulippe@romac.com
Get the Previous MonthThe following routine will determine what the previous month is following the month curently being displayed. If the previous month is January, then the routine will subtact one to lower the year.FormulaRlatulippe@romac.com
GetAllviews Sub RoutineWhen called GetAllviews will list all the views and folders in the current database, using the Views method of NotesDatabase Class.LotusScriptRlatulippe@romac.com
getEnvironmentString method1. This example gets the value of the $EnvLoc environment variable.JavaRlatulippe@romac.com
getEnvironmentString method2. This example gets the value of the MailServer system environment variable.JavaRlatulippe@romac.com
getEnvironmentValue method2. This script gets the value of the system environment variable Timezone.JavaRlatulippe@romac.com
getEnvironmentValue method1. This script gets the value of the environment variable $EnvNum.JavaRlatulippe@romac.com
GetTarget Function: Gets target db as current db.Given the current database and a new filename will return that filename as the new current database if it is on the same server and path.LotusScriptRlatulippe@romac.com
getURLDatabase methodThis program opens the default Web navigator database.JavaRlatulippe@romac.com
GMTTime propertyThis agent prints the creation date and time of the current database in GMT.JavaRlatulippe@romac.com
Go to the document without scrolling or getting the next set of documents on the web.
When you have a categorized view on the Web, and the documents are protected with READERS.
Going to the document without scrolling or getting the next set of documents on the web. When you have a categorized view on the Web, and the documents are protected with READERS name security you still see the categorized names of the users even though you can't expand them to see their documents. So if you have a couple of hundred documents they have to scroll through all the categorized names to get to their own name. One way of going directly to their username is using the 'STARTKEY' parameter.FormulaRlatulippe@romac.com
Good display formula for response docsFormulaRlatulippe@romac.com
Handling a specific errorHandling a specific errorLotusScriptRlatulippe@romac.com
Hide Navigator When Opening A ViewUse this formula to open a view from a navigator hotspot or button when you want to hide the navigator pane in the view. For example, this formula tells Notes to open a view called Texas, then expand the all categories within the opened view, then hide the navigator that would typically be displayed on the left of the window. Use this type of formula when you either want to hide the navigator so that the user can't select options from it, or to provide more space on-screen for the view contents.FormulaRlatulippe@romac.com
Hide When formulaThis code will hide a field (etc) if the user doesn't have delete rights. Slight modification will allow a hide for users with out edit rights. This might be good to hide the "Edit" button when the user doesn't have edit rights.FormulaRlatulippe@romac.com
Hierarchical ReaderNames Lookup Implementing control of hierarchical ReaderName relationships in Notes R3/4Hierarchical ReaderNames Lookup Implementing control of hierarchical ReaderName
relationships in Notes R3/4
LotusScriptRlatulippe@romac.com
Hours Between Two TimesDetermine the number of hours between two times.FormulaRlatulippe@romac.com
How can you display the text of individual table cells using LotusScript in Notes R4?How can you display the text of individual table cells using LotusScript in Notes R4?LotusScriptRlatulippe@romac.com
How can you tell if a view is Private?There is no property in the view thtat lets you do this, but you can look at the design note for the view via this function:LotusScriptRlatulippe@romac.com
How change a frames content with an @URLOpen.How change a frames content with an @URLOpen.FormulaRlatulippe@romac.com
How do I get the week ending date for a specific day?Returns week ending day for a specific date.FormulaRlatulippe@romac.com
How do I remove erased fields that keep appearing in the Add Fields
window?
Remove erased field'sFormulaRlatulippe@romac.com
How do you access a specific element of a multi-value field?To extract element 'n' from the field "Choices":FormulaRlatulippe@romac.com
How do you change the new mail tune under NT?How do you change the new mail tune under NT?LotusScriptRlatulippe@romac.com
How do you do a data import/merge using Lotuscript?How do you do a data import/merge using Lotuscript? This function can be placed in an action button in a database:LotusScriptRlatulippe@romac.com
How do you do a data import/merge using Lotuscript?How do you do a data import/merge using Lotuscript? This function can be placed in an action button in a database:LotusScriptRlatulippe@romac.com
How do you do @Explode in LotusScript?Breaks a delimited string into its component elements and returns the elements in a string arrayLotusScriptRlatulippe@romac.com
How do you find out what Roles a user has in the current database?This function will give you a list of all roles a user is in, even if the user is in nested groups which are listed in the ACL.LotusScriptRlatulippe@romac.com
How do you find the positions of a string in a text list?Button code used to find the position of all of your characters:FormulaRlatulippe@romac.com
How do you get the date for Easter of a given year?How do you get the date for Easter of a given year?FormulaRlatulippe@romac.com
How do you operate on the currently selected documents in LotusScript?The ... part in the code below marks where you can put code to access the active document.LotusScriptRlatulippe@romac.com
How do you remove an element from a Textlist field?How do you remove an element from a Textlist field?LotusScriptRlatulippe@romac.com
How do you retrieve a column total for a category?How do you retrieve a column total for a category?FormulaRlatulippe@romac.com
How do you select only Response documents in a view?How do you select only Response documents in a view?FormulaRlatulippe@romac.com
How do you total a column at the bottom of a view?Using @DbColumn returns the total at the bottom of a viewFormulaRlatulippe@romac.com
How to Add Carriage Returns to a Text Field via LotusScript in Notes R4.5xHow to Add Carriage Returns to a Text Field via LotusScript in Notes R4.5xLotusScriptRlatulippe@romac.com
How to Append One RTItem to Another via LotusScript Without a Save PromptHow to Append One RTItem to Another via LotusScript Without a Save PromptLotusScriptRlatulippe@romac.com
How to Change the Caption on a Multi-line LotusLabel in LotusScriptThe following sample script places the caption "This is a test. This is only a test." on two lines.LotusScriptRlatulippe@romac.com
How to Check via LotusScript Whether a Document is Open in Preview PaneHow to Check via LotusScript Whether a Document is Open in Preview PaneLotusScriptRlatulippe@romac.com
How to Compare Dates Using LotusScript It seems as though comparing dates would be a straight-forward task; however, it is actually rather complicated. A quick, easy approach is to use simple comparison operators, but via this approach - the question remains of how you get the
dates from Notes into the back-end and then manipulate it once it is in the script. The following instructions and sample code,
however, demonstrate how you can do this:
LotusScriptRlatulippe@romac.com
How to compare date/time fields using Lotuscript.This example will compare two date fields in document:LotusScriptRlatulippe@romac.com
How to Create a Document with "Store Form in Document" via LotusScript Back-End LotusScriptRlatulippe@romac.com
How to Create a New Database and Replicate it via LotusScriptUsing LotusScript, you can create either a local replica of a server-based database or a server replica of a local database.LotusScriptRlatulippe@romac.com
How to Delete Profile Documentshe only way to delete a profile document we've been able to find is to use the remove method in the NotesDocument class.LotusScriptRlatulippe@romac.com
How to Determine if Optional Arguments Have Been Provided for a Method. Product Release: LSX Toolkit 2.0How to Determine if Optional Arguments Have Been Provided for a Method.LotusScriptRlatulippe@romac.com
How to Display a Document, that Isn't the Current Document, w/ LotusScriptIllustrates one way to get a handle to a particular document (via a backend method) and then make the document the new UI document that displays on the screen. Specifically, the application performs the following actions:LotusScriptRlatulippe@romac.com
How to figure out Browser Type with JavaScriptHow to figure out Browser Type with JavaScriptJavaScriptRlatulippe@romac.com
How to Fill a Reader Field with Multiple Names via LotusScriptUse the AppendToTextList method of the NotesItem field to Fill a Reader Field with Multiple Names via LotusScriptLotusScriptRlatulippe@romac.com
How to Get Data from an OLE Object via Notes LotusScript Front-End MethodsHow to Get Data from an OLE Object via Notes LotusScript Front-End MethodsLotusScriptRlatulippe@romac.com
How to Have a Script in Notes R4 Pause for Some Time and then ContinueBelow are two examples illustrating how to have a script pause for a specified amount of time and
then continue.
LotusScriptRlatulippe@romac.com
How to Hide Attachments from Web ClientsHide V2 style attachments from displaying to web browsers?FormulaRlatulippe@romac.com
How to make the "loser" of a replication/save conflict be the "winner"?When you select the "loser" document and run this agent, it will be promoted to be a replication "winner". You can then delete the original "winner" document. Put this code into an agent that runs on selected documents:LotusScriptRlatulippe@romac.com
How to Modify Date Format to Textual RepresentationFormats a date from 12/27/97 to December 27, 1997FormulaRlatulippe@romac.com
How to Open a Navigator in Notes R4 via LotusScriptHow to Open a Navigator in Notes R4 via LotusScript
Product Release:
LotusScriptRlatulippe@romac.com
How to provide context-sensitive help for your database.How to provide context-sensitive help for your database.FormulaRlatulippe@romac.com
How to Return Background or Hyperlink Images via $$Return field in DominoThe following code retrieves the values from the fields named Fname (First Name) and Lname (Last Name) and returns it to the browser when a person submits the form. The code also uses the graphic image 3.jpg as the background image and the graphic image R.gif as a hyperlinked image to the Lotus web site.FormulaRlatulippe@romac.com
How to Search for a Date Value When Using the GetDocumentByKey MethodUsing the Format function, you can store the date in a mm/dd/yy format, which zero-fills the date and allows for
proper searching.
LotusScriptRlatulippe@romac.com
How to Set Time Zone for a Date with the NotesDateTime Class in Notes R4Append the time zone after the time.LotusScriptRlatulippe@romac.com
How to update a field on parent when a reponse doc has been deletedIt will check the documents that are being deleted and if a field exist called $Ref (which is on reponse docs) it will look at the parent and change the pro field to ""LotusScriptRlatulippe@romac.com
How to use LotusScript to Mail a Memo with a Doclink to the Original Document.How to use LotusScript to Mail a Memo with a Doclink to the Original Document.LotusScriptRlatulippe@romac.com
How to Use LotusScript to Prevent a User from Opening a ViewHow to Use LotusScript to Prevent a User from Opening a ViewLotusScriptRlatulippe@romac.com
How to Use the LotusScript NotesItem CopyItem MethodHow to Use the LotusScript NotesItem CopyItem MethodLotusScriptRlatulippe@romac.com
How to Use @DbCommand to Access More Than One Column of DataBy concatenating multiple @DbColumn formulas, however, you can return multiple columns of data.FormulaRlatulippe@romac.com
How to use @Formula in LotusScript.How to use @Commands in LotusScript.LotusScriptRlatulippe@romac.com
How to View on the Screen a Rich Text Item Added via LotusScriptHow to View on the Screen a Rich Text Item Added via LotusScriptLotusScriptRlatulippe@romac.com
If you use the LotusScript Evaluate statement with certain @functions, the result is not what you expected.The Evaluate statement is designed to work with non-UI @functions only. The following @functions cannot be used with the Evaluate statement:LotusScriptRlatulippe@romac.com
Implode FunctionThis function takes in a Notes Item in the signature line and returns the item as a string value the values are separated by a comma but that can be changed to any delimiter the user wishes to use. Additional checks for author and such may also be incorporated if the developer so feels.LotusScriptRlatulippe@romac.com
Import a Text File into a Rich Text Item via LotusScriptImports a text file (c:\temp\sample.txt) into a rich text Item named
"Body".
LotusScriptRlatulippe@romac.com
Import information from a Word document into a Notes documentThis script imports information from a Word document into a Notes document while standardizing the doc's formatting.LotusScriptRlatulippe@romac.com
Importing text file into notes using Lotus ScriptCreate a price list in notes from a comma separated file. Each line was one document.LotusScriptRlatulippe@romac.com
In one form, the user can select as many as three subforms from the list of all available subforms.Where do we get a list of subforms when we don't know from one minute to the next how many there are or what they are called? Simple, we use this LotusScript routineLotusScriptRlatulippe@romac.com
InitialsConverts a name to initialsFormulaRlatulippe@romac.com
Inport from a Word Document!This script imports information from a Word document into a Notes document while standardizing the doc's formatting.LotusScriptRlatulippe@romac.com
Inport From ODBC (Tech Incident Database Example)LotusScriptRlatulippe@romac.com
Interdatabase Access (LotusScript)Sets up connectivity amoung an application suite set in same path.LotusScriptRlatulippe@romac.com
Interdatabase Access (@Function Formulas)Technique used to build generic interdatabase access using the formula language. Takes into consideration for local no path.FormulaRlatulippe@romac.com
IsDST propertyThis agent prints one message or another depending on whether daylight savings is in effect..JavaRlatulippe@romac.com
IsEnabled property2. This example enables the agent named "Agent To Enable" if it exists in the current database.JavaRlatulippe@romac.com
IsEnabled property1. This script prints the status for each agent in the current database: enabled or disabled.JavaRlatulippe@romac.com
IsLogActions propertyThis agent disables and enables the action logging.JavaRlatulippe@romac.com
IsLogErrors propertyThis agent disables and enables error logging.JavaRlatulippe@romac.com
IsOnServer propertyThis agent gets names.nsf from the user's mail server if the program is running on a server, and from the local Notes directory otherwise.JavaRlatulippe@romac.com
IsOverwriteFile property2. This agent script sets the IsOverwriteFile property to true if the agent last ran over seven days ago. If the agent last ran within the last seven days, it sets the IsOverwriteFile property to false.JavaRlatulippe@romac.com
IsOverwriteFile property1. This script opens the over.txt file for logging. The existing contents of the file are removed before any actions or errors are logged.JavaRlatulippe@romac.com
IsPrime FunctionGiven a positive integer, determines if that integer is a prime number (A number is considered to be prime if it has no factors other than plus or minus itself and plus or minus one). Returns a Boolean value of True or False.LotusScriptRlatulippe@romac.com
IsPublic propertyThis script counts the number of public and personal agents in the current database.JavaRlatulippe@romac.com
IsPublic propertyThis script counts the number of public and personal agents in the current database.JavaRlatulippe@romac.com
JavaScript alertBox functionThis relatively simple alertBox function presents the user with a specified message and places the cursor back into the field that failed the validation.JavaScriptRlatulippe@romac.com
JavaScript failContains functionThe JavaScript failContains function looks like this:JavaScriptRlatulippe@romac.com
JavaScript function for failNullThe JavaScript function for failNull follows:JavaScriptRlatulippe@romac.com
JavaScript function trimBlanksThe trimBlanks function is a utility routine that simply takes the field value and trims any extra space values.JavaScriptRlatulippe@romac.com
Keyword formula to lookup a value in a view and return to fields to the keyword list.This formula reformats the user name as last name, comma, first name, taking care to handle hierarchical names. The formula looks up the reformatted user name in the Phone Numbers view of the current database and returns a list consisting of the values found in columns 2 and 3.FormulaRlatulippe@romac.com
LastExitStatus propertyThis example prints the last exit status of the current agent.JavaRlatulippe@romac.com
LastExitStatus propertyThis example prints the last exit status of the current agent.JavaRlatulippe@romac.com
LastRun propertyFor each agent in the current database, this example prints its name and the last time it ran.JavaRlatulippe@romac.com
LastRun propertyThis example prints the date and time that the agent last ran.JavaRlatulippe@romac.com
Launch a URL without using InterNotes?Launch a URL without using InterNotes?FormulaRlatulippe@romac.com
Limit deletes in QueryDocumentDelete to response documents onlyChecks to ensure that only response documents are being deleted.LotusScriptRlatulippe@romac.com
Limits a field's entry and removes illegal characters - Sample of Serial # Field Put this in a field's Input Validation formulaFormulaRlatulippe@romac.com
List ComparisonCompare two list and return only the values not found in both list.FormulaRlatulippe@romac.com
List OptimizationLists are one of the most powerful features in Domino. Here's an optimization technique. Instead of this formula:FormulaRlatulippe@romac.com
LocalTime property1. This agent prints the creation date and time of the current database in local time.JavaRlatulippe@romac.com
LocalTime property2. This agent sets the local date and time, then prints the date and time in local time and GMT.JavaRlatulippe@romac.com
LocalTime property3. This agent is the same as above but passes the date and time as integer values to setLocalDate and setLocalTime rather than as a string to setLocalTime.JavaRlatulippe@romac.com
Lock a document that is being edited?How do you lock a document that is being edited? Eric Koeler has written a set of functions for doing this in Notes 4.x. You can grab the code and a code sample at his web site. The Lotuscript code works by adding a lock field to the document the user wishes to edit and then immediately saving the document; when other users try to open the document, they will see that there is a lock field so they cannot edit the document. This technique will only work if the database is on a single server (no replication). There is also a small chance for a race condition if two users manage to read a document simultaneously without the lock. Finally, if the user's system crashes while editing this locked document, the document will remain locked unless you implement some sort of emergency unlock mechanism.LotusScriptRlatulippe@romac.com
LogAction methodThis agent logs actions to a mail memo. It performs a full text search on the current database, and logs one action for each document that matches the full text search query. Each time the logAction method is called, it adds a new line to the Body item of the mail memo. For example, if FTSearch returns a collection of three documents, the body of the mail memo looks like this: 10/25/97 12:26:37 PM Botany Agent starting
10/25/97 12:26:42 PM Document Petals placed in folder. 10/25/97 12:26:44 PM Document Stems placed in folder. 10/25/97 12:26:46 PM Document Leaves placed in folder.
JavaRlatulippe@romac.com
LogError methodThis agent searches for "Rocks" in the documents in the current database and logs an error message to logerror.log in the current Notes directory if no occurrences are found.JavaRlatulippe@romac.com
LogError methodThis agent searches for "Rocks" in the documents in the current database and logs an error message to logerror.log in the current Notes directory if no occurrences are found.JavaRlatulippe@romac.com
Lotus Notes OLE Automation with MS ExcelThis demo uses OLE automation to create Notes mail from within Microsoft Excel, sending cell values in the body of the mail message. This is a great and easy-to-write example of how to use the Notes client with MS Office products, using the best of both products. You can cut and paste this VBA code example into Excel.LotusScriptRlatulippe@romac.com
LotusScript Agent to Recalculate Documents on a ScheduleLotusScript Agent to Recalculate Documents on a ScheduleLotusScriptRlatulippe@romac.com
LotusScript Classes - ExamplesDemonstrates how to create and use a class called DisplayMsgLotusScriptRlatulippe@romac.com
LotusScript Notes AppendRTItem Method - Copy RichtextItem Font InformationLotusScript Notes AppendRTItem Method - Copy RichtextItem Font InformationLotusScriptRlatulippe@romac.com
LotusScript substitute for @DBLookupEver wanted to do a simple @DBLookup in LotusScript? Here's the code to do itLotusScriptRlatulippe@romac.com
lotus.notes.Agent class2. This example prints the names of all agents in the current databaset.JavaRlatulippe@romac.com
lotus.notes.Agent class1. This example prints the name of the current agent.JavaRlatulippe@romac.com
lotus.notes.Agent class1. This example prints the name of the current agent.JavaRlatulippe@romac.com
lotus.notes.DateRange class2. This example sets the StartDateTime and EndDateTime properties of a lotus.notes.DateRange object through the property methods, then displays the value of the Text propertyJavaRlatulippe@romac.com
lotus.notes.DateRange class4. This example sets a value for a lotus.notes.DateRange object, then changes the lotus.notes.DateTime object that the EndDateTime property is based on. This implicitly changes the EndDateTime property.JavaRlatulippe@romac.com
lotus.notes.DateRange class3. This example writes a value to the Text property, then displays the LocalTime property of the StartDateTime and EndDateTime properties (which are lotus.notes.DateTime objects).JavaRlatulippe@romac.com
lotus.notes.DateRange class1. This example sets the StartDateTime and EndDateTime properties of a lotus.notes.DateRange object through the createDateRange parameters, then displays the value of the Text property.JavaRlatulippe@romac.com
lotus.notes.DateTime class2. This agent checks the result of getLocalTime against null to determine that the format of a DateTime value is invalid.JavaRlatulippe@romac.com
lotus.notes.DateTime class3. This script creates a new lotus.notes.DateTime object that represents today's date and then prints it in local time. The time component of the lotus.notes.DateTime object is not set.JavaRlatulippe@romac.com
lotus.notes.DateTime class4. This script creates two new lotus.notes.DateTime objects. The first represents January 15, 1900; the second represents January 15, 2000.JavaRlatulippe@romac.com
lotus.notes.DateTime class1. This agent creates a new lotus.notes.DateTime object and prints it in local time and GMT.JavaRlatulippe@romac.com
lotus.notes.International classThis agent examines three international settings and displays a setting's value if it deviates from what the agent considers standard.JavaRlatulippe@romac.com
lotus.notes.Log class3. This example opens a Notes log and logs an error. The database agentlog.nsf must be based on the StdR4AgentLog template.JavaRlatulippe@romac.com
lotus.notes.Log class1. This agent opens a mail log and sends it to the current user when the log closes.JavaRlatulippe@romac.com
lotus.notes.Log class2. This agent opens a mail log, logs an action for each document in the current database, and sends the log to the current user when the log closes.JavaRlatulippe@romac.com
lotus.notes.Name classThis example displays properties of lotus.notes.Name that are not null.JavaRlatulippe@romac.com
lotus.notes.Name classThis example displays properties of lotus.notes.Name that are not null.JavaRlatulippe@romac.com
lotus.notes.Newsletter class2. This agent performs a full text search on the current database and creates a newsletter. The agent formats a newsletter document for each matching document and saves it in the database Reports.nsf.JavaRlatulippe@romac.com
lotus.notes.Newsletter class1. This agent performs a full text search on the current database and creates a newsletter. The agent formats a newsletter message containing a link to each matching document and sends it to the current user.JavaRlatulippe@romac.com
lotus.notes.Newsletter class1. This agent performs a full text search on the current database and creates a newsletter. The agent formats a newsletter message containing a link to each matching document and sends it to the current user.JavaRlatulippe@romac.com
lotus.notes.Newsletter class2. This agent performs a full text search on the current database and creates a newsletter. The agent formats a newsletter document for each matching document and saves it in the database Reports.nsf.JavaRlatulippe@romac.com
lotus.notes.Newsletter class1. This agent performs a full text search on the current database and creates a newsletter. The agent formats a newsletter message containing a link to each matching document and sends it to the current user.JavaRlatulippe@romac.com
lotus.notes.Session classThis agent creates a new lotus.notes.Session object and accesses its properties.JavaRlatulippe@romac.com
Low-level, self-contained, LotusScript
functions,
This file contains somewhat low-level, self-contained, LotusScript
functions, as well as some global constants used by these Functions. To use
these Functions, add the following line to the Declarations section of your
script module:
LotusScriptRlatulippe@romac.com
Luhn credit card algorithmValidates a credit card numberLotusScriptlotusnotes@mailcity.com
Mail a Lotus Notes document link through MS Outlook.Mails Link Through Outlook. This action button will create a link on the fly that will be saved to the users C:Drive as link.ndl then it will call the Subroutine AutomateOutlook. This routine will display the outlook mail modal with the link embedded in the body of the mail template. The user then fills in the To: field on the modal and sends the link. The Recipients of the mail must have Lotus Notes on their machine. When they click on the link in their Outlook mail. It will then launch Notes and the link.LotusScriptRlatulippe@romac.com
Mail notification that a new document was created from a web client.Web mail notification that a new document was created from the web.LotusScriptRlatulippe@romac.com
Make a view to use for checking for replication conflicts?Make a view to use for checking for replication conflicts.FormulaRlatulippe@romac.com
Making a Notes newsletter1. This agent creates a newsletter consisting of links to all the documents in the current database that contain the word "arachnid" and mails the newsletter to the current user.JavaRlatulippe@romac.com
Making a Notes newsletter2. This agent creates a newsletter consisting of a picture of the document for each document in the current database that contains the word "arachnid." The documents are saved in Reports.nsf.JavaRlatulippe@romac.com
Manipulating Rich TextManipulating Rich TextLotusScriptRlatulippe@romac.com
Mark Documents With Attachments With a PaperclipUse this formula in a view column to indicate that there are attachments associated with the document.FormulaRlatulippe@romac.com
Month Column CalculationsMonth Column CalculationsFormulaRlatulippe@romac.com
Move Orphan documents to Orphans FolderMoves all Orphan Documents to a folder called OrphansLotusScriptRlatulippe@romac.com
Move Orphans to FolderFinds orphan documents and moves them to a folderLotusScriptRlatulippe@romac.com
Moving an item within a listMoves an Item up or down in a listFormulaRlatulippe@romac.com
Moving file attachments added via the web to a RT field using $$QuerySaveAgentMoving file attachments added via the web to a RT field using $$QuerySaveAgentLotusScriptRlatulippe@romac.com
MS Excel Import, using OLEHere's an excel import, using OLE, that can be fairly easily modified to import anything that has OLE classes registered (it can be easily adapted to read every MS Project file in a directory, and pull out each task separately as a Notes document).LotusScriptRlatulippe@romac.com
Multiple "OR" conditions in SELECT StatementHere are two alternatives to using multiple OR statements.FormulaRlatulippe@romac.com
Multiple @Prompt EvaluationsWhen prompting a user and the next prompt is contingent on making an initial selection and not selecting CANCEL, follow this formula:FormulaRlatulippe@romac.com
Name property1. This example prints the name of the current agent.JavaRlatulippe@romac.com
Name property2. This example prints the names of all agents in the current databaset.JavaRlatulippe@romac.com
Notes R4, you are attempting to add a user's name to an Access Control List (ACL) via LotusScript. When you add the user's hierarchical name to the ACL via the NotesACL New method, however, the user is still unable to access the database.Add names to the ACL via LotusScriptLotusScriptRlatulippe@romac.com
Notes R4.5 LotusScript functions for synching an ODBC source with a Notes view.Notes R4.5 LotusScript functions for synching an ODBC source with a Notes
view.
LotusScriptEric Koeler ekoeler@panix.com
NotesACL and NotesACLEntry classesThe NotesACL class is used to give you access to a database's access control list (ACL). Once the ACL is accessible, NotesACLEntry can be used to retrieve all of the individual entries in the ACL using it's methods GetFirstEntry and GetNextEntry .LotusScriptRlatulippe@romac.com
NotesACL ClassThis example will ask you for the name of a role. Once the role name has been entered, all of the names in the role will be displayed.LotusScriptRlatulippe@romac.com
NotesDBDirectory classThe example below retrieves all databases included in the data directory and any directories below the data directory, and displays their titles.LotusScriptRlatulippe@romac.com
NotesDocument property .AuthorsRetrieves the authors of a given document in a Notes document by using the NotesDocument property . Authors .LotusScriptRlatulippe@romac.com
NotesDocumentCollection classThe example below uses GetFirstDocument and GetNextDocument to display the title of documents in the Intermediate view that contain the word "NotesDocumentCollection".LotusScriptRlatulippe@romac.com
NotesUI classesYou can use the NotesUI classes to create a document on the fly .LotusScriptRlatulippe@romac.com
NotesUIDocument method, DocumentRetrieves item values through the `back-end' document that corresponds to the currently open uidocument using the NotesUIDocument method, Document .LotusScriptRlatulippe@romac.com
NotesUIDocument method, SaveSave the on screen document that is set to a NotesUIDocument variable, use the NotesUIDocument method, Save .LotusScriptRlatulippe@romac.com
NotesUIDocument property, EditModeForces the on screen document into edit mode, using the NotesUIDocument property, EditMode .LotusScriptRlatulippe@romac.com
NotesVersion propertyThis program displays the version number of Notes installed in the local Notes directory.JavaRlatulippe@romac.com
NotesView method FTSearchUsing the NotesView method FTSearch , documents can be located and added to a document collection.LotusScriptRlatulippe@romac.com
Notify the author of a document when a response has been composed.Notify the author of a document when a response has been composed.FormulaRlatulippe@romac.com
Notifying Users of New Production DB'sUse the following database to add new DB's to users desktop.FormulaRlatulippe@romac.com
NumActions propertyThis agent prints the number of each action in the action message.JavaRlatulippe@romac.com
Number to Written ExpressionTranslates a number value to the equivalent written textFormulaRLatulippe@romac.com
NumErrors propertyThis agent prints the number of the error number in the log message.JavaRlatulippe@romac.com
ODBC Connection With Message Box to ask for ODBC DATA Source.During ODBC Connection gets Data Source from User.LotusScriptRlatulippe@romac.com
ODBC using LS:DO to push to an Oracle database.Pushes LotusNotes data to an Oracle database!LotusScriptRlatulippe@romac.com
OLE from Notes to Excel via LotusScriptCopies data from Notes to Excel using OLE automationLotusScriptRlatulippe@romac.com
One time push of Notes Documents to Oracle DatabaseThis agents write notes document into an Oracle database using ODBCLotusScriptRlatulippe@romac.com
One to many/many to one @ReplaceThe @Replace will do a replace of an exact match (one-by-one) of the elements of a text string. But what if you need to replace one element with several elements, or several elements with just one? The following formula is based on the following fields: TargetField: the field containing the text to be replcaced
Keyword: the "tolist"
KeywordOld: the "fromlist". The formula should be defined in a button, not a field computation in order to work.
FormulaRlatulippe@romac.com
Open a document in edit mode if it exists.Open a document in edit mode if it exists.LotusScriptRlatulippe@romac.com
Open a Document That Appears in a Hidden View.This macro is designed to open a document that appears in a hidden view:FormulaRlatulippe@romac.com
Open a Freelance Presentation via AutomationThis routine puts up a common dialog that prompts the user to select a Freelance presentation to open. If the user selects a file then it creates a Freelance automation session and opens the requested doc. It chops up the name returned from the dialog into file name and path parts for the open command. There may be a more standard way to do this but I couldn't find it.LotusScriptRlatulippe@romac.com
Open a view in full screen mode from a Navigator.Open a view in full screen mode from a Navigator.FormulaRlatulippe@romac.com
Open word and run one of the Macros.Opens Resume.doc on c:\ and runs a macro called macro1.LotusScriptRlatulippe@romac.com
OpenAgentLog methodThis agent opens the agent log and writes an action message to it.JavaRlatulippe@romac.com
OpenFileLog method2. This agent opens a file called over.TXT in the Notes directory. Each action and error gets appended to the file on a separate line after first writing over the existing contents of the file.JavaRlatulippe@romac.com
OpenFileLog method1. This agent opens a file called append.TXT in the Notes directory. Each action and error gets appended to the file on a separate line without writing over the existing contents of the file.JavaRlatulippe@romac.com
Opening a document from a buttonTo open a document from a button, in read mode, follow this formula For Example: If you would like to put a button on a Company form that will allow you to pick from a list of names associated with that company, and open the person's entry in read mode;FormulaRlatulippe@romac.com
OpenMailLog methodThis agent script opens up a mail log. When the close method is called, the mail memo is sent to the owner of the agent with the name of the agent and the title of the database in the Subject.JavaRlatulippe@romac.com
OpenNotesLog method1. This script opens AGENTLOG.NSF on the current computer. Each time an action or error is logged, a new document gets created in AGENTLOG.NSF.JavaRlatulippe@romac.com
Owner propertyThis example prints the name and common owner of all the agents in the current database.JavaRlatulippe@romac.com
Parent propertyThis example prints the name of the database on which the agent is running.JavaRlatulippe@romac.com
Percent Complete in scriptLotusScriptRlatulippe@romac.com
Perform a full text search on the current database. It sends the user a newsletter with linksThis action script allows the user to perform a full text search on the current database. It sends the user a newsletter with links to the top ten documents found in the search.LotusScriptRlatulippe@romac.com
Performing a SearchPerforming a SearchLotusScriptRlatulippe@romac.com
Phone Number Input TranslationThis formula will take any US phone number in any format, and change it to (###) ###-#### format.FormulaRlatulippe@romac.com
Phone # LookupUsers are prompted for a first and/or last name to lookup. The script searches local and public address books and returns each name found in it's own window displaying the full name, department, and office phone number.LotusScriptRlatulippe@romac.com
Pick listButton = Computer Purchase
The following order of commands was imposed by how Notes processes different types of commands.
FormulaRlatulippe@romac.com
Platform propertyThis program prints the name of the platform.JavaRlatulippe@romac.com
Populate Fields On Form Based On Selection of KeywordThis formula prompts the user to select a value and then populate additional fields on a form based on the selected value, (in this case to select from a list of Customer names being displayed in a view using the @DBColumn formula). This formula is typically used in a button, and is not recommended for large volumes of data that needs to be populated into a form, (use LotusScript to speed the population of data if this is a criteria).FormulaRlatulippe@romac.com
PostOpen Code to check we have correct Parent documentChecks the selected document from which we are creating reponse to ensure we have the correct parent form. If not Display error message and close response document.LotusScriptRlatulippe@romac.com
Precompute List of Monthly DatesThis formula generates a list of dates.FormulaRlatulippe@romac.com
Precompute List of Weekly DatesSets up keyword field with list of dates, all on the same day. Formula below set to calculate Fridays and return the next five Fridays. Formula can be altered easily to yield more dates, past dates, some past/some future dates, etc.FormulaRlatulippe@romac.com
Prevent deletion of document if response existChecks document to be deleted and prevents the deletion if a response existLotusScriptRlatulippe@romac.com
Prevent savesTo prevent saving a document. Place this in Input Validation. This is the simplest way to keep docs from being edited/saved.FormulaRlatulippe@romac.com
Preventing Line Wrap Within a Table CellIf you do not want your line to wrap within a table cell, follow this tip: Truncate the contents in a display field, and allow users to press the table cell popup to view the full text, which is stored in a hidden field.FormulaRlatulippe@romac.com
Preventing Orphan ResponsesWhen you delete a main document, its response documents are not automatically deleted They become "orphan response" documents. To prevent users from creating orphan responses, have the database object's Querydocumentdelete event trigger the following script:LotusScriptRlatulippe@romac.com
ProgramName propertyThis agent prints the program name.JavaRlatulippe@romac.com
Prompt User To Pick A Document To ComposeThis fomula prompts a user to pick from a list of available forms to create a document. When used in a button, Notes will prompt the user with a list of available forms to pick from .FormulaRlatulippe@romac.com
Prompt Users For A View To Select From A Navigator HotspotYou can use this formula to prompt a user to select which view they want to see when they click on a hotspot of a navigator, (or from a button or action button).FormulaRlatulippe@romac.com
Prompting Users To Fill In FieldsYou can use the @ Prompt function to prompt users to enter information into a form. For example, you can use a button to prompt users to enter information about their company bowling team without forcing them to move from field to field. This method is often used to make sure users enter information into required fields without the user worrying that they are missing a field.FormulaRlatulippe@romac.com
Pulling a Value From Current Table Cell With LotusScriptThe following script retrieves the contents of the currently selected cell, rounds it to two decimals,
and then writes is back to same cell. This assumes that the data in the cell is numeric.
LotusScriptRlatulippe@romac.com
Purge AgentCreated By: Teresa Deane on 02/07/96 at 03:58 PM
Category: System Minimum required Notes: Notes 4.0
Author: Teresa Deane
Company: Iris Associates
E-Mail Address: InterNotes@iris.com Description of the Agent: This agent manages the database size based on selections in the administration note. It is set to run at 1:00AM nightly. It is a system agent which ships with the Web
Navigator template. Please refer to the Web Navigator Administration Guide for more information. Agent Script:
LotusScriptRlatulippe@romac.com
Pushing changes down the hierarchyThe following LotusScript which will take a value in the parent document and push it
down into all the response documents. Place the script in the Querysave event of your parent form.
LotusScriptRlatulippe@romac.com
Quarter Column CalculationQuarter Column Calculation FormulaFormulaRlatulippe@romac.com
Query propertyThis script prints the name and query of every agent in the current database.JavaRlatulippe@romac.com
QueryDocumentDelete Event to prevent deletion of any document that contains response documents.Disallows deletion of any documents that contains a response document.LotusScriptRlatulippe@romac.com
QueryDocumentDelete Event. When a document is selected for deletion delete all response and response to response documents as well.If a document selected for deletion has response it warns the user that those will also be deleted. It then pushes all response documents and response to response into a delete folder.LotusScriptRlatulippe@romac.com
QueryDocumentDelete script to prevent deletion of a document marked as PermanentAfter I accidentally deleted an important document in one of our databases, I wrote this
little script to prevent it from happening again. This script will disable deletion of
any document (even by managers)marked as "Permanent" in a keyword, checkbox field on the
document form. This agent runs in the QueryDocummentDelete event of the database.
LotusScriptRlatulippe@romac.com
Queydocumentdelete eventWill warn user of deletion of seleted documentsLotusScriptRlatulippe@romac.com
Quicksort one less recursive callDoes a quicksort on an array!LotusScriptRlatulippe@romac.com
Quoted ReplyLotusScriptRlatulippe@romac.com
Reassign Form AgentDatabase: A support desk application
Purpose: Change form name if user is a supervsior. New form allows edit of assign field.
FormulaRlatulippe@romac.com
Reference other databasesLotusScriptRlatulippe@romac.com
Refresh a View from within a Document Using Script in Notes R4To refresh a view from within a document, you must perform both the backend NotesView Refresh and the frontend NotesUIDocument ViewRefresh methods (before exiting out to the view)LotusScriptRlatulippe@romac.com
Refresh AgentThis agent refreshes non-private http pages nightly at 3:00 AM provided that they have not been brought in already that day. This is a system agent which ships with the Web Navigator template. Please refer to the Web Navigator Administration Guide for more information.LotusScriptRlatulippe@romac.com
Refresh Authors or Readers Fields Updated via LotusScript Back-endLotusScriptRlatulippe@romac.com
Reloading Rich TextA common problem encountered by Notes developers is the limitation of the NotesUIDocument Reload() method. When you open a document and make changes to its back-end version, you can call the Reload method to display the updates in the front-end version. Changes to rich text fields, however, won't show up. As a workaround, you can close and reopen the current document automatically. For example, the following form action button script takes the current document, appends text to its Body field, closes it, then reopens it. This example assumes there is a view named "AllByUNID" which contains all the documents in the database sorted by UNID.LotusScriptRlatulippe@romac.com
Remove all occurrences of a character from a stringEg: to remove all the letters "x", "y" and "z" from a text field (plain text only, not rich text!)FormulaRlatulippe@romac.com
Remove methodThis script removes the agent in the current database named "Agent To Run."JavaRlatulippe@romac.com
Remove methodThis script removes the agent in the current database named "Agent To Delete."JavaRlatulippe@romac.com
Removing a View from a Database using the NotesView method, Remove.It is possible to remove a view entirely from a database. To accomplish this, use the NotesView method, Remove .LotusScriptRlatulippe@romac.com
Removing an Item from All Documents in the DatabaseRemoving an Item from All Documents in the DatabaseLotusScriptRlatulippe@romac.com
Removing Old Documents with an AgentThis set of Agents will update the database removing old documents. Because of the nature of background Agents, the second Agent is required to reset the status of each document. (Background Agents only run on those documents not yet processed by the Agent, so the second Agent resets a field, thus making it "new" to the first Agent on the next periodic basis) Warning: this will re-set the unread marks in the database!FormulaRlatulippe@romac.com
Removing Stored Form FieldsYou can removed the Stored Form fields in a document if you decided that you no longer want to store a form with a set of documents because of the additional memory and disk space required. To remove the fields, you can create an agent that looks for a particular value in a document and then deletes the specified fields in that document as shown below. You then assocate a new value in the new Form Field to indicate what form you want to use to display the data.FormulaRlatulippe@romac.com
Rename a Notes view with LotusScript?Rename a Notes view with LotusScript? The following example will rename a Notes view. IMPORTANT NOTE: The following is a sample script, provided only to illustrate one way to
approach this issue. In order for this example to perform as intended, the script must be laid out
exactly as indicated below. Notes Support will not be able to customize this script for a customer's
own configuration. 1. Define an agent with the following script: 2. Launch the agent. 3. Close all windows related to the database. 4. Reopen the database. The view is now renamed.
LotusScriptRlatulippe@romac.com
Replacement class for AgentContextReplaces lotus.notes.AgentContextJavaRlatulippe@romac.com
Replacement class for SessionReplaces lotus.notes.Session classJavaRlatulippe@romac.com
Required fieldFormulaRlatulippe@romac.com
Retrieve the name of the Default View in a Database using the NotesView property, IsDefaultView. It is possible to retrieve the name of the default view in a database using the NotesView property, IsDefaultView . Since IsDefaultView is a property of each individual view in the database, it is necessary to test each view in a database until the default view is found.LotusScriptRlatulippe@romac.com
Retrieve the Names of all the Views in a Database using the NotesView property, NameRetrieves the names of all the views in a database, use the NotesView property, Name in conjunction with the NotesDatabase View property and the ForAll statement.LotusScriptRlatulippe@romac.com
Retrieving Specific Help DocumentWhile in a document, there may be a need for additional help. This action uses @Picklist to pull up the help view, the user selects which help document is needed, then brings up the actual document. A simple Save & Return action button on the help doc gets the user back to their original document. Need a sorted view using a temporary variable assigned to @Picklist as the key. Found in the Worldwide Coutry Registration database.FormulaRlatulippe@romac.com
Retrieving the Names of all the Columns in a View using NotesView property, ColumnsThe example below will retrieve each column in the Intermediate view. The column title will be displayed if it exists, otherwise the user will be notified on the lack of a column title.LotusScriptRlatulippe@romac.com
Retrieving values from within a fieldThis formula retrieves value from a field and creates a dialog box containing a list, using the Formula One Toolkit function calls. In this case, the button, when pressed, goes into another database, called Name & Address Book, looks up a group document for the group Portfolio Managers, retrives all names in that group, then places them in a dialog box. TYhe user chooses one, which is placed in the other database where this button is. Found in WWCR on the Fund form, button labeled "PortFolio Managers"FormulaRlatulippe@romac.com
Retrive one level of Child Documents from Parent Documenst using GetChild.The example below will demonstrate how to retrieve information from a parent document, along with any child (response) documents associated with the parent document.LotusScriptRlatulippe@romac.com
Retriving Parent and Child Documenst from a ViewThis example demonstrates how to retreive a parent document from a view, and then proceed to retreive information from all of the Parent's child documents.LotusScriptRlatulippe@romac.com
Retriving Parent Documents with Child and Grandchild DocumentsThis example demonstrates how to retrieve information from a parent document in a view, and all of the Parent's child and grandchild documents.LotusScriptRlatulippe@romac.com
Returning a Subset of a ListThe formulas below will return various subsets of a list.FormulaRlatulippe@romac.com
Rules for Creating LotusScript Agents that Execute from a Web BrowserBelow are a list of items to keep in mind while creating LotusScript agents that will be executed from a web browser.LotusScriptRlatulippe@romac.com
Running @Command on Multiple DocumentsThe @Command function can only be run on one document at a time (i.e., You cannot select two or more documents that Compose a document for each of them). In order to use this command on multiple documents, follow these procedures:FormulaRlatulippe@romac.com
Sampling of SQL Statements that Can Be Used with NotesSQL commands that can be used with Notes?LotusScriptRlatulippe@romac.com
Save and Exit a DocumentUsually used in an Action button or a button in a form, this formula tells Notes to Save a document, and then exit it.FormulaRlatulippe@romac.com
SavedData propertyThis example uses the save data record to find the maximum weekly sales.The data records have Weeky_Sales and Name fields. The saved data record has MaxSales and MaxSales_Salesperson fields. The data record fields replace the agent record fields whenever Weekly_Sales is greater than MaxSales.JavaRlatulippe@romac.com
Scheduled agent that attaches file to documents.LotusScriptRlatulippe@romac.com
Script changes the an item on each document selected in a viewThis view action script changes the Status item on each document selected in a view. If someone else edits one of the documents at the same time, the document is not saved. Instead, a response document that contains the change to the Status item is created and saved.LotusScriptRlatulippe@romac.com
Script Libraries - ExamplesScript Libraries - ExamplesLotusScriptRlatulippe@romac.com
Searching Notes DatabasesSearching Notes DatabasesLotusScriptRlatulippe@romac.com
Searching the WebSearching the WebLotusScriptRlatulippe@romac.com
Select Case with Enum valuesYou can get this to work by treating the Enums as strings. In particular, see the modified script below.LotusScriptRlatulippe@romac.com
Selection FormulaSelects people for hidden lookup view, based on values in their job title. This is used in the employee directory.FormulaRlatulippe@romac.com
Selection Formula for document collection used in db.searchThis formula will be used by db.search method to select documents by form and by fields that are equal to some variable sPrimary.LotusScriptRlatulippe@romac.com
Send Fax Mail as HIGH PriorityField name is DeliveryPriority. Checks to see if last domain listed on Sendto field is Fax. If yes, then send high priority.FormulaRlatulippe@romac.com
Send Notification With DocLink Back To DocumentThis formula sends a notification to another user with a doclink that takes the user back to the original document. This is an ideal way to centralize data in a database while notifying users by mail that there is work waiting for them in another database.FormulaRlatulippe@romac.com
Sending an e-mail message to the author of the current documentSends and E-mail to author of current document!LotusScriptRlatulippe@romac.com
ServerName property1. This script prints the name and server name of the current agent.JavaRlatulippe@romac.com
ServerName property2. This script sets the server name of the current agent to the asterisk (*), indicating that the agent can run on any server.JavaRlatulippe@romac.com
Set a dialog box to "always on-top"Editor's Note (11/30/95): This example uses 16 bit Windows API calls and will not work in the 32 bit. For the same functionality in the 32 bit version of Word Pro, change the Declare statements to the appropriate 32 bit Window API call. Place the following declarations in the Globals, and the Dialogevent code in your dialog box object, and the dialog box will be set to be always on top, even when you switch to another application. Note: this will probably not work with dialog bars, since they are child windows of Word Pro, not top level windows like normal dialogs. Note2: This will be slighly easier (and more robust) when the GetHwnd method is implemented for CustomDialog.LotusScriptRlatulippe@romac.com
Set Fields using FTGSetFieldsThe purpose of placing an "FTGSetFields" field onto a form is to provide a single location where formula's would reside that either set or modify field values. The benefit is that all of this type of code would reside in one location.FormulaRlatulippe@romac.com
Set SubtractionScenario: You have set A {1,2,3,4,5,6,7,8} and you have set B {1,2,3}, and you need to know what members of set A are NOT in set B. Follow this tip: Application: Very often people need to fill out timesheets or some other form on a regular basis. It's very easy to see who has filled out the required form for the required date. Just build a view. But how do you show who hasn't filled out the required form for the required date. You can't do it in a view since there are no documents to show. The solution is to calculate the names and show them in a special document created just for this purpose. Using DBLookups you can create your SetA and SetB list. SetA is a list of all the people that have ever filled out the form. The assumption is that if a person has filled out a form in the past, they must still be filling out forms (actually you can put in code to account for terminated people). Set B is created by looking up the names of people that have filled out the form for the date in question. You have an editable field for the date in question. Just enter the date, press F9. You've got your list of delinquents. You can also have a button to mail memos to the unlucky winners, to prompt them to get the required documents in on time.FormulaRlatulippe@romac.com
setEnvironmentVar method1. This script sets the value of the $HomeTown environment variable to "Tokyo."JavaRlatulippe@romac.com
setEnvironmentVar method2. This script sets the value of the MailServer system environment variable to "Tornado."JavaRlatulippe@romac.com
SetNow methodThis agent increments the current time by 2 months and appends this value to the PurgeDate item.JavaRlatulippe@romac.com
Setting values in several documents without opening them depending on a change in a different documentchecks docs created with a second form and does a collection depending on a field value then sets the status field of teh collected docs to closed.LotusScriptRlatulippe@romac.com
Share scripts among elements in a database
Share scripts among elements in a databaseLotusScriptRlatulippe@romac.com
Showing different Subforms on the WebSometimes a document might be to big or to confusing to fill out as one document on the web. One way to break up this document is to create multiple subforms, and on the submit of the form change the subform and reload the page.FormulaRlatulippe@romac.com
Showing different Subforms on the WebSometimes a document might be to big or to confusing to fill out as one document on the web. One way to break up this document is to create multiple subforms, and on the submit of the form change the subform and reload the page. This method will involve a computed subform, the webquerysave or $$ querysaveagent event, and a field called ChangeSubForm. The Agent will assume that is the ChangeSubForm field equals SubForm2 then the document is finished and it should be submitted.LotusScriptRlatulippe@romac.com
Simple Test for Reading from an ODBC Data Source Using LotusScriptThe following test script will evaluate whether you can read from an ODBC source using
LotusScript
LotusScriptRlatulippe@romac.com
Simple Test for Writing to an ODBC Data Source Using LotusScriptThe following test script will evaluate whether you can write to an ODBC source using
LotusScript.
LotusScriptRlatulippe@romac.com
Sleep or Wait code'Puts the app to sleep for the given number of millisecondsLotusScriptRlatulippe@romac.com
Social Security FormatLotusScriptRlatulippe@romac.com
Something to watch out for with Str$This is documented, but I totally missed it, and I figure others might as well. In Ami Pro, we didn't really have to worry about data types; it was all handled internally for us. But with LotusScript, we sometimes need to do some conversions. An example is changing a number over to it's string representation. For this, you usually use Str$. But watch out! Str$ returns a leading space. So, Str$(1) actually returns " 1". Usually this won't matter, but in some cases it can come back to bite you. Here's some example code where Str$ doesn't work as expected because of the leading space...LotusScriptRlatulippe@romac.com
Sort - Bubble Sort AlgorithmSorts an array of data using the Bubble Sort AlgorithmLotusScriptRlatulippe@romac.com
Sort - Bubble Sort for a Document CollectionSorts a Document CollectionLotusScriptRlatulippe@romac.com
Sort - Quicksort Algorithm recursiveSorts an array of data using the recursive Quicksort AlgorithmLotusScriptRlatulippe@romac.com
Sort - QuickSort, IBMsThe following is an example of how to use LotusScript code within NotesViP
to sort an array.
LotusScriptRlatulippe@romac.com
Sort columns by a fieldSimple way to organize docs in a view. Place to the left of the column you want to sort, and make decending. Use your own field for "Status".FormulaRlatulippe@romac.com
Sorting a Text ListThis formula will sort a text list (without numbers or punctuation). You can adjust the accuracy from 1 to 10 characters. This formula is designed to work in a field. Replace Values with your text list, and change the Accuracy variable to meet your needs. Long lists work faster with lower accuracy numbers.FormulaRlatulippe@romac.com
Sorting Lists of NumbersThis formula will sort a list of numbers with these limits: - Largest Number can be 9,999,999.99
- Largest number of elements is approximately 8000
- Decimal accuracy to 2 digits. These are the general limits. The formula will actually handle 9 numbers and 1 decimal "." per element.
FormulaRlatulippe@romac.com
Spell Check Action for a fieldHilights text in a field and performs a spell check when button is pressed.FormulaRlatulippe@romac.com
SrvNameDetermines the name of the user's mail server, if it's on a server or if it's localFormulaRlatulippe@romac.com
STRING TOKENIZINGSTRING TOKENIZING. A very common programming problem is one where you have a string of characters, that you'd like to split into individual chunks (or tokens). Typically, white space (created by inserting spaces and tabs) is used to separate one token from the next. The Java language provides an easy way to solve this problem: the java.util.StringTokenizer class. You create a new instance of StringTokenizer, specifying a string to be tokenized. Then hasMoreTokens and nextToken are called repeatedly to obtain the next token from the string.JavaRlatulippe@romac.com
SubmitDocument function that controls the document submit.The submitDocument function includes the input validation function calls to test the field values, as shown below:JavaScriptRlatulippe@romac.com
Subtracts one array from another!This script takes two arrays and subtracts the smaller array from the larger array.LotusScriptRlatulippe@romac.com
Sum a List of ValuesConcept
Have you tried adding two list of numbers together? 1:1:1:1 + 1:1:1:1 = 2:2:2:2. Now lets split the resultant list and add the two list together. 2:2 + 2:2 = 4:4. Now do it again. 4 + 4 = 8. So if you start with the list 1:1:1:1:1:1:1:1 and use this process you would get your answer of 8. That's all there is to it. A little more to it. Obviously your list has to contain a number of elements equal to a power of 2. That's the first thing to fix. 1:1:1:1:1:1:1:1:1:1
1:1:1:1:1:1:1:1 1:1
1:1 1:1:1:1:1:1 1:1 1:1 + 1:1
2:2
Now concatenate the new list with the leftover list
2:2:1:1:1:1:1:1 Limits
There is a self imposed limit of 8192 elements that can be added together. The formula can be extended to add together millions of elements but there must always be a limit. 8192 was chosen for two reasons. 1: A number takes 8 bytes in LN. A lookup can only return 64k. Only 8192 numbers will fit into 64k. 2: A field on a form has the same limit. I've found that the fact of being a list also takes some of that 64k space and further limit the number of elements. Formula
Put the list in a field called values and pass it to the formula
FormulaRlatulippe@romac.com
Sum number fields which have not been edited and
initialized
Sum number fields which have not been edited and
initialized.
FormulaRlatulippe@romac.com
Telephone Formatting : (input Translation)Telephone Formatting : (input Translation)FormulaRlatulippe@romac.com
Testing for browser typeThe following example tests for the browser type and version.JavaScriptRlatulippe@romac.com
The replacement class for AgentContextReplaces lotus.notes.JavaRlatulippe@romac.com
This button formula is part of a navigator. The script prompts the user and opens a view selected by the user.This button formula is part of a navigator. The script prompts the user and opens a view selected by the user.FormulaRlatulippe@romac.com
This button formula is useful in a mail message to a group of persons.When the recipient clicks the button, the script sends a mail message
indicating "Yes" or "No" for the "RSVP." For testing, the name of the current user is used--in practice, you can use your name.
FormulaRlatulippe@romac.com
This button script displays the sum of all OrderTotal fields in a database for one day.Each record in the database has OrderNumber, Date, and OrderTotal fields. The script finds all the documents in the database, then uses a loop and a comparison of dates to limit processing to today's documents. For each document, the script adds the OrderTotal to a dailyTotal variable.LotusScriptRlatulippe@romac.com
This button script is useful in a mail message to a group of persons.1. When the recipient clicks the button, the script sends a mail message
indicating "Yes" or "No" for the "RSVP." For testing, the name of the current user is used--in practice, you would use your name.
LotusScriptRlatulippe@romac.com
This formula puts the name of the current weekday in the column, except that Saturdays and Sundays are treated as Fridays. This formula puts the name of the current weekday in the column, except that Saturdays and Sundays are treated as Fridays.FormulaRlatulippe@romac.com
This formula reformats the contents of Person_Name to put the last name first followed by a comma, a space, and the first name. This formula reformats the contents of Person_Name to put the last name first followed by a comma, a space, and the first name.FormulaRlatulippe@romac.com
This script imports information from documents in another database.This script imports information from documents in another database.LotusScriptRlatulippe@romac.com
TimeDifference methodThis agent calculates the number of days since a document was created.JavaRlatulippe@romac.com
TimeOnly propertyThis agent prints the creation time of the current database.JavaRlatulippe@romac.com
TimeZone propertyThis agent prints the time zone in the creationDateSaved item of each document in the current database.JavaRlatulippe@romac.com
Toggling Values using a ButtonThe following formula allows you to "toggle" between values using a button. For example, a field that displays either a yes or no value is a good use of this technique. See the formula below using a Yes/No example:FormulaRlatulippe@romac.com
Toggling view action buttonsEver have a situation where you have too many buttons in the view action bar? Using a toggling mechanism helps to "compartamentalize" view action buttons according to their functionality. For example, in a sales application, you may have buttons that would help display only profiles, such as company or contact. You also may have buttons to display actions, such as creating letters, or new contacts.FormulaRlatulippe@romac.com
Track who changed a critical field.How do you track who changed a critical field?FormulaRlatulippe@romac.com
Tracking who changed a critical fieldAdd an audit trail of the modifications made to a critical field:- In this case the field is named "PRIORITY"FormulaRlatulippe@romac.com
UnprocessedDocuments propertyIf this agent runs on selected documents, getUnprocessedDocuments returns the selected documents.JavaRlatulippe@romac.com
unprocessedFTSearch methodThis agent runs on all or selected documents. It puts all documents that contain the word "botany" in the folder "Botanist's Delight."JavaRlatulippe@romac.com
unprocessedSearch methodThis example searches all or selected documents for documents created after January 1, 1997 that contain "botany" in the Subject field, and places them in the "Botanist's Delight" folder.JavaRlatulippe@romac.com
unprocessedSearch methodThis example searches all or selected documents for documents created after January 1, 1997 that contain "botany" in the Subject field, and places them in the "Botanist's Delight" folder.JavaRlatulippe@romac.com
unprocessedSearch methodThis example searches all or selected documents for documents created after January 1, 1997 that contain "botany" in the Subject field, and places them in the "Botanist's Delight" folder.JavaRlatulippe@romac.com
Update a field in all the response documents from a field that has changed in the parent document.The following LotusScript which will take a value in the parent document and push it
down into all the response documents. Place the script in the Querysave event of your parent form.
LotusScriptRlatulippe@romac.com
Update a field in response documents after it is changed in
the parent document?
How do you update a field in response documents after it is changed in
the parent document?
LotusScriptRlatulippe@romac.com
Update IsReader or IsAuthor agent when the field has been changed to a text field.LotusScriptRlatulippe@romac.com
Update Oracle records via LotusScript agentThis database keys on a record in Oracle and then updates the record from the notes Document.LotusScriptRlatulippe@romac.com
Update the full text index of the current database.This script updates the full text index of the current database if the database has been modified since the time the index was updated.LotusScriptRlatulippe@romac.com
Update the parent document from response doc.It will check the document is being saved and if a field exist called $Ref (which is on reponse docs) it will look at the parent and change the "Status" field to "Updated"LotusScriptRlatulippe@romac.com
Update two fields on the main document from two fields entered on this latest response document.?A button macro on the Main Document to compose a new response has the following formula:FormulaRlatulippe@romac.com
updateProcessedDoc methodThis example is for an agent that runs on newly created and modified documents since the last run. The program gets the unprocessed documents, prints each Subject item, and marks each document as processed. The first time the agent runs, getUnprocessedDocuments returns all of the documents in the database. Thereafter, getUnprocessedDocuments returns those documents that updateProcessedDoc has not touched.JavaRlatulippe@romac.com
Updating a UIdoc in Read Mode with a DialogBoxFor a variety of reasons, such as formatting, you want to keep a document in read mode, but you need to collect input from a user and update the document they are currently reading. In this example, we want to keep the user in read mode but update the documentLotusScriptRlatulippe@romac.com
Updating Oracle database from Lotus NotesYou can use the ODBC (Open Database Connectivity) Version 2.0 standard to access data in non-Notes databases. Using formulas or scripts embedded in Notes objects, you can integrate the data from many external databases into Notes applications. For example, a customer call-tracking application in Notes can access customer financial data from an ODBC-compliant relational database management system.LotusScriptRlatulippe@romac.com
Updating Parent when Child changes A Notes formula for updating parents when a child
changes in Notes R3/4.
Updating Parent when Child changes A Notes formula for updating parents when a child changes in Notes R3/4.FormulaRlatulippe@romac.com
Updating the backend NotesDocument in the QueryOpen Event.When the QueryOpen event is triggered, the Notes document is already loaded into the memory but nothing is displayed on the screen yet. You can take this chance to change the values of some of the fields. For example, you can count how many times a document has been opened (or who opened it) without having to put the document into edit mode.LotusScriptRlatulippe@romac.com
Use FrontEnd Classes to pass Current Document to Backend classes!LotusScriptRlatulippe@romac.com
Use LotusScript to handle ordinary text filesThe following example script opens the lotus.ini file and prints out its contents to screen:LotusScriptRlatulippe@romac.com
Use the backend class to manipulate the data exchange between a dialog box and the underlying document.When NotesUIWorkspaceDialogBox brings up a dialog box, the backend class is always there whether or not the underlying document is saved to the disk or not. When you click OK on the dialog box, the Querysave event will not be called, but the Queryclose event is called. For example, you want to do some calculations based on user's input and passed the result to the underlying document or determine which field not to pass. You can use [ noNewFields ] , [ noFieldUpdate ] to accomplish this to a certain degree, but here a way to mix saved and unsaved items. This function performs SomeComplicatedCalculation( ) on the item "Year" and then removes it so it is not passed back to the document. In this example, year is set as a default value on the underlying document and may be changed in the dialog box; however, when the dialog box is saved the original default shouldn't be modified.LotusScriptRlatulippe@romac.com
UserName propertyThe following agent prints the user name.JavaRlatulippe@romac.com
UserNameObject propertyThis agent gets a Name object for the current user and prints the common user name.JavaRlatulippe@romac.com
UserNameObject propertyThis agent gets a Name object for the current user and prints the common user name.JavaRlatulippe@romac.com
Using a dialog box allow a manager to assign roles to a readers field on the fly to various documentsThis code allows a db Manager to assign various roles on the fly to a readers field on the document. The roles are called from a (GetRoles) form that is used as a dialog box to allow th euser to select various roles in the ACL.LotusScriptRlatulippe@romac.com
Using environment variables2. This agent example prints the value of a system environment variable. The second argument to getEnvironmentString is true so that a dollar sign is not prepended to the name of the environment variable.JavaRlatulippe@romac.com
Using environment variables
1. This example increments the environment variable $SeqNo by one and prints the result. (This script would not be reliable on a server for maintaining a system of sequential numbers.)JavaRlatulippe@romac.com
Using Lists in LotusScriptLists are very powerful in LotusScript. You can use a list to get a multi-value field from a document and add the values to a list (thus ensuring uniqueness). You can then process many documents against the same list and when you are done, you will have a list of all of the values which appeared at least once in the set of documents you processed.LotusScriptRlatulippe@romac.com
Using LotusScript for Unattended File Import in a Notes ViewLotusScriptRlatulippe@romac.com
Using LotusScript to Read from Non-Notes DatabasesUsing LotusScript to Read from Non-Notes DatabasesLotusScriptRlatulippe@romac.com
Using LotusScript to Read from Non-Notes Databases - Challenge*Using LotusScript to Read from Non-Notes Databases - Challenge*LotusScriptRlatulippe@romac.com
Using LotusScript to Write to a Non-Notes DatabaseUsing LotusScript to Write to a Non-Notes DatabaseLotusScriptRlatulippe@romac.com
Using the LotusScript Data Object (LS:DO) Error MethodsThe following information explains how to use the LotusScript Data Object (LS:DO) error
methods.
LotusScriptRlatulippe@romac.com
Using UnprocessedDocuments on all newly created and modified documents, to modify the Status item of each document it processes.This agent script runs on all newly created and modified documents, and its purpose is to modify the Status item of each document it processes.LotusScriptRlatulippe@romac.com
Using UnprocessedDocuments on all unread documents, to put unread documents into a folder. This agent script runs on all unread documents, and its purpose is to put unread documents into a folder.LotusScriptRlatulippe@romac.com
Using UnprocessedDocuments to iterate through a view and , if the Approver item contains the current user's name, it sets the Approved item to "Yes."This view action script allows a user to approve multiple requisitions at once by processing the currently selected documents in the Requisitions view. UnprocessedDocuments returns the documents currently selected in the view. The script iterates over each document and, if the Approver item contains the current user's name, it sets the Approved item to "Yes."LotusScriptRlatulippe@romac.com
Using $PaperColor to dynamically change background color of a document.Using $PaperColor to dynamically change background color of a document.FormulaRlatulippe@romac.com
Using @Prompt and @DbLookup to simulate @Picklist but only on a subset of documentsWe have a view in a seperate database whose first column is $Ref. We want to pull a only those documents matching the parent I.D. that we pass but want to display to the user something readable. So we use Concatenated DbLookups in an @Prompt to let the user see the name they wish to select. We then parse out the selected documents I.D. so we can pull in its data in PostOpen code.FormulaRlatulippe@romac.com
Using @UserName in a view.Use @Username in a viewFormulaRlatulippe@romac.com
Validate Social SecurityTry the following code to validate your social security number.LotusScriptRlatulippe@romac.com
Validate that a field has alpha characters only.How do you validate that a field has alpha characters only?FormulaRlatulippe@romac.com
Validate The Number of Digits in a FieldIf you have a field (in this case called partNumber) which should contain a value (such as a part number) which must be of a particular length, then use this type of formula in the validation formula to check the field to make sure the correct number of digits has been entered.FormulaRlatulippe@romac.com
Validating a date field while allowing no date to be entered.This was used to validate a date field, several date fields were used in sequence and it was not required that they be filled at time of document compose. However this allowed the date field to be saved and prevented the default error message!FormulaRlatulippe@romac.com
Via LotusScript, Insert a Computed Subform Based on Preview Pane Status?It is not possible to accomplish this completely in LotusScript, since LotusScript does not manipulate subforms. You must use of a formula in a computed subfield in addition to a LotusScript in the QueryOpen event of the form.LotusScriptRlatulippe@romac.com
View Count analysisEnables the ability to allow Notes to send an email massage when someone opens a view. Great for doing an analysis on who uses a particular view and how often. Since this goes to your mail file, can create folders specific to the analysis so the data can be better presented.FormulaRlatulippe@romac.com
View Selection for Current Month DocumentsThis View Selection Formula returns only documents created during the current calendar month.FormulaRlatulippe@romac.com
Web Counter using Profile Document@function interfaces so that you can avoid using up the agent process. A computed-for-display field with the following formula will act as a counter for notes and web access with a timestamp and keeping the counter by document id fields within a single profile document:FormulaRlatulippe@romac.com
WeekEndingFormulaRlatulippe@romac.com
What's the date of the Last Thursday in November?In the following function getdateByWeekDayFromBack(1998,11,1,5) returns the last Thursday of Nov.LotusScriptRlatulippe@romac.com
What's the date of the Last Thursday in November?Returns the last Thursday of Nov.FormulaRlatulippe@romac.com
What are Properties in LotusScript?Properties in LotusScript? How are they used?LotusScriptRlatulippe@romac.com
What are the Unix syntaxes for calling DLLs from LotusScript?LotusScriptRlatulippe@romac.com
What is the Difference Between Type and Class in LotusScript?A detailed description of both Types and Classes is below.LotusScriptRlatulippe@romac.com
What week is it?Some applications require calculations based on the week of the year. Here's the ISO standard on week calculations: "Numerical representation of a period of seven calendar days, starting with Monday and numbered from 01 to 53, with
number 01 assigned to the first week containing at least four days of the new year, and preceded by the letter "W" if needed in order to avoid misunderstanding."
FormulaRlatulippe@romac.com
When Looping Through a ResultSet, While.NextRow Is Not RecommendedInstead of While.NextRow, use Do at the beginning of the loop and the condition at the end, with a statement
such as "Loop Until res.IsEndOfData."
LotusScriptRlatulippe@romac.com
Who can edit a field is determined by reading a group of users from view and comparing them to the current userUpon entering a field, a view is read to determine if the person can edit that field. The view that is read is created from a form that has the key eEngine value and the persons in the aTest_Eng (test engineers) field.LotusScriptRlatulippe@romac.com
Window Formula - Responces, New, SubjectWindows FormulaFormulaRlatulippe@romac.com
Windows directoryReturns the Windows directoryLotusScriptRlatulippe@romac.com
Working with dates from an external data sourceYou are working on a Y2000 project. Your application reads data from an external source. You want all the dates read in to be convert to mm/dd/yyyy format. If you are thing about using the following codeFormulaRlatulippe@romac.com
Working with Embedded Objects and Environment VariablesWorking with Embedded Objects and Environment VariablesLotusScriptRlatulippe@romac.com
Working with Notes time2. This agent determines the earliest and latest creation dates for all the documents in the current database, and creates a DateRange object using these dates.JavaRlatulippe@romac.com
Working with Notes time1. This agent gets the creation date of the current database into a DateTime object, prints the date-time in local time and GMT time, converts the time to zone 15 time, and prints the zone 15 time.JavaRlatulippe@romac.com
Working with the Windows APIIn developing advanced applications, it's often important to access functions of the operating system. This is an example of calls to the registry.LotusScriptRlatulippe@romac.com
Y2K Compliant Date Format CheckerThese two JavaScript functions form a Y2K compliant date format checker. They will handle dates in US format mm/dd/yy or mm/dd/yyyyJavaScriptRlatulippe@romac.com
@DbColumn(ODBC)FormulaRlatulippe@romac.com
@DbCommand(ODBC)Given data source information from the ODBC.INI file, uses this information to activate the appropriate ODBC driver. The driver then locates the specified DBMS, passes the specified command to it for processing, and returns the data retrieved by that command.FormulaRlatulippe@romac.com
@DbLookup( ODBC)Given data source information from the ODBC.INI file, uses this information to activate the appropriate ODBC driver. The driver then locates the specified DBMS, table, and column, and returns only the values in that column belonging to records whose value in the key column matches the specified key. You can optionally specify whether the returned list of values is sorted, whether duplicate values are deleted, and how null values are handled.FormulaRlatulippe@romac.com
1
Hide details for 04/06/200004/06/2000
Radio Button & CheckBox get valuesfunction returns the value of the selected radio button/checkboxesJavaScriptJake Ochs
1
Hide details for 03/16/200003/16/2000
Convert date range to list of datesEnumerates all dates between two datesFormulaJamie Magee
2
Hide details for 02/28/200002/28/2000
Converting seconds to d:h:m:sFormularobert.j.wragg@britishairways.com
Supress Hotspots in view displayHTMLrobert.j.wragg@britishairways.com
1
Hide details for 12/03/199912/03/1999
Suppress Domino agent HEAD tagsAllows your agents to insert your own HEAD element tags such as TITLE and
META.
LotusScript,HTMLBruce Elgort (BruceElgort@PalmBuilder.com)
1
Hide details for 11/10/199911/10/1999
Detecting Roles in ScriptLotusScriptBen Vander Veen
1
Hide details for 11/04/199911/04/1999
Trim functionSimulates @Trim in JavaScriptJavaScriptDaryl Rochette
1
Hide details for 10/31/199910/31/1999
Month number to nameConverts 1 to January, 2 to February, etc.FormulaJamie Magee
1
Hide details for 10/25/199910/25/1999
mci LibLotusScriptdetlef.janssen-seegert@europe.eds.com
1
Hide details for 10/23/199910/23/1999
text input field in every row of a viewFormula,HTML,JavaScriptZvonko.Paunoski@icn.siemens.de
1
Hide details for 10/21/199910/21/1999
Web form field change, triggering a JavaScript enabled button on same form Formula,HTML,JavaScriptZvonko.Paunoski@icn.siemens.de
2
Hide details for 10/20/199910/20/1999
Memory leak checking for LotusScriptCode that you can place at beginning and end of an agent to see if it is leaking memoryLotusScriptjohn@dalsgaard-data.dk
Removes file attachments from Notes documentsRemoves file attachments from Notes documents that are older than X days old.LotusScriptJamie Magee
1
Hide details for 10/17/199910/17/1999
Remove Attachments from Selected DocsLotusScriptAnonymous
2
Hide details for 10/07/199910/07/1999
ACL adjustment from browserLotusScriptZvonko.Paunoski@icn.siemens.de
Dynamic table generationFormula-generated HTML tables are very powerful, extremely fast, and give you a lot of control that even native Domino tables can not provide.FormulaJamie Magee
1
Hide details for 08/27/199908/27/1999
Ticker TapeJavaScriptMackie
1
Hide details for 07/22/199907/22/1999
Autorefresh all view indexesAutomatically refreshes all view indexes each night.LotusScriptJamie Magee
1
Hide details for 06/30/199906/30/1999
MailStuff LibraryLotusScriptDon Bechtold (beck@eki-consulting.com)
1
Hide details for 06/15/199906/15/1999
Prevent save confictsLotusScriptssaavedra@anp.gov.br / pmello@anp.gov.br
1
Hide details for 06/08/199906/08/1999
Layout region 3d framesGraphical pieces that you can combine to form 3d frames within a layout region.GraphicsJamie Magee
1
Hide details for 05/17/199905/17/1999
Non-Notes Doc LinksFormula,LotusScriptjawsct@home.com
1
Hide details for 05/13/199905/13/1999
Input translation for SSNFormulajlosensk@dyntec.com
1
Hide details for 05/12/199905/12/1999
extensive numeric valueLotusScriptAlexsandre - aandrade@arboll.com.br / Samantha - samantha@arboll.com.br
1
Hide details for 04/17/199904/17/1999
Return to previous page after submit.Returns user to page from which a form was openedFormula,JavaScriptJamie Magee
1
Hide details for 04/11/199904/11/1999
Private view deletionThe best way to remove all of a user's private views on a dbLotusScriptJamie Magee
1
Hide details for 04/08/199904/08/1999
Javascript Back ButtonJavaScript
1
Hide details for 03/19/199903/19/1999
Word Doc CreateCreates a MSWord doc with header block from Notes field dataLotusScriptMackie
1
Hide details for 03/04/199903/04/1999
ExportViewLotusScriptAnonymous
1
Hide details for 02/24/199902/24/1999
Converts a view to a design list of foldersModifies a view so it that displays the names all the folders in the databaseLotusScriptMackie
1
Hide details for 02/19/199902/19/1999
View Name changeLotusScriptAnonymous
11
Hide details for 02/13/199902/13/1999
Day of the YearComputes the day number of the yearFormulaRlatulippe@romac.com
DBLookup for a RangeReturns a value (i.e. Approver for a specified dollar amount) which relates to a range of valuesFormulaRLatulippe@romac.com
Execute DOS commandsExecute DOS commands from a formulaFormulaRlatulippe@romac.com
Make the loser the winnerAgent to promote the loser of a replication conflict to be the winnerLotusScriptKcpauli@usa.net
Percent complete in status barDisplays a percent complete progress indicator in the print area at the bottom of users screenLotusScriptJared Knapp
Phone Number input translationtake any US phone number in any format, and change it to (###) ###-#### formatFormulaJamie Magee
PhoneNumber formatAuto formats US numbers if user does notFormulaRlatulippe@romac.com
Pop-up CalendarPresents a calendar of the current month when clickedFormulaRlatulippe@romac.com
Sorting a text listFor a specified accuracy, formula sorts a text list.FormulaRlatulippe@romac.com
WeekdayComputes number of weekdays between two dates.FormulaRlatulippe@romac.com
Weekending dateWeekending date for a specific dateFormulaRlatulippe@romac.com
2
Hide details for 02/12/199902/12/1999
Image dimensionsGets dimensions of a JPEG or GIF imageLotusScriptJohn Toton
Language Translator subformProvides a link where a user can translate the current page into any language on AltaVista TranslatorJavaScriptJamie Magee
1
Hide details for 02/04/199902/04/1999
Design Object Maintenancebuilds an array of DESIGNOBJECTS
which returns the noteid of a design note
LotusScriptDon Bechtold (bettndon@flash.net)
1
Hide details for 02/03/199902/03/1999
Get paramter value from query stringLotusScriptNiels Ull Harremoes
1
Hide details for 02/02/199902/02/1999
Delete Private Views for a UserDelete the database icon from the user's workspace and re-add it. Deleting the database will cause all the Private Views to be removed. When the
user re-opens the database, new Private Views (with the updated design) will be created.
FormulaKey Solutions
4
Hide details for 01/31/199901/31/1999
Attach doclinks to all childrenAttach links to all "children docs" in parentdoc automaticallyLotusScriptMackie
Create new Data Source for text filePut in button to create new data source automaticallyLotusScriptMackie
Search and ReplaceSearches for a term in a target string and replaces it with another string.JavaScriptJamie Magee
Warn of InternetIf users send mail to an Internet address - they get a warning messageFormulaMackie
1
Hide details for 01/29/199901/29/1999
Download Attachments from a ViewFormula,HTMLZvonko.Paunoski@icn.siemens.de
1
Hide details for 01/27/199901/27/1999
Automate Outlook Mail From NotesLotusScriptRlatulippe@romac.com
1
Hide details for 01/25/199901/25/1999
Attachment in viewsFormula,HTMLNiels Ull Harremoes
1
Hide details for 01/15/199901/15/1999
Export to text fileLotusScriptMackie
1
Hide details for 12/29/199812/29/1998
Matrix class for DBMS/Web table dataAllows retrieval, collation, cross-tabbing, sorting, normalization, HTML conversion, etc. of tabular data from RDBMS or Notes view.LotusScriptJamie Magee
1
Hide details for 12/21/199812/21/1998
Progress barDisplays and controls the Notes progress bar from LotusScriptLotusScriptMark Dixon/Ives
3
Hide details for 12/17/199812/17/1998
Array Manipulation functionsCommonly used functions for array manipulations: Explode, Implode, AddValues, RemoveEntries, RemoveNthEntriesLotusScriptJoseph Francis/IBM
Keep from getting framedEnsure that your site will load into the top level of the window, even if the author linking to your site fails to use the target attribute. JavaScriptLotus-Dev.Net
Queue, stack and enumeratorThe very-most-basic functions of an object queue, stack and enumerator. LotusScriptPaul Everett/IBM
15
Hide details for 12/15/199812/15/1998
Change a view name with LotusScriptUse API routines exposed in Notes client DLLs to change the name of a view.LotusScriptBill Ernest
Convert multi-value items to JavaScript arraysParse the values stored within a Notes multi-value field and place them into individual elements within a JavaScript array.JavaScriptJamie Magee
Credit card validation function (ROT13)Returns true if a string is a valid credit card number.LotusScriptJamie Magee
Date Range Intersection detectionGiven lists of StartTimes, EndTimes, Persons, and EventNames, determines which Persons/Events intersect a proposed event with StartTimeProposed, EndTimeProposed.FormulaJamie Magee
Debug Web Agents with useful error messagesDisplays exact error and line number on browser for QSA and QOALotusScriptJamie Magee
Extract text from Notes table cellsProgramatically searches for the tab and line feed characters that separate the cells of a Notes table.LotusScriptLotus
isInArray function in LotusScriptReturns true if string is contained in the arrayLotusScriptJamie Magee
LotusScript manipulation of Design notesUse API routines exposed in Notes client DLLs to do just about anything to Design notes or other Notes objects.LotusScriptBill Ernest
Mail-in agentScript agent shell to process newly arrived mail documents. Just plug in your own processing code.LotusScriptJamie Magee
Number list generatorGenerates 1,2,3,4,5,6...N in a listFormulaJamie Magee
Page hit counter (simple)Increments each time it recomputesFormulaJamie Magee
QuickSortSorts any array via a combination of Insertion Sort and Quicksort.LotusScriptLotus
Role and Group Membership routinesAdds persons to roles, checks membership in GroupsLotusScriptMarcus Laubli
Sorting and searching routinesSelection sort, binary search, and merge-sort routinesLotusScriptLes Szklanny
Table generation (RTF) in LotusScriptDynamically create a RTF table with user defined rows, columns, column width, font, size, center, italic and/or
bold text attributes
LotusScriptCarlos Matos, Fusion Systems Japan
1
Hide details for 12/12/199812/12/1998
Web popup confirmation to delete documentButton pops up a web dialog, asking user if they really want to delete the document.JavaScriptJamie Magee
1
Hide details for 11/25/199811/25/1998
Keywords for 50 statesKeywords for 50 states and two-letter abbreviationsText/KeywordsJamie Magee
1
Hide details for 11/24/199811/24/1998
Tabbed Form graphics kitGraphical tabs pre-dimensioned and colored for Notes layout regionsGraphicsJamie Magee
842