Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs







Recent posts

Thu 18 Feb 2021

Getting the point(s) across with Domino, O365, and Outlook365



Mon 15 Feb 2021

Exciton Boost 4.6.3 released



Mon 1 Feb 2021

REST plus RPC: storing actions as JSON or JavaScript


February, 2021
SMTWTFS
 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

Search the weblog





























Genii Weblog

@Midas demos feel quite different

Fri 14 Nov 2003, 01:23 AM



by Ben Langhinrichs
Yesterday, I blogged about re-inventing the wheel.  It was a very long post, so I'll keep this relatively short.

I am busy creating a new demo for the @Midas Formulas beta release, and it just feels... different.  A typical Midas Rich Text LSX demo has an Example Form with a rich text field and one or more agents which do something to the rich text.  The new A La Carte demo for @Midas has no rich text fields, no agents and doesn't change anything, yet it is quite dramatic.  I'll try to preserve some suspense by saying only that it has five forms with no editable fields on any of them, it is run entirely from the web (although I guess I could make a Notes version), and the only form that even uses @Midas has the following two computed text formulas, and virtually nothing else.  It works in both R5 and ND6.  Can you guess anything about the nature of the sample, which I plan to put on our website after I have made it available to the beta testers?

Computed Text #1
items := @If(DefB = ""; 0; @Elements(@Explode(DefB;",")))+@If(DefA = ""; 0; @Elements(@Explode(DefA;",")))+@If(DefE = ""; 0; @Elements(@Explode(DefE;",")))+@If(DefD = ""; 0; @Elements(@Explode(DefD;",")));
drinkprice := @If(DefB = ""; 0; @Sum(@DbLookup("Midas"; ""; "Form":"BeverageMenu"; "Table 2"; DefB_NL; 2; "Format=Currency")));
appetizerprice := @If(DefA = ""; 0; @Sum(@DbLookup("Midas"; ""; "Form":"AppetizerMenu"; "Table 2"; DefA_NL; 2; "Format=Currency")));
entreeprice := @If(DefE = ""; 0; @Sum(@DbLookup("Midas"; ""; "Form":"EntreeMenu"; "Table 2"; DefE_NL; 2; "Format=Currency")));
dessertprice := @If(DefD = ""; 0; @Sum(@DbLookup("Midas"; ""; "Form":"DessertMenu"; "Table 2"; ""; "DbLookup"; DefD_NL; 2; "Format=Currency")));
@Text(items)+" items selected for a total of " + @Text(drinkprice+appetizerprice+entreeprice+dessertprice; "CC")

Computed Text #2
attribs := "Generation=Fragment MoveStylesInLine=yes CSSBorders=yes ImageRelativeToPage=yes ";
drinks := @If(DefB = ""; ""; @DbCommand("Midas"; "GenerateHTML"; ""; "Form":"BeverageMenu"; "Table 1; Row 1,"+DefB;   "InPlaceImageURLDirectory=http:/ALaCarte.nsf/BeverageMenu/ " + attribs)+"<br>");
appetizers := @If(DefA = ""; ""; @DbCommand("Midas"; "GenerateHTML"; ""; "Form":"AppetizerMenu"; "Table 1; Row 1,"+DefA;    "InPlaceImageURLDirectory=http:/ALaCarte.nsf/AppetizerMenu/ " + attribs)+"<br>");
entrees := @If(DefE = ""; ""; @DbCommand("Midas"; "GenerateHTML"; ""; "Form":"EntreeMenu"; "Table 1; Row 1,"+DefE;  "InPlaceImageURLDirectory=http:/ALaCarte.nsf/EntreeMenu/ " + attribs)+"<br>");
desserts := @If(DefD = ""; ""; @DbCommand("Midas"; "GenerateHTML"; ""; "Form":"DessertMenu"; "Table 1; Row 1,"+DefD;    "InPlaceImageURLDirectory=http:/ALaCarte.nsf/DessertMenu/ " + attribs)+"<br>");
drinks+appetizers+entrees+desserts

That's the whole demo, along with a few computed fields and URL hotspots.  Happy hunting!

Copyright 2003 Genii Software Ltd.

What has been said:

No documents found