Thursday, January 31, 2008

OutputFormat=JSON

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.

Wednesday, January 30, 2008

All LotusSphere2008 presentations here (free and without any passwords)

I found (Actually not me but in any case I will share them as well) ! One of my blog's friend found the way how we can download all presentations from LS2008: download

Probably it will save a lot of time for many people which looking for them in Internet.

But I don't know, is it legal to share them? because if no, I will remove the link.

Monday, January 28, 2008

Generate HTML for all fields


I used it for some years and only now I read some articles about several bugs which didn't see before. Probably because I've made not so difficult applications in web, but in any case I still like it.
It makes my life more simple!

several Domino->JS functions: StrLeft, StrRight, StrLeftBack, StrRightBack, StrMidleBack, StrMiddle

Here are a few JavaScript functions to mimic the @-function capabilities. I dont like to write every time my own functionals, just because they will be my and I will be proud for them. I don't like this :). I prefer to find some different solutions and take one that better (of course on my opinion)

function rightString(fullString, subString) {
if (fullString.indexOf(subString) == -1) {
return "";
}
else {
return (fullString.substring(fullString.indexOf(subString)+subString.length, fullString.length));
}
}

function leftString(fullString, subString) {
if (fullString.indexOf(subString) == -1) {
return "";
} else {
return (fullString.substring(0, fullString.indexOf(subString)));
}
}

You can find many other functions here site

Monday, January 21, 2008

Lotus Notes and SAP will join for Project Atlantic

This is an article from Ed Brill blog

The announcement I've been waiting months to talk about!


Today, IBM and SAP announced a joint product development, codenamed "Atlantic". From the press release:
Currently planned for inclusion in the first release of project "Atlantic" is support for SAP workflows, reporting and analytics, and the use of roles from within the Lotus Notes client. In addition, tools are planned to be included to provide the ability to extend and adapt these roles and capabilities, as well as leverage additional collaborative and offline capabilities inherent in Lotus Notes and Domino products. The initial release is planned to ship in the fourth quarter of 2008 and will be sold by both companies.

"SAP and IBM Lotus are strategic partners to The Coca-Cola Company," said Jean Michel-Ares, CIO, Coca-Cola Company. "Our IT goal is to help our people to be more responsive, productive and effective, and SAP and IBM Lotus have helped us get closer to that goal. The partnership between IBM Lotus, SAP and The Coca-Cola Company promises to deliver additional value to our associates and improve the tools they use every day."

Friday, January 18, 2008

how to don't save computed fields in document

this question was at ibm's forum, so I wish to refresh memory... don't forget about:

notesItem.SaveToDisk=false/true

by the way, and don't foget about this simple thing. How we can add authors or readers in documents.

notesItem.IsAuthors=true
notesItem.IsReaders=true

Thursday, January 17, 2008

approches to transmit parametres from conf.document

usually every application has at least one configuration document which contains some information about our application and of course you should to use these data in your application.

1. @DbLookUp and @DbColumn every time
first way is to create a view where you can find this document (@DBLookUp or @DbColumn)and receive needed data each time when you want, but it's very slowly way and stupid, because there are a lot of dblookup will be.
2. transmit Id of config doc
there is one another way which I prefer to use is to transmit the id of conifg documents (using @dblookup or other ways) and then each time when you need some data, you can use @getdocfield(id; fldName)
3. collect all data in 1 field in profile and then use this field
Another one good approach is to save all data in configuration document in one field, for example [fldName1]fldValue1:[fldName2]fldValue2:[fldName3]fldValue3 and so on, after that you can load this field using just 1 @dblookup and then parse it and receive this data. This method I used very often too, but now I switch to method #2.

ok, i know that we can you real profile documents, but i don't like to do it, and I'm not able to tell you why is it so :)
but any suggestion and new idea will be appreciate !

Thursday, January 10, 2008

OpenView & RestrictToCategory & StartKey

today i found this stupid? bug.
i had a view that has 1 column as category and second as sorted namelist and some other columns... what i wanted was to take one category and then using StartKey shown only what i wanted... but it didn't work :) . i looked at ibm's forum regarding it and found a lot of posts about this bug...
So don't use this RestrictCategory with StartKey, but i read that it also doesn't work with many other parametres.

Enjoy Lotus !

Tuesday, January 08, 2008

compare arrays

I've seen many different functions which compare arrays, so I've decided to write my variant of this function. I suppose my function much simpler.

here is the script o function

Function ArraysAreEqual (vA As Variant, vB As Variant) As Variant

Dim rez As Variant

rez = Evaluate({@implode(@sort(@Explode("} & Join(vA, "~") & {"; "~")); "~") = @implode(@sort(@Explode("} & Join(vB, "~") & {"; "~")); "~")})

If rez(0) = 0 Then ArraysAreEqual = False Else ArraysAreEqual = True

End Function


advantages of my approach:
- more simple, just 1 line;
- faster;
- we can compare any number of arrays

but any advices will be appreciate! especially disadvantages !

Monday, January 07, 2008

perfect article about evaluate

Would you like to write fewer lines of code? Let Domino do some of your work for you? I doubt you answered no, but if you have, what the heck -- read on to see what you'll be missing! We're going to show you how to use the LotusScript Evaluate statement to easily include short and powerful formula language constructs within your LotusScript code. You'll save a lot of headache, and as much as twenty lines of code at a time! A single Evaluate statement can often replace many lines of complicated script, and in some cases, can do what is nearly impossible in native LotusScript... full article about evaluate

now I will twice think what is better to use LS of @.

Wednesday, January 02, 2008

how to take all schedule agents from db

it takes all schedule agents from database. I suppose that somebody will find better solution, but for this moment I don't see the better solutions...

Dim s As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection

Set db = s.CurrentDatabase

Set nc = db.CreateNoteCollection(False)
nc.SelectAgents = True
Call nc.BuildCollection

Dim note As NotesDocument
Dim nid As String
Dim flag As String

nid = nc.GetFirstNoteId
For i = 1 To nc.Count

Set note = db.GetDocumentByID(nid)
flag = note.GetItemValue("$Flags")(0)

If Instr(flag, "S") Then
Print note.GetItemValue("$Title")(0)
End If
nid = nc.GetNextNoteId(nid)
Next

Lotus Blogs

I found 2 sites which store many lotus notes's blogs. I'll look at them more closely later, but in any case I like it and recommend to lotus notes developers to save the links.

One of them is DominoBlogs.com - I suppose the oldest and another one is Planet Lotus.