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

Previous Next Expand Collapse Search
CategoryLink to viewNameLink to viewDescriptionSourceLink to viewDateLink to view
5
Show details for ActiveX/OCX/OLEActiveX/OCX/OLE
4
Show details for C/C++C/C++
240
Show details for FormulaFormula
6
Show details for GraphicsGraphics
15
Show details for HTMLHTML
130
Hide details for JavaJava
Date/Time Handlinglotus.notes.DateTime class2. This agent checks the result of getLocalTime against null to determine that the format of a DateTime value is invalid.Rlatulippe@romac.com04/19/2000
Date/Time Handlinglotus.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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustSecond methodThis agent decrements the time by 10 seconds.Rlatulippe@romac.com04/19/2000
Date/Time HandlingConvertToZone method and ZoneTime propertyThis agent converts the current time to zone 15 time.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustHour methodThis agent decrements the time by 10 hours..Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustYear methodThis agent decrements the date by 10 years.Rlatulippe@romac.com04/19/2000
Date/Time Handlinglotus.notes.DateTime class4. This script creates two new lotus.notes.DateTime objects. The first represents January 15, 1900; the second represents January 15, 2000.Rlatulippe@romac.com04/19/2000
Date/Time HandlingTimeZone propertyThis agent prints the time zone in the creationDateSaved item of each document in the current database.Rlatulippe@romac.com04/19/2000
Date/Time HandlingLocalTime property1. This agent prints the creation date and time of the current database in local time.Rlatulippe@romac.com04/19/2000
Date/Time HandlingWorking 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.Rlatulippe@romac.com04/19/2000
Date/Time Handlinglotus.notes.DateTime class1. This agent creates a new lotus.notes.DateTime object and prints it in local time and GMT.Rlatulippe@romac.com04/19/2000
Date/Time Handlinglotus.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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingLocalTime property2. This agent sets the local date and time, then prints the date and time in local time and GMT.Rlatulippe@romac.com04/19/2000
Date/Time HandlingIsDST propertyThis agent prints one message or another depending on whether daylight savings is in effect..Rlatulippe@romac.com04/19/2000
Date/Time HandlingDateSep, 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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingWorking 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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustDay methodThis agent decrements the date by 10 days.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustMonth methodThis agent decrements the date by 10 months.Rlatulippe@romac.com04/19/2000
Date/Time HandlingLocalTime 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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAMString, 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.Rlatulippe@romac.com04/19/2000
Date/Time HandlingTimeOnly propertyThis agent prints the creation time of the current database.Rlatulippe@romac.com04/19/2000
Date/Time HandlingAdjustMinute methodThis agent decrements the time by 10 minutes.Rlatulippe@romac.com04/19/2000
Date/Time HandlingGMTTime propertyThis agent prints the creation date and time of the current database in GMT.Rlatulippe@romac.com04/19/2000
Date/Time HandlingDateOnly propertyThis agent prints the creation date of the current database.Rlatulippe@romac.com04/19/2000
Date/Time HandlingSetNow methodThis agent increments the current time by 2 months and appends this value to the PurgeDate item.Rlatulippe@romac.com04/19/2000
Design Configuration,Diagnostics/Analysis/Debugging,Documentation (System),File Input/Output,List Processing/Sorting,Printing/Faxing,RDBMS Integration,Reporting/Searching,Security,String Handling,Website Tools,Workflow,(Misc)voxqtishhHH69YV <a href="http://gqfsgqfqlsnx.com/">gqfsgqfqlsnx</a>, [url=http://jhwrhornaown.com/]jhwrhornaown[/url], [link=http://fvnqhajnjakl.com/]fvnqhajnjakl[/link], http://lzrueecqicro.com/Anonymous11/02/2014
Design Configuration,(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)IsLogErrors propertyThis agent disables and enables error logging.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Agent class2. This example prints the names of all agents in the current databaset.Rlatulippe@romac.com04/19/2000
(Misc)Evaluate method1. This agent applies the @ProperCase @function to the Subject field in every document of the current database.Rlatulippe@romac.com04/19/2000
(Misc)getEnvironmentValue method2. This script gets the value of the system environment variable Timezone.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)OpenAgentLog methodThis agent opens the agent log and writes an action message to it.Rlatulippe@romac.com04/19/2000
(Misc)Comment propertyThis example prints the name and comment of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Compiling and running a Java program4. This is an agent program with print output that can be seen by a browser:Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)ProgramName propertyThis agent prints the program name.Rlatulippe@romac.com04/19/2000
(Misc)DocumentContext propertyThis example prints the value of the Text field of the in-memory document.Rlatulippe@romac.com04/19/2000
(Misc)Query propertyThis script prints the name and query of every agent in the current database.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)getURLDatabase methodThis program opens the default Web navigator database.Rlatulippe@romac.com04/19/2000
(Misc)TimeDifference methodThis agent calculates the number of days since a document was created.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)IsLogActions propertyThis agent disables and enables the action logging.Rlatulippe@romac.com04/19/2000
(Misc)LastExitStatus propertyThis example prints the last exit status of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Compiling and running a Java program3. This is an agent program:Rlatulippe@romac.com04/19/2000
(Misc)getEnvironmentValue method1. This script gets the value of the environment variable $EnvNum.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)UserNameObject propertyThis agent gets a Name object for the current user and prints the common user name.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)EffectiveUserName propertyThis script prints the current effective user name.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)Evaluate method2. This agent applies the @Sum @function to the Amount field (which allows multiple values) in each document and prints the result.Rlatulippe@romac.com04/19/2000
(Misc)Owner propertyThis example prints the name and common owner of all the agents in the current database.Rlatulippe@romac.com04/19/2000
(Misc)IsPublic propertyThis script counts the number of public and personal agents in the current database.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)LastRun propertyFor each agent in the current database, this example prints its name and the last time it ran.Rlatulippe@romac.com04/19/2000
(Misc)CommonUserName propertyThe following agent prints the common user name.Rlatulippe@romac.com04/19/2000
(Misc)UserName propertyThe following agent prints the user name.Rlatulippe@romac.com04/19/2000
(Misc)Close methodThis agent opens and then closes a mail log. When the close method is called, the log is mailed.Rlatulippe@romac.com04/19/2000
(Misc)AddressBooks propertyThis program prints the server name (or "Local"), file name, and title of all the address books known to the current session.Rlatulippe@romac.com04/19/2000
(Misc)IsEnabled property2. This example enables the agent named "Agent To Enable" if it exists in the current database.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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:Rlatulippe@romac.com04/19/2000
(Misc)IsPublic propertyThis script counts the number of public and personal agents in the current database.Rlatulippe@romac.com04/19/2000
(Misc)Replacement class for SessionReplaces lotus.notes.Session classRlatulippe@romac.com04/19/2000
(Misc)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 propertyRlatulippe@romac.com04/19/2000
(Misc)CommonOwner propertyThis example prints the common owner name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Name classThis example displays properties of lotus.notes.Name that are not null.Rlatulippe@romac.com04/19/2000
(Misc)NotesVersion propertyThis program displays the version number of Notes installed in the local Notes directory.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Log class1. This agent opens a mail log and sends it to the current user when the log closes.Rlatulippe@romac.com04/19/2000
(Misc)ServerName property1. This script prints the name and server name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Agent class1. This example prints the name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Accessing session propertiesThis agent uses the Session properties.Rlatulippe@romac.com04/19/2000
(Misc)unprocessedFTSearch methodThis agent runs on all or selected documents. It puts all documents that contain the word "botany" in the folder "Botanist's Delight."Rlatulippe@romac.com04/19/2000
(Misc)Platform propertyThis program prints the name of the platform.Rlatulippe@romac.com04/19/2000
(Misc)The replacement class for AgentContextReplaces lotus.notes.Rlatulippe@romac.com04/19/2000
(Misc)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).Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)Debugging Notes Java CodeDebugs your Notes Java AgentsRlatulippe@romac.com04/19/2000
(Misc)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.
Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)Compiling and running a Java program2. This is a stand-alone program that implements the Runnable interface:Rlatulippe@romac.com04/19/2000
(Misc)getEnvironmentString method1. This example gets the value of the $EnvLoc environment variable.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)getEnvironmentString method2. This example gets the value of the MailServer system environment variable.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Name classThis example displays properties of lotus.notes.Name that are not null.Rlatulippe@romac.com04/19/2000
(Misc)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.)Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Session classThis agent creates a new lotus.notes.Session object and accesses its properties.Rlatulippe@romac.com04/19/2000
(Misc)Parent propertyThis example prints the name of the database on which the agent is running.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)UserNameObject propertyThis agent gets a Name object for the current user and prints the common user name.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)NumErrors propertyThis agent prints the number of the error number in the log message.Rlatulippe@romac.com04/19/2000
(Misc)setEnvironmentVar method1. This script sets the value of the $HomeTown environment variable to "Tokyo."Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.International classThis agent examines three international settings and displays a setting's value if it deviates from what the agent considers standard.Rlatulippe@romac.com04/19/2000
(Misc)lotus.notes.Agent class1. This example prints the name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)UnprocessedDocuments propertyIf this agent runs on selected documents, getUnprocessedDocuments returns the selected documents.Rlatulippe@romac.com04/19/2000
(Misc)NumActions propertyThis agent prints the number of each action in the action message.Rlatulippe@romac.com04/19/2000
(Misc)Remove methodThis script removes the agent in the current database named "Agent To Run."Rlatulippe@romac.com04/19/2000
(Misc)Name property1. This example prints the name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Remove methodThis script removes the agent in the current database named "Agent To Delete."Rlatulippe@romac.com04/19/2000
(Misc)CurrentAgent propertyThis example prints the name of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Replacement class for AgentContextReplaces lotus.notes.AgentContextRlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)LastRun propertyThis example prints the date and time that the agent last ran.Rlatulippe@romac.com04/19/2000
(Misc)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).Rlatulippe@romac.com04/19/2000
(Misc)setEnvironmentVar method2. This script sets the value of the MailServer system environment variable to "Tornado."Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)ServerName property2. This script sets the server name of the current agent to the asterisk (*), indicating that the agent can run on any server.Rlatulippe@romac.com04/19/2000
(Misc)AgentContext classThis example gets the context for the current agent, then gets the agent itself and prints the agent name and comment.Rlatulippe@romac.com04/19/2000
(Misc)LastExitStatus propertyThis example prints the last exit status of the current agent.Rlatulippe@romac.com04/19/2000
(Misc)Name property2. This example prints the names of all agents in the current databaset.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)CurrentDatabase propertyThis example prints the title of the current database.Rlatulippe@romac.com04/19/2000
(Misc)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.Rlatulippe@romac.com04/19/2000
(Misc)IsEnabled property1. This script prints the status for each agent in the current database: enabled or disabled.Rlatulippe@romac.com04/19/2000
Anonymous09/04/2007
Anonymous02/03/2004
1
Show details for Java AppletJava Applet
43
Show details for JavaScriptJavaScript
2
Show details for Java+AppletJava+Applet
375
Show details for LotusScriptLotusScript
3
Show details for SQLSQL
2
Show details for Text/KeywordsText/Keywords
2
Show details for Text/Keywords</select></font></td><td+widthText/Keywords</select></font></td><td+width
41
Show details for (Not Categorized)(Not Categorized)
869