Genii Weblog


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


Tue 14 Dec 2004, 10:56 PM
Rocky Oliver has a really cool article over on his LotusGeek site called Formula Big Top Preview: The Elusive @Transform.  In it, he describes the powerful @Transform function, added to formula language for Notes/Domino 6.x.  I'd suggest you go to his site to read all about it, but I'll excerpt one little bit:<blockquote>@Transform works against a list, and executes a formula against each individual element of the list, returning the modified list as the return value. The syntax of @Transform looks like this:

@Transform(list; name of variable; formula to run)

The list parameter is the list you want to work against.
The 
name of variable is a string that represents a single value in your list in the formula to run.
The 
formula to run is the single line of formula code you want to run against each element in your list.</blockquote>So, at the risk of being obsessive, how could you possibly use this with @Midas Formulas, which works on rich text fields?

It turns out, there are several ways.  I'm just going to show a simple example today, but tomorrow I'll show a much more powerful example, having to do with HTML generation and related to our on-line demo @Midas A La Carte (which you should try if you haven't, as it is entertaining if nothing else).

Getting Counts for Rich Text Targets
Let's say I want to find out the count of a number of different objects in a rich text field.  Let's say, for example, I want to find the number of tables, sections and URL hotspots.  My code could be: 

object_list := "Table":"Section":"URLLink";
counts := @Transform(object_list; "Obj"; Obj+"="+@Text(@DbCommand("Midas":"NoCache"; "GetCount"; ""@DocumentUniqueID"Body"; Obj)));
@Prompt([OK]; "Results"@Implode(counts; ", "));
This returns the result Table=1, File=0, URLLink=3 for this blog posting so far (with the fieldname changed to match this field).

Of course, we could make this a list selected by the user from a checkbox field, and the formula would not have to change at all.  Pretty cool.  But as I said, I have a more powerful example in mind which I need to write up and test tomorrow.  Now, back to Rocky's site to set up a trackback so he knows somebody is reading his articles <grin>.

Copyright © 2004 Genii Software Ltd.

Tue 14 Dec 2004, 09:35 AM
I have been doing some thinking about internationalization, especially as I see more hits on our sites from countries such as China, Unites Arab Emirates, Jordan and Thailand.  We have always had a wide customer base, and our products support international character sets and such fairly well (I would not say very well, because every time I think so, I find an exception and have to fix it).

I want to be sure that visitors are comfortable with the support for their languages and character sets, but I am not quite sure whether to include more diverse examples in the existing sample databases, or to create special databases that are not by function, but instead by language.  If a developer from China were to wonder about our support for Chinese (simplified or traditional), would he or she be more reassured if the Send It! sample had a Chinese example template, the Review It! had a Chinese example document, etc. etc., or if there were a separate Chinese database with a range of functions.

Would a developer in the Middle East like a sample database which showed search and replace with Arabic examples, exporting to Outlook Express (.eml) format with Arabic examples, and even dynamic tables with Arabic content?  Might that be more reassuring than scattered examples in the existing sample databases?  And what about Danish and French and Brazilian customers?  Would each want to see a separate database?

And what about those only looking for English support?  Would it be harder to wade through a whole series of different language samples to find the ones with English?  Would they be happier with separate language samples?

I have not come to any conclusions, but there are a lot of questions.  Does anybody have any strong feelings on the matter?  Would separate language databases in addition to the current sample databases be a good idea or bad?

I do need to emphasize that the instructions, comments, and such would all be in English, even if I do create a Chinese or Turkish or Arabic or Israeli database.  While I might wish I spoke thirty or more languages, I am not close to it, and the vast majority of developers have requested that documentation would be better done right in English than done wrong in any other language.  Therefore, it is only the content of the documents which would be in the language specified.

Copyright © 2004 Genii Software Ltd.