Showing posts with label lotus features. Show all posts
Showing posts with label lotus features. Show all posts

Tuesday, May 05, 2015

ColumnValuesIndex property of NotesViewColumn

Since there is no documentation about property ColumnValuesIndex of class NotesViewColumn. Let me describe it.
Let's create a view with 7 columns:
  1. @DocNumber
  2. Hidden (sorting) column that does sorting
  3. Column with formula value: Form
  4. Icon (static value: 12)
  5. Column with formula value: @Created
  6. Constant value: 100
  7. Total with 'hide details row' enabled (for each row value: 1)

Analyze ColumnValuesIndex

Let's write some code and check what exactly ColumnValuesIndex returns
  Dim ws As New NotesUIWorkspace
  Dim view As NotesView
  Dim col As NotesViewColumn
  Dim i As Integer
  Set view = ws.CurrentView.View
  For i = 0 To view.ColumnCount - 1
    Set col = view.Columns(i)
    Msgbox col.ColumnValuesIndex
The result for columns will be: -1, 0, 1, -1, 2, -1, 3.
We may see now that for some of columns we got (-1). Let's look on these 3 columns and try to guess how they are different compare to other columns. Here is my assumptions for what cases it returns (-1)
  • A formula containing a UI-only function such as @IsExpandable or @DocNumber.
  • A constant.

Summary for ColumnValuesIndex

Otherwise it returns columns position (without taking into account columns with -1), It looks like it is exactly same logic as in notesViewEntry.ColumnValues

Tuesday, June 05, 2012

Predefined NoteID for design elements and applications

Sometime those NoteIDs can be quite useful, so I decided to gather all of them into place I can easy find.

FFFF0002 "About This Database" document
FFFF0004 Default form
FFFF0008 Default view
FFFF0010 Database icon
FFFF0020 Database Design Collection (view)
FFFF0040 Database ACL
FFFF0100 "Using This Database" document
FFFF0800 Replication Formula

ReplicaID for few databases:

0000000000000E00 Mail database
0000000000000E01 Personal Address Book
0000000000000E02 Subscription Database
0000000000000E03 Bookmark

Friday, March 30, 2012

Create Lotus Notes views on fly

I'm wondering if somebody know how to use views that I created on fly, lets say we have document with embedded view which is not created yet. Before we open this document we create view (but simple triggering agent). However we can't use this view as embedded view on document till we reopen database. Anybody has any idea how we can avoid this problem?

Wednesday, December 29, 2010

Useful option when you are doing Java in LDD

Links to this post
If you are doing java in LDD you always need to save design elements after you update your source code. It is so painful (at least for me) because each time I need to check result I have to switch from source window to design window and do save there.

To avoid that - set this option you see on screen below (I believe at some point IBM will set as default)


Tuesday, July 13, 2010

DesktopX.ndk and possible problem with it

Links to this post
Each Lotus Notes has this desktopX.ndk (X - is number of version of LN) file into Data folder. On of his function is to keep workspace tabs and icons for user. So if you want to have empty workspace, close Lotus Notes and move desktopX.ndk to temporary place and run LN again, yep, workspace will be empty.
It has one ugly behaviour from my point of view I discovered couple years ago and faced up yesterday again. This file keeps some information about database-icons (f.x. server, replica and filepath). Each user in our company when run Lotus Notes see Start-Up page, all required links are there. Links are managed, so each link is simply Title, and Server+Replica, that's all, and that's enough to open application.
Due to some reasons we changed location for couple applications (actually we moved 2 applications to another folder). We MOVED applications so Server and ReplicaID did not change.
After that all users were not able to open applications we moved (I mean they were not able to open from startup page). Good thing - I known what to do just of previous experience... It looks when user tries to open application using Server/Replica Lotus Notes looks into dekstop.ndk first and if it find will use Server/Filepath to open application, but as I told Filepath has been changed for some applications, so the dialog about wrong filepath name will appear.
So what we did - removed desktopX.ndk for each user (good new we have ~15 users only, so it was not a huge task).

Friday, December 18, 2009

do you want to re-configurate your server?

Links to this post
I hope everybody knows this, but I just tried it first time in my life (before I only read about this), so just confirm that it is work :)

find notes.ini in domino directory

- make local copy (who know -) probably it will help later)
- remove all line except these:


