 |
@Midas Formulas 3.61
For everyone from power users to hard core programmers who wants to use the powerful rich text technology of the Midas Rich Text LSX, but doesn't want the overhead of a script or the confines of LotusScript. Licensing is available separately or as a bundle with our Midas Rich Text LSX.
@Midas Formulas - Demo
Please let us know what you think of our demos and whether you had any problems or suggestions.
Question: I can't figure out where there is any documentation. Is there something that lists all the @Midas formulas and their syntax?
Answer: Good question! The Midas Help database is being updated to reflect all entries, but is not quite complete. Start with the three blog entries @Midas for Domino Developers, Part 1, Part 2 and Part 3. Continue with the Midas On-Line Help db, looking under 05 - @Midas Functions from the main Contents menu. Both the downloadable and on-line versions should be completely updated by early next week.
Sample 1 - Web shopping cart template
The @Midas A La Carte sample shows an innovative way to create a shopping cart template. I have blogged about it here, and it is available on-line here (@Midas A La Carte demo), but this is a version you can try out for yourself and tweak and change:
AlaCarte.zip sample db
Sample 2 - @DbLookup & @DbColumn on rich text tables
The @Midas Lookups sample shows some ways to query rich text fields the way you do views in Notes. I have blogged about it here and here (and earlier here, although the syntax has changed a bit). There will be an on-line demo soon. This is a version that you can use to see it work. Note that for American audiences, I have used a recent version of the Democratic candidate delegate counts, but for the audience in Germany, I pulled some local election results. This should demonstrate some of the flexibility. If that isn't enough, look alo at the Fix List demo, which is a table most spectacularly NOT well designed for lookups:
AtMidasLookups.zip sample db
Sample 3 - Test db for a few functions
The @Midas System test db is not quite ready for public use, but will be available shortly to show some of the many different functions in a test environment where you can try them out:
This recent arrival in the Midas family adds the same sort of easy, powerful rich text programmability accessible as simple formulas, and some uses in places you might not expect. See below for four examples of how you might use @Midas that wouldn't be possible with the Midas Rich Text LSX:
Scenario 1 - @DbColumn/@DbLookup on rich text tables
For example, if a table such as this one from the Partnerworld site were in a rich text field called Body on the current document:
| IBM Value Package for Developers | Annual fee |
| North America, Europe, Middle East, Africa | $595 |
| Latin America | $750 |
| Asia Pacific region | $350 |
you could specify a command such as:
prices := @DbColumn("Midas"; @DbName; @DocumentUniqueID; "Body"; 2; "Format='Currency' SkipTitle='Yes' ");
and prices would be three numeric values in a multi-value list.
You could also specify a formula such as:
price := @DbLookup("Midas"; ""; @DocumentUniqueID; "Body"; "Latin America"; 2);
and price would be a string "$750"
Even if the table were "sideways", such as that below, the formulas would be only slightly different.
californiadelegates := @Sum(@DbColumn("Midas"; ""; @DocumentUniqueID; "Body"; 5; "Format=Number SidewaysTable=Yes SkipTitle='Yes' "));
would return a numeric 22, while
kerrydelegates := @Sum(@DbLookup("Midas"; ""; @DocumentUniqueID; "Body"; "Kerry"; 5; "Format=Number SidewaysTable=Yes SkipTitle='Yes' "));
would return a numeric 5.
Scenario 2 - Computed text on web
To make your own JSP-like tags on web forms, you could have a computed text field such as:
@DbCommand("Midas"; "GenerateXHTML"; ""; "PAGE":(company + " Resources"); "Table " + @Text(count))
which in one command would connect to the specific company resource page, generate XHTML for the specific table and spit it out as the result of the formula. Power tags on steroids.
Scenario 3 - Smart icon
For a smarticon, you could have a formula somewhat like:
@DbCommand("Midas"; "Font"; @DocumentUniqueID; "Body":"Table *; Row 1"; "+Bold -Italic Black 12pt Default Sans Serif");
which is a single command but operates much like using the Font property in the Midas Rich Text LSX to set the font and text attributes of the first row of every table on the current document to a specific font. Of course, you can't use script in a smart icon, can you?
Scenario 4 - Hide-When formula
There are various ways to use @Midas in a hide-when formula, including self-referential rows in a rich text field that are hidden if the content is a certain value, but this is an easier one to justify. Assume a hide-when formula for an action on a form called Export Graphic:
@DbCommand("Midas":"NoCache"; "GetCount"; @DocumentUniqueID; "Body"; "Graphic") = 0
which basically connects to the current document's Body field and returns the number of in-line graphics. If there are not any, it hides the action. The formula for the action itself would then be something like:
filename := @Prompt([OkCancelEdit]; "Graphic filename"; "Enter the file name where the graphic should be exported:");
@DbCommand("Midas"; "ExportGraphic"; @DocumentUniqueID; "Body":"Graphic 1"; filename);
If you want to give the @Midas Formulas a try, sign up on our evaluation request form and we'll send along an evaluation license. Come on, you know you want to give it a try!
|
 |