Posted by: Patrick | May 18, 2008

Juggling Javascript

I’ve been using Javascript for years now but it’s just recently when I’m starting to go from intermediate to the next echelon in terms of my level of expertise. Far back before the start of this millennium, common uses of the scripting language is on form validation and rollovers.

As early as a few years after the millennium started however, Asynchronous Javascript and XML (AJAX,) gained popularity and people got to see javascript from a different consideration. Apart from getting more people to take the scripting language more seriously, the object-oriented capabilities of the language got the attention it rightfully deserved.

Despite such developments and my penchant for keeping pace with IT trends, it was only recently when I had the chance to actually “play” with AJAX and thus, get to take a closer look on Javacript’s object-orientedness due in part to having my own notebook only recently.

So on top of the time I spend reading e-books on other stuff, I’m spending time these coming days to take a look at the following:

Anything for career-advancement I guess.

Posted by: Patrick | March 9, 2008

New Reference

Another “why-I-haven’t-I-thought-of-that-before” idea I encountered during the past week was when I had to force a response document to access its parent when it’s still new. Even if it still hasn’t been saved yet, it has to be able to get the corrent document unique ID of its parent. It sounds easy with the use of the @InheritedDocumentUniqueID but everything gets messed up once the document is saved.

A common workaround found in the forums is to have 2 fields provide the needed values. That is, one field will have the value of @InheritedDocumentUniqueID and is to be used when the document is new, and the other field is to have the value of $REF and is to be used for existing documents. Since two fields to be maintained for a single purpose, I went out my way to find out if someone already came up with something neater.

Within a few minutes, I came across an astute solution. Derek Papworth’s solution outlines two steps:

  1. Create a new computed when composed field named $REF.
  2. Set the field’s formula to @InheritedDocumentDocumentUniqueID.

It’s easy as that. Thinking about it, the solution does make sense and the only difference it has is that it has that “why-I-haven’t-I-thought-of-that-before” ingredient typical of great solutions. As Derek wrote:

when a doc is first created $REF is there and set and can be used and when it’s saved all well and there’s no extra redundant field .. all formulas/script can now refer to $REF at ANY time without worrying about @IsNewDoc etc.

Right now I’m going with it as everything seems to work as expected after some tests using the approach–agreeing with both Stan Rogers and Scott Leis’ subsequent comments.

Posted by: Patrick | November 1, 2007

Principal Suspect

Given a scenario when your database is supposed to send out email notifications which when replied to would automatically send it to a given email account, I’ve always thought the straightforward use of the Principal would suffice. That is, the given code should do the trick:

doc.Principal = “”

But it doesn’t. If you have that LS code within a design element, say a button on a form, and a certain Jane Doe does the clicking, the email sent still shows Jane Doe’s name in the From field. Now that’s bad.

The first thing for me to try was to set every Memo field where Jane Doe appears to Tough luck though as Jane Doe’s email address still shows up in the notifications’ From field. Unfortunately, setting the From field manually didn’t do it because from inspection of the design of 6.5 mail databases from where I am, the said field is computed when composed!

Next was to rummage through the forums hoping that something would eventually pop up there. A little over half an hour it did!

The first thing I encountered was the Agent Troubleshooting Guide by Julie Kadashevich. In that long list of helpful tips, there’s a section, How can I change the apparent sender of agent generated mail?, discussing three ways to programmatically set a notification’s entry for the Sender.

Apparently there are three ways to set the Principal field in emails. From the Guide, these are:

  1. doc.Principal=”Joe User/Org@NotesDomain” where Joe User/Org has a Person record with an InternetAddress of your choosing. (Note that the string @NotesDomain must be present.)
  2. doc.Principal=”CN=Joe User/O=Org” where Joe User/Org has a Person record with an InternetAddress of your choosing.
  3. . (Note that the string @NotesDomain must be present.)

But any method there still didn’t get it done though. Other mail clients still continue to display Jane Doe in the From field.

Fortunately then, this forum response points me to somewhere I should’ve looked at before. In his blog entry, Notes/Domino hotshot Jake Howlett writes in his blog about the lines of code that would eventually work for me:

doc.Principal = “John Doe <>”
doc.InetFrom = “John Doe <>”

I never bothered to check there before in the first place because troubles with the field was the last thing I would expect from Jake. What more about a reason to find time to write about something supposedly easy?

Anyway I would recommend reading that blog entry as it clears up a lot of Principal-related stuff from the guide.

Posted by: Patrick | October 29, 2007

Stamp It All In

stamp2.jpgJust a question: How do you code the part of the WQS agent which implements changes in a given field from the current document to the response documents under it?

Never realized how practical (or surprising) that question turned out to be early this month. I’m talking about Jake’s dedicated entry for a neat, single line of code he learned from a client. His initial take on the situation, (how to get Readers field changes reflect on response documents,) was how I’d handle the situation as well.

Anyway here’s the neat “trick”:

Call Web.Document.Responses.StampAll(“DocReaders”, Web.Document.DocReaders)

Just another welcome addition to my bread and butter I guess.

The image was taken from here btw.

Posted by: Patrick | October 28, 2007

Laying Down the Rules

One post I encountered at TipidPC asks why the rules he set didn’t work on Return Receipt email notifications. Despite those years in the Lotus Notes/Domino fray which includes several mail database customizations via development, it had me scouring through the forums as helping the guy took some time.

What I didn’t realize that the Subject display in the Inbox is automatically appended with the word “Received”. Eventually I ended up looking at the Subject column of the Inbox folder’s design to confirm this. It was this post which got me looking in the right direction.

