| Blog Posts |
135

|
Is there a way to programmatically change Database Properties for a database? 
Sun, Dec 7th 2008 3:59a Jakob Majkilde Yes there is. Most of the database properties is stored in the $flags field on the icon note - and can be modified by Lotus Script. Details can be found in this Technote or in WoonBlog by Ninke Westra (where I found it) [read] Keywords: ibm
lotus
database
properties
|
76

|
Live text and Widgets 
Sat, Dec 6th 2008 4:52p Jakob Majkilde LiveText is just awesome. If you don't know what I'am talking about, watch the IBM Demo Getting started: * Articles and Step-by-step instructions can be found in the blog from Alan Lepofsky. * The tutorial is great - in 3-4 hours a guided tour will teach you all you need to know... :-) Learning Regular Expressions: * Tutorial and samples -> http://www.regular-expressions.info/ * You can test your expression here -> http://regex.powertoy.org/ * or buy a regular expression builde [read] Keywords: admin
domino
ibm
ldd
lotus
notes
widget
widgets
wiki
|
78

|
Word Integration 
Sat, Dec 6th 2008 11:52a Jakob Majkilde In this article, I'll show how you can launch word from Lotus Notes and transfer data to/from bookmarks in the word document Create a new Word document Set obj = CreateObject("Word.Application") Call obj.add() set w = obj.ActiveWindow Create a Word document from a file Set obj = CreateObject("Word.Application") Call obj.documents.open( filename ) Set w = obj.ActiveDocument To save the changes you can use Call w.save() or [read] Keywords: document
lotus
notes
script library
template
application
database
integration
microsoft
openntf
properties
|
100

|
Excel integration 
Sat, Dec 6th 2008 8:55a Jakob Majkilde From Lotus Script you can use CreateObject( "Excel.Application") to get access to all the Excel classes. Now it is easy to create a new Excel sheet and fill it with data from Lotus Notes. Sample 1: Using a template file Set excel = CreateObject("Excel.Application") Set book = excel.Workbooks.open( filename ) Set sheet = excel.Worksheets( 1 ) excel.Visible = True Sample 2: Creating a new blank sheet Set excel = CreateObject("Excel.Application") [read] Keywords: agent
ldd
lotus
lotusscript
notes
template
application
database
integration
|
132

|
How to copy/paste a ReplicaID 
Sat, Dec 6th 2008 5:52a Jakob Majkilde You can see the ReplicaID on the Info tab in the database properties - but you can't copy from here. Instead you can open the database and double click on the select button in the addressbar (see screenshot). now you have the complete notes url to the database - and you can easily copy/paste the replicaid (or document unid or view id) from here. Another way is to open the Document properties box - on the meta tab (marked with an +) you wil find the complete notes url in the 'identifier' field [read] Keywords: document
notes
database
mobile
properties
|
109

|
Newline codes in Notes documents 
Thu, Dec 4th 2008 4:52a Jakob Majkilde If you write this value to a Notes document: "Hello" & Chr( 10 ) & "World" Notes will automatically convert the Chr( 10 ) to a full 2 bytes newline: Chr( 13 ) & Chr( 10 ) Don't know if this is good or bad - but it took me some time to figure out why the strings on my document was changed... Sample code: Dim session As New NotesSession Dim doc As NotesDocument Set doc = session.CurrentDatabase.CreateDocument Dim s As String s = "Hello" & Chr( 10 ) & "World" 'Use Chr( 13 ) & [read] Keywords: document
notes
|
89

|
Lotus Documentation 
Wed, Dec 3rd 2008 5:51a Jakob Majkilde In this site you can find a lot of Lotus documentation. I have just been using the "Programming Guide, Volume 4: XML, Domino DTD, and JSP Tags" found on the Designer 7 page. You can also use the official documenentation site [read] Keywords: designer
domino
ibm
ldd
lotus
xml
|
126

