Reading the assono.de web site I came across a tip from Thomas Bahn. As I'm not as steady in german, I had ot use the Babelfish to translate from german to english. Much can be said about the translation but I'll leave that alone for now. On to the tip...
It's a 'Best of Breeds' Solution approach to configuration documents or setup documents.
Profiledocuments has been much used to create and access database\application setup information. This solution is fast and the code to write and access the data is clean and slick.
However profiledocument has been prone to errors when it comes to replication and ofcourse is cached when loaded. Especially when using profile documents to hold counter, sequnencenumber, workflow status and such, this will be a problem.
The solution is simple but elegant:
1. Create the setup/configuration document using normal document creation methods like @Command[Compose];"MyConfigDoc")
2. In the QuerySave or PostSave add code to create a Profile document containing only the setup documents UniversalID.
@SetProfileField("ConfigUNID" ; "ConfigUNID" ; @Text(@DocumentUniqueID) )
Now You haver Your profile document with the UNID that references the Configuration document. Extracting the data from the document is as easy as this:
ConfigDocID := @GetProfileField ("ConfigUNID";"ConfigUNID");
@GetDocField (ConfigDocID; "Config_CustomerEmail")
This is not much different than the direct use of ProfileDocument:
@GetProfileField ("MyConfigDoc";"Config_CustomerEmail")
Notice that You only need one line of extra code in the 'Best of Breeds' Solution.
This example only shows implementation using Formula, LotusScript should be just as easy to implement.
Showing posts with label Formula. Show all posts
Showing posts with label Formula. Show all posts
Friday, May 16, 2008
Thursday, January 24, 2008
Formula og LS morro!!
Ricky Oliver presenterer hva du kan gjøre med Formula og LotusScript. I samme rennet avliver han myten om at LotusScript er død, glemt og forlatt til å dø i et ensomt mørke.Vi får vite litt om hva vi kan gjøre med to ulike formula kommandoer: @Sort og @Transform.
Her er det noen gode tips om hvordan vi kan sortere lister i Formula. Denne er meget nyttig
og, som han pekte ut, langt lettere en det som er beskrevet i hjelpefilen.
@Transform er formula sin versjon av en Forall loop. Denne behandler hvert element i en liste og resultatet av behandlingen legges tilbake på den samme posisjon i listen.
På LotusScript siden fikk vi presentert metoder for å få tilgang og opprette designelementer "On-the-fly". Her ble det brukt til å generere en enquete eller spørreskjema. Spørsmål ble laget av sluttbruker og nødvendig form og views ble generert. Ganske stilig.
Hva han hadde å fortelle om kan du finne på hans egen blog http://www.lotusgeek.com/.
Subscribe to:
Posts (Atom)