Another new mail rule stuff I encountered along the way worth including here from this post:

  • Server settings to inspect include the Allowed to use monitors and Not allowed to use monitors. For mail rules to work, the user must be included in the former and not in the latter.


  • The CalendarProfile document is what the Router server task checks in every mail database. This means that not each rule in every mail database is inspected as every new or modified rule updates the $FilterFormula_xx field in the CalendarProfile document.

Something somewhat new inspite of all those years of experience I guess.

Posted by: Patrick | October 22, 2007

The Redbook Stop

I never realized that it’s already been a month ago when the “IBM Lotus Redbook’s gone” news in the community broke out? I guess that depicts how much I got my hands full from that time until recently. Back then though, the biggest names in the Lotus realm had their say about it. Among others:

  •  Christopher Byrne analyzed a lot of factors, considerations and impacts shutting down Redbooks would mean to IBM, the business partners and the technical people.
  • Of course Ed Brill dedicated an entry on the prominent matter then.
  • Tom Duff wrote something more optimistic starting out with apparent issues IBM may consider in maintaining Redbooks and culminating the entry with a wait-and-see mindset.

In any case, I don’t know how to feel about the decision. I got to learn a lot about Lotus Notes and Domino, Lotus Workflow and Domino Document Manager via the Redbooks so I’m sure gonna miss the stuff. I’m not sure the much talked about wikis will do a good job in replacing the Redbooks we’ve grown accustomed to in the previous decade.

Posted by: Patrick | October 21, 2007

The PRG Approach

About 2 weeks ago Jake wrote about the Post-Redirect-Get (PRG) method a lot of Domino developers have been unknowingly implementing in web applications with the use of the $$Return field in Domino forms. He mentions an HttpWatch entry which details the primary significance of PRG — to prevent duplicate submissions of data using the argument that 60% of web users click the Back button when surfing.

Posted by: Patrick | October 20, 2007

Notes and Domino Stuffed Here

Just finished moving Notes and Domino stuff from an older blog here, Half-Empty, Half-Full, in as well. The sheer volume of such stuff, (at least what I intend to write about,) looks enough to clog that blog dedicated to a more varied mix of perspectives from the Lotus direction alone so I decided to write on the said topic here.

Posted by: Patrick | October 13, 2007

Hello Notes/Domino World

Just an offshoot of my former blog‘s Lotus Notes/Domino stuff really. Since it seems a lot of Notes/Domino stuff have been starting to bloat up that space, I figured out that it might be start a blog for the technology’s own sake — that and the way I make use and frustrations of it along the way really.

What I have in mind right now is to lump every “interesting” detail I encounter about Notes or Domino. I see a couple of advantages towards my decision right away namely:

Easier Access to How-To’s and What-To-Do’s

Searching over the Notes/Domino DeveloperWorks forums used to be a lot of help for technical problems and clarifications from more seasoned Notes and Domino developers. Sadly the newer breed of developers rarely bother searching for a considerable amount of time. That is, a good number proceed with posting questions after little or no amount of time spent for searching similar posts in the past.

This in turn has led to more and more time alloted for searching for other unfortunate developers like me. A recent issue I encountered had me spending well around thirty to forty minutes scurrying the tons of similar search results across the forum. Back around 3 years ago when I did searches over there as well, that search time went around 5 to 15 minutes only.

Therefore I’m hoping to cut on the amount of time spent on searching the forums by documenting my issues and experiences here. That is definitely a plus for productivity if like me, you keep on coming across the same bugs and requirements from time to time and you keep asking yourself “now what did I do in this situation before again?”.

Free Help Anyone?

My altruistic sense tells me that the things I would be putting here would be able to help anyone. By how much, I’d sure be interested to find out.  Therefore I would appreciate any form of relevantly sane feedback.

If time were not an ingredient for impression on development skills then there won’t be a need for the information. If you’re anyone like me who finds his back against the wall from time to time, maybe you can find the answer here fast.

As for technical questions, I’m not promising anything as I’m just a typical middle class urban yuppie making ends meet but I’ll try my best.  Just make sure you search the Notes/Domino forum first. 😀

Posted by: Patrick | September 20, 2007

Hard Copying

No matter how long you’ve been wrestling your brand of technology, something just tantalizingly time-consuming and frustrating pops up once in a while. Oftentimes it’s just something overlooked among the sea of possibilities today’s technology allows us to do.

As far as my four years of stay in the Notes/Domino development arena, I have my share of these as well. Just this week, I was replacing the design of a new database with that of an existing one. No problem I thought. I’ve done countless Database-Replace Design’s in the past.

But that was just what I thought.

When I opened the database however, a lot of the important views were not there. Instead of the default frameset launched, the user saw one where all views in the database is displayed in the left pane and the selected view on the right. The frustratation built up further as subsequent copy and paste of the views from one DB to another failed also while the deadline loomed so near.

In times like those, I start turning to even though scurrying for pertinent answers there has become painstaking more and more in the recent months. A lot of minutes after my nosedive, it came. It was pretty wonderful for the same guy who asked the question to take time to sensibly post the thing he overlooked:


It had to do with the access rights of the view. The view from the source DB had a role assigned to it that was not defined in the target DB. Once I deselected that role the views copied over.

Been doing this for years and still learn something new everyday.
And I bet I should of searched before I posted this cause I’m sure someone else has encountered this issue.

Not really. Did just that and it got me here. :))

Older Posts »