|
@transform 
Tue, Nov 25th 2008 6:52a Jakob Majkilde Have been using this for the first time today. It is a very powerful function - I will be using this more often in the future. Today I used it to remove all role names from a list: @Trim( @Transform( authors; "name"; @If( @begins( name;"[" );"";name )) ); Check the Notes Designer help for more examples [read] Keywords: designer
notes
|
225

|
Designer.exe hack 
Sat, Nov 22nd 2008 3:47a Jakob Majkilde When supporting a user, you might need the Designer client. Luckily, you don't have to install it - it's allready there. To enable, just goto the Notes program folder and create a file called 'designer.exe' (use notepad to create a new file, then rename). Restart Notes, and you have the Designer icons in the bookmark bar... :-) [read] Keywords: designer
notes
|
16

|
Start Notes 8 in basic mode 
Wed, Nov 12th 2008 7:53a Jakob Majkilde Just append a '-sa' param to your shortcut: "C:\Program Files otes otes.exe" -sa or just start the nlnotes.exe instead This will start Notes in basic mode without the Eclipse framework [read] Keywords: notes
eclipse
|
7

|
Start iNotes lite 
Wed, Nov 12th 2008 7:31a Jakob Majkilde Just append "&ui=dwa_lite" in the url to start the light version of Domino Web Access [read] Keywords: domino
inotes
|
9

|
Environ( "Temp" ) 
Mon, Nov 10th 2008 3:51p Jakob Majkilde Environ( "Temp" ) returns the windows temp path. You can use the 'SET' command from a cmd window in windows to view all the envionment variables, e.g. HOMEDRIVE=C: HOMEPATH=\Documents and Settings\Jakob Majkilde LOGONSERVER=\\MAJKILDE-LAPTOP NUMBER_OF_PROCESSORS=2 OS=Windows_NT [read] Keywords: laptop
|
10

|
Controlling scheduled agents 
Mon, Nov 10th 2008 3:45p Jakob Majkilde When you activate a scheduled agent, it will run right away. To prevent this, you can include the following code: If session.IsOnServer Then 'don't check if agent is activated by the user If Not session.CurrentAgent.HasRunSinceModified Then Print "Agent activated - will run as scheduled" : End End If Then the agent will only run when scheduled - and not when activated. If you want to run the agent right away, on the server, you can use a 'launcher' age [read] Keywords: agent
script library
database
server
|
7

|
BUG: Can't read from the document if a frame is named 'NotesView' 
Sat, Nov 8th 2008 8:53a Jakob Majkilde I have a form with one field (called 'value') and one button with this formula: @prompt([ok];"Value";value); Then I create a frameset with 2 frames: - Frame 1 is called 'NotesView' and contains something (a view?) - Frame 2 contains my sample form If I type a value in the field and click the button, it will display an empty box - and not the value?!? If I rename the frameset, the button works - or if I just use the form without the frameset.... Download sample database [read] Keywords: document
formula
bug
database
|
6

|
@IfError is obsolete in R7 
Tue, Nov 4th 2008 2:11p Jakob Majkilde Oh no! What is this? I have used the function everywhere, instead of the older @IsError construction: _res := @Dblookup.... @if( @isError( _res ); ""; _res ) and now it's obsolete....!! I feel exactly like Spanky's [read] Keywords: dblookup
R7
|
8

|
Passthru html on a form 
Tue, Nov 4th 2008 2:06p Jakob Majkilde To display html on a document, you must enable the "Render pass through HTML in Notes" option on the form properties You can use html: On the form In Computet Text In RichText fieldBut not in regular summary fields. Notice that the html is only rendered when the document is loaded (like: computet when composed) [read] Keywords: document
notes
richtext
properties
|
7

|
Working with WebServices 
Tue, Nov 4th 2008 1:30p Jakob Majkilde Creating a WebService consumer. This can be done in many ways, depending of the platform: Notes 8: Builtin functionality - Create a new Lotus Script library and click the 'Import WSDL' button below Notes 7: Use Stubby to create a Java agent. Also check this error page. If your WSDL file is version 1.2 you can try downgrading the file (download, edit and remove all the version 1.2 stuff), then use Stubby Notes 7 and Notes 8: Java can be a problem. It's platform independent, but only runs in s [read] Keywords: agent
lotus
lotusscript
notes
script library
bug
database
java
microsoft
openntf
server
vista
xml
|
10

