Category «Lotus Script»

lotus script tips and tricks to solve a specific problem in lotus notes

The key difference between GetAllEntriesbyKey and GetAllDocumentsbyKey

Is there any difference between collection returned by GetAllEntriesByKey and GetAllDocumentsByKey? yes. The NotesViewEntryCollection returns the sorted collection as it is sorted in notesview but NotesDocumentCollection doesn’t come with sorted order. The GetAllEntriesByKey runs faster compared to GetAllDocumentsByKey. Say for example, you wanted to show a list of documents in alphabet order or sorted by …

Businessdays calculation lotus script

@buainessdays is very usefull in calculating business days between two dates. But could not find a function in lotus script. But we can make use of evaluate¬†function. result = evaluate(|@businessdays(startdate; enddate; daystoexclude;datestoexclude)|) Also make sure you are passing date values in string and not as notesdatetime object. Set dtStart = New NotesDateTime(StartDate) Set dtEnd = …

Identify a text or text list is empty or not

We can use getitemvalue and checking the 0 index value like var(0). Another way we can do is like using a method available for notesitem class. it is notesitem.text. Read the usage in help file carefully. For multiple values in a list are separated by semicolons in the returned string. If an item’s value is …

update date only field using lotus script

While updating a date only field, we are using format or cdat function. But it is not the right way to update a date only field. If you the document properties, you can find the data type of this field will be text or text list. But it is date time field, it should be …

How to check Rich Text field is empty or not

There are several ways to validate a rich text field is empty or not. Here I have listed some of them. Method 1. The below method will work only for the rich text fields having only texts. If the field having attachments or links it wont work Dim session As New NotesSession Dim ws As …