fix path and run domino then, now you can manage it again from "draft"

Monday, November 02, 2009

How to show image in LN using HTML

Links to this post
I had trouble with displaying image using html in LN. I did everything correctly, but the image did not appear. So I looked around and found that there is a special field
$DelayedImagesOK = "ok"

So when I added this field (CFD) on the form it started to worked fine.

But then I found if we click on place where the image should display (I meant on that icon) using right click and then click on show image the image would appear and field $DelayedImagesOK with value "ok" would be added.

Monday, December 01, 2008

MS ListView Control in LN

Links to this post

In one of our project we used MS ListView Control to show the data in one table. So here what we did. If you want try this approach also, you should do next steps:
Go to designer, create new form
click on menu: Create\Object and choose MS ListView Control.
Set name to this object and then you can do what you wish with this control, some code:

Dim control As Variant
Dim lwItem As Variant
Set control = source.getObject("ListView")
Set lwItem = control.ListItems.add(1, "a1", "fio2", 0)
Set lwItem = control.ListItems.add(2, "a2", "fio3", 0)
Set lwItem = control.ListItems.add(3, "a3", "fio4", 0)
Set lwItem = control.ListItems.add(4, "a4", "fio5", 0)
Call control.refresh()

Monday, October 06, 2008

FTSearch on empty field

I'm facing with problem where I should get collection of documents with empty field. It means that query should look like this
set col = db.FTSearch({[myField] = ""}, 0)
We know that it does not work at all. I found a solution here
set col = db.FTSearch({not [myField] is present}, 0)

Thursday, June 12, 2008

New / Old Undocumented Domino R6 Feature

Links to this post
I heard about this NOTES.INI file setting and just had to give it a try. When I found out that it worked, I was blown away.

Just add the following line to your NOTES.INI file for your Domino client:
and restart your R6 Domino Designer client. Note this option will not work on R5.

Now open a view in Designer, choose Design-View Properties, and click the Advanced tab (propeller hat). You'll see a new option: Treat View Contents as XML.

Check "Treat View Contents as XML". Note that the Designer will allow you to check BOTH the HTML and XML options. Don't bother, it doesn't work if they're both checked. I guess since Lotus decided not to implement this feature in the initial release they never cleaned up the user interface for this option.

