Everything stated on this site is, of course, MY opinion / statement / thought, unless specifically stated otherwise. You knew that.


PLEASE NOTE: I'm *slowly* combining my blogs into this single site. If you are looking for Lotus Notes content from my old site, please EMAIL me at: jrlitton at gmail dot com and tell me the link or the content you were seeking. I will try to email you the content within a day.

- Joe

Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.

LS to calculate business days: part 2

I've added a function to add X number of business days to a start date. You pass the function a starting date and the number of business days, and it returns the date that is X business days after the start date. Here's a page that displays the updated script library.

Several folks have been kind enough to send comments to my first posting and mentioned some sites with date routines, suggestions for enhancements to the routine, and a recent comment from Paul Pentony showing how to do this with some nice @formula.

More enhancements will be coming; the url to the page with the script library will remain the same.

Blogging use, interface, and search

Robert Basic posted a comment here with a couple of links to interesting reading. I think the best way to relay this is to simply point you to Robert's blog. Robert's got some thought-provoking posts there and some commentary from Wolfgang Flamme.

Robert also mentioned this article about use of RSS by the Utah State government!

I firmly believe that blogging will become a very valuable addition to the Knowledge Management tools at many companies. We're looking at it where I work and I am certain that other companies are as well. The key is implementing an interface that is easy for the non-techie to use, and a means of making the blogged data searchable. In the Domino world there is Lotus Domain Search and Extended Search. If one has a mix of data sources, a very interesting solution is the Google Search Appliance, which will search Domino data as well as HTML, PDFs, MS-Office files, and more. Very cool.

LotusScript to calculate business days

We don't use Notes/Domino 6 at work yet, so I can't use the new @BusinessDays function. And I really needed a LotusScript function to calculate business days. Not finding one on the web, I wrote this one.

My goal is to make this script library much more functional. For now, you simply call a function, passing the start and end dates. The function returns the business days, inclusive of the start and end dates if they are business days. One of the next things I'll add is a lookup to the public NAB to retrieve holidays, but for now you supply those in a list in the script library. I also plan to add another function to return a business date that is X number of business days from the start date -- useful for an approvals routine I need to do.

So here's the early version. I've done a fair amount of testing, but keep me honest and test it yourself before putting it into a production routine!

Click to view libBusinessDays

Notes-Domino blogs: around the world

There are many very good Notes/Domino sites that are in languages other than English. I speak a little French, and so can make my way through sites in French. For sites in other languages (especially German or Spanish), there are translation services available that allow those of us who speak primarily English to take advantage of the knowledge and experience of our colleagues around the world.

With this in mind, I have added a block on the right side of my page to allow those who speak languages other than English to use AltaVista's Babel Fish service to translate this site to the language of choice, and encourage others to consider doing something similar.

Simply insert this code on your site wherever you want the AltaVista Babel Fish block to appear:

  <!--Code to add AltaVista Babel Fish link-->
  <script language="JavaScript1.2" src=" "></script>
  <!--End Babel Fish code-->

I am also planning a page of links to Notes/Domino sites from around the world, in addition to the blogroll I keep of English language sites. One of the better sites I've come across is Domino Références. I especially like their Directory page, which includes links to many Notes/Domino sites and other technical sites. I've emailed with Lionel at Domino Références, but there is actually a team from around France who jointly maintain the site. Well worth a visit, and if you don't speak French, simply use AltaVista's Babel Fish service to translate the site.

WinAPI from LS to copy to Windows clipboard

Here is some LotusScript that uses the Windows API to copy text to the Windows clipboard (of course, the clipboard will handle pretty much anything, but this example is for text).

Before getting to the actual code, I must state that I can take no credit at all for the code in this posting; it was found here. As my buddy Scott (a.k.a. "Sparky") would say, this was all R&D ("Rob and Duplicate"). But that's the sign of an efficient developer, right?

In this case, I put the bulk of the code in a script library, put a computed field on the Notes form to hold the constructed text that the content owners needed (for pasting into some hotspot urls later), and put a simple call in a form action button to allow the user to just click a button to get the needed text. Here's the script library.

Be sure to list the script library in your form's Global Declarations:
Option Public
Option Explicit
Use "libWindowsClipboard"
And then simply add code similar to this wherever you want to invoke the routine:
Sub Click(Source As Button)
Dim varRet As Variant
Dim strText As String
strText = doc.txtLinkInfo(0)

' Call script library function to use WinAPI to copy strText to Windows clipboard
varRet = fSendToClipboard( strText )

End Sub
Update: Ben Poole has a post with several tasty WinAPI tidbits. Well worth a read.