May 11

SnT Thursday – Military Time

Ever wanted to categories information based on date\time.The sorting was not whate I expected becase 10:44 AM is after 09:08 AM. Military time was the first thing that came to mind and I found just what I was looking for at Lotus Notes FAQ – How do you convert a time field to display as military time? from Key Yee. I did add the date to the string, the only chnage is contacting the hour, minute and seconds into an array and then imploding it using a colon, which is quicker than h + “:” + m +”:” + s.
REM {From Jason Collier (jcollier@sd.synetics.com)}; 
DateTime := @Created; 
time := @Time(dateTime); 
t:= @Text(@Time(time)); 
t2:=@Left(@Text(@ReplaceSubstring(@Text(@Time(time)); ":" ;"")); 6); 
h:=@Left(t2;2); 
s:=@Right(t2;2); 
m:=@Middle(t2;2;2); 
AM:=@ReplaceSubstring(@Left(t2;2) ; "12" ;"00"); 
 PM:=@ReplaceSubstring(@Left(t2;2) ; "12" ;"12"); 
 PM2:=@Text(@TextToNumber(h)+12); 
 timecheck:= @If(@Contains(t;"AM"); AM ; @If(@Contains(t;"PM") & @Contains(@Left(t2;2);"12") ; PM ; PM2)); 
 MilTime := timecheck : m : s ; 
   @Text( @Date( DateTime ) ) + "\\" + @Implode( MilTime ; ":" )
Apr 27

SnT Thursday – View Icons as Categories

I like to check how referrers are getting to this blog, so I use the view ‘Referers\All by Date’ view to monitor it. One of my frustrations about this view is that either a refer is marked as valid or invalid. Which is not totally accurate because not all invalid entries have been validated. So I added a third icon that indicates that the referrer has not been validated. The third icon helped but I still found myself wasting time looking through the documents. To speed things up I added categorization (descending order) to the indicator column and my view now looks like this:
There is only one thing wrong with this, no twisties! As you can see (second picture) I do have them set to show. Even tried using my own ‘Twistie Image’ but still no luck. When ‘Display values as icons’ is disabled the twisties appear in Notes. No matter the setting for this column the twisties always show on the web, thanks Lotus for the consistency. The column formula is very simple:
@If(Verify = 1; 82; Verify = 0; 81; 162)
Update: It seems that the view icon is the twistie because clicking on the image once expands or collapses it.
Apr 20

SnT Thursday – Tray It!

This is one of small but useful tools that I have been using for some time.  

allows to save precious Taskbar space for minimized windows. For each application which applies TrayIt! it creates a small icon in the System Tray. (System Tray area is located near the Clock). When application’s window is minimized this icon represents the application on the Taskbar instead of the regular “minimized rectangle”.

It is particularly useful for background tasks you typically keep running on your PC all day long like your favorite E-mail client, Real Player, etc.


Try It! has improved since my last post, it has a much nicer UI.  Even though it is only in beta , it has been very stable for me and worth the risk.  Here is the new improved list of applications running


I have circled the features that I have set.  I am always up for single clicking instead of that double stuff, except for Lotus Notes double right click!
.

For some applications like Microsoft Active Sync or Google Talk there is already a system try icon, so selecting the option not to show in the system tray just makes sense.
Mar 16

SnT Thursday – Java & Domino Designer

Yes, the Java editor in Domino is really bad.  So I do all of my development in eclipse, and have worked with the beta version of Domiclipse.  This tip has nothing to do with either, but with the Java editor in Domino.

Well I lied about doing ‘all’ of my development in eclipse because, when I need to do a quick change I make it in Designer.  Which leads to my biggest frustration about the Java editor in Designer. Not seeing all of the methods available for a given class, or the class not showing at all.  The problem is the editor is treating some text as a string, the compiler is handling it correctly because the code compiles and runs correct.  It is not all strings just the ones with \" in it.  Yes, that simple, and the fix is just as simple.  All I do is place // \" at the end of the line.

So if you have any Java that you import into Domino then please make sure that there is an even number of // \" on every line of your Java code!
Mar 02

SnT Thursday – Edit Document Fields from one to another

For this tip I had to look back at the history of Edit Document Fields to find when this feature was added.  It became available in 5.0.0 when Edit Document Fields was upgraded to use the new formula options in ND 6.  The tip is allows me to be lazy and reduce my typing mistakes.

If you are not familiar, Edit Document Fields provides a means of up dating document fields without any agents.  It even displays the current value of the field that is being updated.  With 5.0 the ability to updated multiple documents was possible.  

For the tip lets say that I would like the ‘StoryTitle’ of the ‘Edit Document Fields 5.0.0 Code’ to have the same value as the ‘Edit Document Fields History’ document shown below.


The prompting for which field to change and the new value of the field happens before navigating through the documents.  


That is it!  Remember the default value of the field is determined base on the currently selected document.
Feb 23

SnT Thursday – Reference Lookup 1.1.0

Here is my second installment of Show n Tell Thursday .  In July of last year Reference Lookup was published, which talked about using alias to get a database location from documents instead of having to hard code the path or replica IDs in code.  The initial release used Server names and paths with Reference Lookup 1.1.0 replica IDs can be used to access database information through Java, LotusScript, or Formula.   Quick Elementer was also updated in this release, which allows the Reference Lookup design elements to be quickly copied to an application.  

The Reference Lookup database has been a life saver for me, because it has allowed each of my environments to look the same but to be configured differently.  A good example is in our production environment.  A workflow application is used to allow employees information to be submitted and approved.  Once it is approved it updates the Domino Directory (names.nsf) nightly through an agent.  Because names.nsf is used in each of the environments as the primary address book a different database is used.  With the use of Reference Lookup all the needs to be changed is the database path of the same alias.  No code changes and the configuration stays with each of the environments.  On top of the environments is the ability to move database home or to some other computer and not have to worry about changing code.

Another example is the use of Reference Lookup to define the path of files that are used to import or export information from Domino.  I have been able to move databases and files in production as requested without having to make any code changes, without having to re-test the application, and make the changes in minutes.

Feb 16

SnT Thursday – LotusScript Calls & Format Formula

Thanks Rocky for the SnT idea, and also to Vince for the SnT image. This will be two parts a show and a tell.   Tell Rocky asked everyone to use Julian’s LotusScript 2 HTML on Joe Litton’s page for those of you trying to Show or Tell some LotusScript.   Ester Storm was thinking of writing a Formula to HTML which has been around for about a year. Show Back in December Craig Schumann published a tool called LS Calls .  I liked the concept of using LS Calls to determine which variables are no longer being used, and variables are being used before they are ever set.  The only thing that I did not like is having to type the command in every time, so I took Chris Doig concept that he used for Set Template Version and applied it to LS Calls as seen in the screenshot: When editing a LotusScript Calls Configuration there will be help available just as Craig defined.  One other feature that I like is the ability to open the output in NotePad or anything else you wish. The code is very simple until I needed to have LotusScript wait for the execution of LSCalls before it tried to open the output or import the CSV.   Ken Yee came to the rescue with ‘ Can you start a program in Notes and wait for it to finish? ‘ from 1998.  There was one other gotcha, having to write the command to a batch file and executing the batch file, so if anyone has a better idea let me know. The LotusScript Calls database is not that fancy but maybe the concept storing and running command type programs from Domino.  Enjoy! Update: I lost the database in my transition to WordPress, so if anyone has it please send it to me, thanks.