Now that the option is checked, save the view and open it on your R6 server (again, this feature will not function at all in an R5 environment. Prepare to be blown away.

In this case the view consisted of six columns. The first two are categories - Area and Market. Then we display the Sales_Forecast, Margin, Goal_Ratio, and Date fields from the document. The XML tags are generated by the column names. Note that you have to use appropriate column names - whatever you put in here becomes the tag used for that data element.

I found this undocumented feature to be an amazing help - with just a few mouse clicks I could easily present my Domino data in a logical XML format. This is far better than using the ?ReadViewEntries command in the URL.

took it from here

Tuesday, May 13, 2008

how to run several Lotus Notes clients at the same time

Links to this post
Sometimes it is very useful to run several copies of Lotus Notes. Let's say in one client you run agent and in the same time you continue to work. Also it is very useful when you want to work with different servers at the same time with different IDs.

Here is approach how to do it!

1. We have to change the shortcut of notes: instead of launching a file notes.exe, you need to run nlnotes.exe
C: \ Lotus \ Notes \ nlnotes.exe "= C: \ Lotus \ Notes \ notes.ini"
For convenience, you can also rename the shortcut to "Notes 01"
2. Then we have to copy notes folder, for example in the folder C: \ Lotus \ Notes02
3. Modify notes.ini in new copy of Lotus Notes - we should correct the path with C: \ Lotus \ Notes \ to C: \ Lotus \ Notes02 \
4. Copy shortcut to run, it to "Notes 02, and the change the way.
C: \ Lotus \ Notes02 \ nlnotes.exe "= C: \ Lotus \ Notes02 \ notes.ini"
5. By using these shortcuts you can run two copies of lotus notes

If you repeat this, you can run any number of copies.

You can also change the color of notes desktop to don't forget which version you use now...

Monday, May 05, 2008

Discovering of memory leaks

Links to this post
You may have discovered memory leaks when your Notes client is running a large job or just running an application on your Domino server. The leaks can occur in various places — and the source of the problems may be almost impossible to identify in your code. Here are some undocumented techniques that can help you find code that might be causing memory leaks.
The trick is to know the name of a function call to some internal registers that will return the amount of memory in use. Here are the types of information returned and the function names:

LotusScript Memory Allocated: Lsi_info(50)
LotusScript Memory Allocated from OS: Lsi_info(51)
LotusScript Blocks Used: Lsi_info(52)

Here's a LotusScript code fragment that shows how to use these functions in a foreground agent:

Sub Initialize
Msgbox(" Total LotusScript Memory Allocated: " & (Lsi_info(50)))
Msgbox(" Total LotusScript Memory Allocated from OS: " & (Lsi_info(51)))
Msgbox(" Total LotusScript Blocks Used: " & (Lsi_info(52)))
End Sub

To determine whether a leak exists, you must run this code BEFORE and AFTER the portion of code you want to investigate. If you want to use the above code in a background agent, you must print the results to the LOG.NSF using code like this:

Sub Initialize
Print "Memory Allocated: " & CStr(Lsi_info(50))
Print "Total LotusScript Memory Allocated from OS: " & CStr(Lsi_info(51))
Print "Total LotusScript Blocks Used: " & CStr(Lsi_info(52))
End Sub

If you write the information to a document in a database (for example, your own log facility), be careful because this procedure also consumes some memory, and thus, the BEFORE and AFTER measurements will NOT be equal. Also, because these techniques are undocumented, use them at your own risk, and make sure you have good backups before implementing them.

ProgressBar example

Links to this post
There is a small progessBar.rar of this kind of dialog. There are only main page and LS library.

Display all private agents in a database

Links to this post
The first step to detemine what agent are running on each server is to issue a:

Tell Amgr Sched server command

This will display all agents running in each database whether they are private or not.

Now the really cool trick - Before one can delete an agent you have to be able to see them, right? And private agent is'nt visible because they're private, stating the obvious... But here's a neat workaround:

To display all private agents in a database, all you have to do is create another private agent! It doesn't have to contain any code just create the agent, save it and exit. All private agents are now visible and you can even remove your agent and they'll stay visible.

I checked it with R5, and R6.5 it works ! but with R7.03 and R8 it did not work

Wednesday, April 09, 2008

Which parameters we can use in a command line to start a Notes client?

Links to this post
1) We can specify the path to notes.ini file:
c:\Notes\Notes.exe =c:\Notes\Data\Notes.ini

2) Do you want to open special database?
c:\Notes\Notes.exe names.nsf
c:\Notes\Notes.exe open names.nsf
c:\Notes\Notes.exe Servername!!\Directory\DatabaseName.nsf

3) You can also specify a .NDL file (Notes doclink). It will permit you to open a specified note:
c:\Notes\Notes.exe doclink.ndl

4) Do you want to open special URL?
c:\Notes\Notes.exe http:\\
c:\Notes\Notes.exe notes://servername/databaseName?OpenDatabase

5) Start with new email to?

6) Other:
/EMBEDDING or -EMBEDDING - starts Lotus as an OLE Server
/AUTOMATION - starts Lotus in Minimized State
/kiosk - starts Notes without Menus (but to be honest in my case it shows only grey window, hope it is only in my case)
/DEBUGGER - starts the Notes Remote Agent Debugger
/DESIGN - starts Notes Designer
/MAIL open the default mail database on the Notes client
/ADMINONLY open Notes Admin

also you can see it here:

Friday, March 28, 2008

how to get google map ?

Links to this post
I guess that somebody already shown it earlier. But it is always good to refresh memory.

Address := "Paris";
url := ""+Address;

Friday, March 07, 2008

Undocumented DOM LotusScript Inventory

