Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs

June, 2006
    01 02 03
04 05 06 07 08 09 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30

Search the weblog

Genii Weblog

Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.

Thu 29 Jun 2006, 12:08 PM
The Export Shop Sketch
(with thanks and apologies to Monty Python)

(a customer walks in the door.)

Customer: Good Morning.
Owner:    Good morning, Sir.  Welcome to the IBM Lotus Notes Export Facility!
Customer: Ah, thank you, my good man.
Owner:    What can I do for you, Sir?
C: Well, I was, uh, sitting in the Beach Club lobby just now, skimming through the "Lotus Notes and Domino 6 Programming Bible" by Brian Benz and Rocky Oliver, and I suddenly came over all timorous.
O: Timorous, sir?
C: Weak-kneed, spineless, panicky, mostly about whether I could get my multitudinous highly formatted documents out of Lotus Notes without data loss.
O: Eh?
C: 'Ee, Ah got the willies cuz I wanna get lots of stuff outa Notes widout it lookin loike shite!
O: Ah, indeed, sir!
C: So, then, bring on the fine export formats please, my good man.
O: (lustily) Certainly, sir.  What would you like?
C: Well, eh, how about a nice flexible Open Document Format.
O: I'm, a-fraid we're fresh out of ODF, sir.
C: Oh, never mind, how are you on StarWriter 5.0?
O: I'm afraid we never have that at the end of the week, sir, we get it
   fresh on Monday.
C: Tish tish.  No matter.  Well, stout yeoman, serve up a portion of XHTML, if
   you please.
O: Ah!  It's beeeen on order, sir, for two weeks.  Was expecting it this
C: 'T's Not my lucky day, is it?   Aah, ordinary HTML 4.0?
O: Sorry, sir.
C: Works 6.0 or 7.0?
O: Normally, sir, yes.  Today the van broke down.
C: Ah.  Lotus WordPro?
O: Sorry.
C: Outlook Express .EML?
O: No.
C: Any Internet Explorer Web Archive .MHT, per chance?
O: No.
C: Word 97?
O: No.
C: Word 95?
O: <pause>   No.
C: Microsoft RTF, perhaps?
O: Ah!  We have Microsoft RTF, yessir.
C: (suprised) You do!  Excellent.
O: Yessir.  It's..ah,'s a bit rummy...
C: Oh, I like it rummy.
O: Well,.. It's very rummy, actually, sir.
C: No matter.  Fetch hither le plus bas dénominateur commun !  Mmmwah!
O: I...think it's a bit rummier than you'll like it, sir.
C: I don't care how fucking rummy it is.  Hand it over with all speed.
O: Oooooooooohhh........!   <pause>
C: What now?
O: It doesn't actually handle images, sir.  They all turn grey.  And bullets disappear.
C: <pause>    Do they?
C: *have* some export filters that maintain fidelity, don't you?
O: (brightly) Of course, sir.  It's a export filters facility, sir.  We've got--
C: No no... don't tell me.   I'm keen to guess.
O: Fair enough.
C: Uuuuuh, PageMaker.
O: Yes?
C: Ah, well, I'll have some of that!
O: Oh!  I thought you were talking to me, sir.
   Mister PageMaker, that's my name.


O: Not *today*, sir, no.
C: Aah, how about Microsoft Word 2003?
O: Well, we don't get much call for it around here, sir.
C: Not much ca--It's the single most popular file format in the world!
O: Not 'round here, sir.
C: <slight pause> and what IS the most popular file format 'round hyah?
O: OpenXML, sir.
C: IS it.
O: Oh, yes, it's staggeringly popular in this manor, squire.
C: Is it.
O: It's our number one best seller, sir!
C: I see.  Uuh...OpenXML, eh?
O: Right, sir.
C: All right.  Okay.
   'Have you got any?' he asked, expecting the answer 'no'.
O: I'll have a look, sir...
   nnnnnnnnnnnnnnnno.  Not until next year.
C: It's not much of a file export facility, is it?
O: Finest in the district!
C: (annoyed) Explain the logic underlying that conclusion, please.
O: Well, it's so clean, sir!
C: It's certainly uncontaminated by file export filters....
O: (brightly) You haven't asked me about AppleWorks, sir.
C: Would it be worth it?
O: Could be....
C: (slowly) Have you got any AppleWorks?
O: No.
C: Figures.
   Predictable, really I suppose.  It was an act of purest optimism to have
   posed the question in the first place.  Tell me:
O: Yessir?
C: (deliberately) Have you in fact got any file export filters that maintain fidelity here at all.
O: Yes,sir.
C: Really?
O: No.  Not really, sir.
C: You haven't.
O: Nosir.  Not a one.  I was deliberately wasting your time,sir.
C: Well I'm sorry, but I'm going to have to shoot you.
O: Right-0, sir.

The customer takes out a gun and shoots the owner.

C: What a *senseless* waste of human life.

To avoid such a senseless waste in your organization, why not try our Midas Rich Text LSX?  While we don't support all of these formats, we do support several of them, and more are on the way.

Copyright 2006 Genii Software Ltd.

Thu 29 Jun 2006, 11:07 AM
I guess I'll have to do something more proactive soon.

Copyright 2006 Genii Software Ltd.

Thu 29 Jun 2006, 09:49 AM
Show and Tell ThursdayI posted this long ago in a couple of competitive bouts with Rocky, but they are handy tips and might well have gotten mised by those who might use them as opposed to just watching the show.  This requires @Functions which were introduced in ND6, so don't try it with R5.

Original Requirement (Categorized View)

Let's assume you have a database with people's names contained in multi-value text list field called 
Attendees.  Now, you want to categorize documents by attendee, so you can see which sessions Roger Hebert is in, for example.  Since the Attendees field is stored as a multi-value list, such as "Thomas Duff":"Joe Litton", this would seem easily handled by a categorized column with a formula such as

Original Formula

(Attendees; " ")+", "+@LeftBack(Attendees; " ")

which works great until you see attendees with names such as "Cees van der Woude".  Well, we don't want the "Cees van der Woude" to be returned as "Woude, Cees van der" because that would be both inaccurate and culturally ignorant.  So, how do we handle this?  Also, how do we handle entries such as "N/A", which leaders put for any person for whom they didn't get a correct name?  If this were a single value, the formula could handle these exceptions more easily, but the multi-value list makes it very hard.  Also, there are a few really odd names such as Cindy Lou Who van der Pelt.

But in Notes 6, the @Transform function was added, which does indeed allow us to act as if this is a single value instead of a list.  Let's see if we can come up with a formula for our categorized column that handles these exceptions cleanly.  

A much better Solution to Original Requirement

The following column formula is used in the column to be categorized, with the sorting handled by the view engine.

@Transform(Attendees; "A";
@If(A = "N/A":"""N/A";
       @Do(R:=@Transform(@Explode(A; " "); "W";
          @If(@Matches(W; "{a-z}*"); W+@RightBack(A; W)+", "+@LeftBack(A; W); @Nothing)); 
                  @If (@Trim(R) != ""@Trim(R)[1]; @RightBack(A; " ")+", "+@LeftBack(A; " ")))));

That works well, and will handle all of the special cases, so long as the initial words in last names, such as "van" in "van der pelt" start with lowercase letters.

New Requirement (List displayed in a document)
But then you decide that inside each document, you would like the list sorted by last name first as well, but not shown that way.  In other words:

Joe Litton
Cindy Lou Who
Mary Jane van der Welten
Tom Duff
Ben Langhinrichs
Harry Belafonte

should be listed as

Harry Belafonte
Tom Duff
Ben Langhinrichs
Joe Litton
Mary Jane van der Welten
Cindy Lou Who

This requires an adaption using the @Sort method, and a bit of slight of hand.

Solution to New Requirement
sorted_by_last := @Sort(@Transform(Attendees; "A";
@If(@Do(R:=@Transform(@Explode(A; " "); "W";
          @If(@Matches(W; "{a-z}*"); W+@RightBack(A; W)+", "+@LeftBack(A; W); @Nothing)); 
                  @If (@Trim(R) != ""@Trim(R)[1]; @RightBack(A; " ")+", "+@LeftBack(A; " ")))));
sorted := @Trim(@RightBack(sorted_by_last; ",")+" "+@LeftBack(sorted_by_last; ","));

Yeah, just what you were thinking, right?  The key is using the @Transform we used above, but then recreating the original after sorting.  Geeky, but effective.

Copyright 2006 Genii Software Ltd.