|
Controlling replication 
Tue, Nov 4th 2008 4:01a Jakob Majkilde On the form properties you can set the 'Conflict Action' option, and control how replication conflicts should be handled. This property will set the "$ConflictAction" field on the documents (and therefor only works on new documents). You can set the $ConflictAction field from LotusScript. Values are:$ConflictAction="" (or no field) : Create Conflicts$ConflictAction="1" : Merge Conflicts$ConflictAction="3" : Merge/No Conflicts. $ConflictAction="3" : Do Not Create ConflictsNotice: Value "2" is not [read] Keywords: lotus
lotusscript
properties
|
4

|
Use the view column name to reuse column formulas 
Mon, Nov 3rd 2008 7:57a Jakob Majkilde You can use the column programmtic name in the formulas for other columns. In this way you can refer to the result from another column... [read] Keywords: |
3

|
Best practice: Looping on a document collection 
Sun, Nov 2nd 2008 3:51p Jakob Majkilde This is the loop I always use on document collections/views. You have to check for deleted/valid documents, and often also for conflicts. You can use some nested IF...THEN...ELSE - but this will make the code har to read. Instead I use a simpel goto construction - and with this you can easily add more checks to the code... Do Until doc Is Nothing If doc.IsDeleted Then Goto NEXTDOC If Not doc.IsValid Then Goto NEXTDOC If doc.HasItem( "$Conflict" ) Then Goto NEXTDOC NEXTDOC: set doc = coll.getNe [read] Keywords: document
best practice
|
4

|
Modulus11 check 
Sun, Nov 2nd 2008 12:44p Jakob Majkilde Modulus11 check is used to validate the danish CPR and CVR numbers (Personal and company registration numbers) The IsValid function below, returns true if the number is valid. Class Modulus11 '######################################################## Sub new() '------------------------------------------------------------------------------------------------------------------ End Sub %REM n: Number with no checksum %END REM Fun [read] Keywords: |
6

|
Press 'Enter' In A Field And Trigger An Action 
Sun, Nov 2nd 2008 12:40p Jakob Majkilde I just love this tip from 'Interface | matters' - has been using it several times for input fields, typically search fields. [read] Keywords: interface
|
5