Links to this post
Sometimes I look for undocumented methods in LS. So I found the best one, probably, page.
  • NotesDatabase
    + isNNT : Variant
    + archiveNow( ) : Integer
    + archiveNow( documentCollection=Nothing ) : Integer
    + archiveNow( documentCollection=Nothing, policy=Nothing ) : Integer
    + close() - DEPRECATED, DO NOT USE
    + createNewsGroup(groupName : String, title : Variant, subdirectory : Variant) : Long
    + enabledOptions(arg1 : Integer , arg2 : Integer)
    + getArchivePath( policy : String ) : String
    + getArchivePath( policy : String, pathType=Nothing ) : String
    + getFields(flag : Boolean) : String[ ]
    + retrievePOP3Mail(server : String, port : Integer, username : String, password : String, retainMail : Integer, useSSL : Integer) : Long
  • NotesDateTime
    + convertToZoneCanonical( zoneSpec ; String )
    + merge( datetime, zoneSpec )
  • NotesDocument
    + formDbID : String
    + formDbIDItem : String
    + handle : Long - cf. Notes C++ Programmer's Reference Guide
    + generateMessageID( ) : String
    + getNextItem(arg : Variant) : Variant - DEPRECATED, DO NOT USE
    + moveToFolder( )
    + putInFolderByUNID( )
    + removeFromFolderByUNID( )
  • NotesDocumentCollection
    + getNoteIDs( ) : Variant
  • NotesItem
    + PartialText
  • NotesOutline
    + getEntry(entryname : String) : NotesOutlineEntry
    + remove( ) : Integer
  • NotesOutlineEntry
    + onClickText : String
  • NotesRegistration
    + useAdminProcess
    + registerNewUserWithPolicy( lastName : String, certPW : String, userPw : String, policyServer : String, firstname=Nothing, middle=Nothing, altName=Nothing)
  • NotesRichTextItem
    + addLinkByIDs( replicaID : String, serverHint : String, viewUNID, notesUNID, comment, hotspotText )
    + appendRTFile( pathname : String )
    + partialText
  • NotesSession
    + internetDomainName : String
    + internetHostName : String
    + close
    + createXMLReformatter( input, output ) : Variant
    + getNewsGroupPath(arg : String) : String
    + getWin32Domain(server : Variant) : Variant
    + startProfile( outputFilename : String, outputThreshold, recordThreads, recordEntryPoints )
    + stopProfile( )
    + tagProfile( tagString )
  • NotesUIDatabase
    + editArchiveSettings( ) As Integer
    + modifiedSinceSaved : Boolean
    + parentViewName : Object
    + windowHandle : String
    + findFreeTimeDialogEX( reqPeopleItems, optPeopleItems, reqRoomsItems, optRoomsItems, reqResourcesItems, optResourcesItems, removedPeopleItems, startDateItem, endDateItem ) As Variant
    + navBarSetPrevNextState( command, benable )
  • NotesUIScheduler
    + ignoreUniversalID : String
    + participantTableCopy( sortOrder : Integer ) As Variant
    + refresh( getScheduleData, flags )
    + setParticipantsFromItems( flags )
    + setParticipantsFromTable( participantTable )
    + updateParticipantsFromItem( flags )
    + updateParticipantsFromTable( table, rolesFlags, appFlags )
    + updateParticipantsStatus( participantTable )
  • NotesUIWorkspace
    + addBookmark(bookmarkTitle : Variant) : Variant
    + addDatabaseToPortfolio( )
    + Create_DialEntry_Dialog( remoteAccessMethod )
    + create_DialEntry_Info( remoteAccessMethod, nameOfEntry )
    + create_DialEntry_List( remoteAccessMethod, nameOfEntry )
  • NotesView
    + HeaderLines - not really undocumented but mal-documented since R5
    + createViewFromTemplate( newName : String ) : Long
    + getEntryByID( NoteID : String ) : NotesViewEntry
  • WebBrowser
    exposed within OLE Automation classes from R5 onwards..
It was not my discovering I took it from here
Just remember about these methods, probably will be the time when it be helpful for you.

also you can use these @Formula


@command [PKCS12ImportCertsToNAB]

Thursday, February 07, 2008

Decimal Separator in formula - Solution

Links to this post
definetly it is a simple feature, but I like such approaches, I found this one on IBM:
@Middle(@Text(@Pi); 1; 1)
but probably this one will be more easy for our brain (but it depends):
@Middle(@Text(1/10); 1; 1)

Actually the problem could be when we want to show value which are stored in 2 (or more) different fields, put them together in 1 place and split "default decimal symbol".

default decimal symbol - could be changed in Control Panel->Regional Options->Numbers tab.

Thursday, January 31, 2008


Links to this post
Just found,

I read that it should be only in 8.0 version, but it works in 7.02 also, but it is undocumented feature of Notes Domino. I pulled &OutputFormat=JSON as additional parametres in URL and got back JSON. Great, it opens some new ways for me. Will play with it a little more, and probably will get something to show very soon.