logo

A new article, the second tip and some news

Ok, so I promised at least one article for every month of this year. Well, here's January covered. Debugging JavaScript in Your Applications. It's a rewrite of an old article on the same subject. This new one takes it all a little further; describing how to call the debugger and how to use it to debug more effectively. If you use alert boxes to debug your JavaScript then you really should read this.

Today's tip is a simple one to save space. It's about an enhancement to the @DBLookup function in Domino 6. Have you ever used code like this to handle @DBLookup errors?

tmp := @DBLookup( ""; ""; "myView"; "myKey"; 2);
@If( @IsError( tmp ); @Return( "" ); "");
tmp

In Domino 6 there's no need to. The DBLookup function has a new optional argument called [FailSilent]. If you include this in your code, as below, the code will return "" instead of throwing a paddy. Brilliant! If you're in the process of upgrading to 6 then you can get rid of some code whilst you're at it.

@DBLookup( ""; ""; "myView"; "myKey"; 2; FailSilent ]);

Finally, a bit on LotuSphere. I am attending as guest of the makers of PeerWire - "Peer File Sharing for Lotus Developers". As soon as I know the booth number I will let you know where you can find me. If any of you want to actually arrange to meet, feel free to get in touch.

Comments

  1. Hey Jake,

    Thanks for bringing the @dblookup up. I was just noticing last night that @dbcolumn in R6 seems to fail silently by default (which is odd). I was just getting ready to investigate this morning... thanks for saving me some time.

    • avatar
    • David Frahm
    • Tue 13 Jan 2004 09:03

    Can someone explain "throwing a paddy"? I'd guess it means like "throwing a fit" in US, but where does "paddy" come from?

    • avatar
    • Jake
    • Tue 13 Jan 2004 09:19

    Well it could mean:

    \Pad"dy\, n.; pl. Paddies. [Corrupted fr. St. Patrick, the tutelar saint of Ireland.] A jocose or contemptuous name for an Irishman.

    That's not how I meant it though. Now I think about it I wonder if anybody at all knows what I am talking about.

    You're right though. I meant having a fit. Throwing the toys out of the pram etc.

    • avatar
    • Higs
    • Tue 13 Jan 2004 10:34

    PeerWire's booth numbers are #709 and #710 :)

    • avatar
    • Gaston
    • Tue 13 Jan 2004 13:18

    from peerwire website : "PeerWire partners with CodeStore.net

    12/02/2003: PeerWire has joined forces with the popular CodeStore.net site to add an extensive and searchable library of how-to articles and other helpful tips."

    What is it exactly ?

    • avatar
    • Tom
    • Tue 13 Jan 2004 15:44

    Jake, what's a pram?

    I'll be sure and stop by the booth to meet you!

    • avatar
    • Chris Harris
    • Tue 13 Jan 2004 16:15

    Off to Lotusphere you lucky chap! I went back in 1997 when there were over 10,000 attendees, oh what a week :)

    On the Paddy front, not sure where it came from but a Paddy Wagon is an old term for a Police Van, maybe it started as "thrown in a paddy?"

  2. You should also mention the other new feature, @IfError. It comes in handy when you want to set the value to something other than "".

    tmp := @IfError(@DBLookup( ""; ""; "myView"; "myKey"; 2);"No Match Found");

  3. I like the short cut code, but along Niel's line of thought, I rarely want to return an empty string, but a more descriptive error message (either a system generated message or a custom message.

    It would be cool if the code could work as such:

    @DBLookup( ""; ""; "myView"; "myKey"; 2; "<my Error Message>");

    The new parameter I really like is

    [RETURNDOCUMENTUNIQUEID] !

    Tom: A Pram is a stroller. I learned some things from my Trini family:-)

    Now for Paddy Wagon:

    Americans took to calling all Irish "Paddy" when they began to arrive in large numbers in the middle of the 19th century. (The term was far from complimentary, in many circles considered it was (is) considered derogatory.) Unfortunately, many of the more raucous Irish developed a reputation for running afoul of the law and were hauled away in what was officially a "Police Patrol" vehicle but took on the name "paddy wagon".

    from:

    {Link}

    • avatar
    • Heini
    • Fri 16 Jan 2004 14:00

    Hi Jake,

    late but I must say this. PeerWire has one of the best Domino websites I have ever seen, both for Design as of Content. Very, very nice. If everything from PeerWire has such a high quality standard they hopefully will have a bright future.

    Have fun at Lotusphere.

    Cheers

    Heini

    • avatar
    • Jenny
    • Wed 28 May 2008 04:16 PM

    Throwing a Paddy means to lose your temper. The saying began in the 1800's when English invaders regarded Irish people as being below their intelligence and as being a less civilized.

    The way became to compare acts of unsociable behavior with the Irish. Anyone who became angry or distressed would therefore be throwing a paddy

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 13 Jan 2004

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content