|
Convert a Notes DocLink to an URL 
Sun, Nov 2nd 2008 12:27p Jakob Majkilde With the NotesRichTextNavigator to can search a richtext item and find all the DocLinks. With the NotesRichTextDoclink class it is easy to extract information about the link, e.g. servernavn, replicaid and document unid. In this sample, I get the first DocLink in the 'Link' field and converts it to a Notes URL (notes://) - this is saved in a field called 'Link' A more generic class to handle links can be found in the Developer Toolbox database (the NotesLink script library) Sub Postsave(Sou [read] Keywords: document
notes
richtext
script library
database
server
|
8

|
The Unfinished LotusScript Book 
Sun, Nov 2nd 2008 10:17a Jakob Majkilde This book is written by Julian Robichaux. It's old, but still great reading Download from here [read] Keywords: lotusscript
|
9

|
Notes RSS Reader 
Sun, Nov 2nd 2008 9:42a Jakob Majkilde Just finished my Lotus Notes RSS Reader application. You can download it from my homepage [read] Keywords: lotus
notes
application
mobile
|
10

|
Parsing XML - building a RSS Reader 
Sun, Nov 2nd 2008 8:27a Jakob Majkilde Still working on my RSS Reader application for Lotus Notes. Need to read a rss feed from Lotus Script. Unfortunately the NotesDOMParse can't read from an external address (like an URL or RSS feed) - so I have to use the Microsoft DOM Parser instead. The function CreateDOM creates a handle to the MSXML.DomDocument and sets the defaults. Now, you just need to load the url and traverse the XML tree, with something like this: Dim dom As Variant Set dom = createDOM() Call dom.load( url ) Dim r [read] Keywords: domino
lotus
notes
application
archive
microsoft
xml
|
8

|
Convert string to date 
Sun, Nov 2nd 2008 6:01a Jakob Majkilde I'am working on a RSS reader for Lotus Notes. In the RSS feeds/XML data, I hav, so far, found 3 different date formats: 2008-10-30T11:14:00.000+01:00 Thu, 23 Oct 2008 13:58:00 +0000 Sat Nov 01 17:12:26 PDT 2008 To convert these strings to a date/time, I have created the cDate function below. If you are using an easier method, please let me know... Function cDate( dStr As String ) As Variant '-------------------------------------------------------------------------------- [read] Keywords: lotus
notes
xml
|
6

|
Sorting in LotusScript 
Thu, Oct 30th 2008 6:14a Jakob Majkilde In this (old) redbook, in Appendix B-4, you will find Lotus Script code for all the algorithms shown in the graph. I allwas use the QuickSort - think this works best in most situations. Also check this Animated Sorting Algorithms site Conclusion from the redbook: Sorting can be a complex issue to decide. The amount of time taken to get your data into arrays to allow you to use a sort routine may be longer than the actual sorting. You then will need to get the sorted data out of those [read] Keywords: ibm
lotus
lotusscript
mobile
|
You can rent this space for 30 days. Interested?
|
7

|
Controlling the startup database in Lotus Notes 
Wed, Oct 29th 2008 1:08p Jakob Majkilde I have used three methods (at different customers): Setting the StartupDb parameter in notes.ini Creating a new frameset in bookmark.nsf - and launch this (from database launch properties on the bookmark.nsf) Creating a script that adds the database to the 'Startup' bookmark group (found in your bookmark bar, under 'More Bookmarks' ) 1. Set a startup database in notes.ini replicaId = Left( db.ReplicaID, 8 ) & ":" & Right( db.ReplicaID, 8 ) Call session.SetEnvironmentVar( "StartupDb", r [read] Keywords: lotus
notes
ntf
template
database
properties
workspace
|
5

|
@text( datetime; "*" ) 
Tue, Oct 28th 2008 6:11a Jakob Majkilde This will convert the timedate to a Notes replicaid, eg. C12572C9:0049D439 equals this documents creation timeScript version -> http://www-10.lotus.com/ldd/46dom.nsf/0/8eda26b209efbc7d85256ad7006efda1?OpenDocument [read] Keywords: ldd
lotus
notes
|
5

|
Printing barcodes 
Mon, Oct 27th 2008 4:26p Jakob Majkilde Well, this can be done in several ways: 1. Printing to a 'barcode' printer (with a builtin barcode font). Have been using a Citizen CLP-621 printer. The print job is just a text file, created with Lotus Script. Text file contains all the control codes for the printer, e.g. page width, borders, font size etc. The manual were quite good - with lots of details and examples. Only one problem - how to copy/spool the print file to the printer? Found a small freeware spooler program -> http:// [read] Keywords: clp
lotus
notes
microsoft
|
6

|
Reading barcodes 
Mon, Oct 27th 2008 4:11p Jakob Majkilde This is easy - the barcode scanner handles everything for you. If you use a USB scanner, the scanned barcode will be typed at the cursor - from here it is easy to process with LotusScript if needed. [read] Keywords: lotusscript
mobile
|
7

|
My Favorites database properties 
Mon, Oct 27th 2008 4:05p Jakob Majkilde Don't maintain unread marks: This can ruin performance - unread marks should only be used if really neededDon't use the "Don't support specialized responses hierachy" - If you do, you can read responses from Lotus Script (doc.responses.count is always zero) Use LZ1 compression: Yep - this makes sense. Less storage and less traffic Allow more fields in database. Can't find any drawbacks from this - and sometimes it is needed -> so, it's an 'always on' for me Allow soft deletions: Users loves t [read] Keywords: ibm
lotus
application
database
mobile
properties
|