Start LotusScript.doc from Designer
I have been looking for consitant way to document my LotusScript for a long time. So when LotusScript.doc was available in beta form I had to take a look. Here is some of the feedback that has been recieved. I now have one more improvement/enhancement I would like to see, which is to start LotusScript.doc from the database I want to document.
This idea started with Quick Elementer 2.0 by Alain H Romedenne. It was implemented in Quick Elementer 2.2.0. I then took this same idea and applied it to the Set Template Version. Enough with the history!
In order to make launch LotusScript.Doc a new view needs to be created. This view should be based off of the 'LotusScript.doc Configuration Documents by Server' view. The first column needs to combine the Server and FilePath fields into one column sperated by '!!'. This view is used to determine if a configuration document already exists. Here is the code that can be added to the toolbar or the Tools menu in Designer to launch LotusScript.doc from anywhere.
server := ""; database := "lsdoc_beta.nsf" ; FromDBTitle := @DbTitle + "|" + @Implode( @DbName ; "!!" ); @StatusBar( "LotusScript.doc for : " + @Left( FromDBTitle ; "|" )) ; @If( @Text( @DbLookup( "" : "NoCache" ; Server : database ; "Designer Launch"; @RightBack( FromDBTitle ; "|" ) ; 1 ) ) = @RightBack( FromDBTitle ; "|" ); @Return( @Command( [FileOpenDatabase]; server : database ; "Designer Launch" ; @RightBack( FromDBTitle ; "|" ) ; false ; true ) :@Command([ToolsRunMacro]; "(ACTION - Build LotusScript.doc for selected configuration)" ) ) ; "" ); @Command([Compose]; server : database ; "lsdoc_config" ) ; @UpdateFormulaContext; FIELD Title := @Left( FromDBTitle ; "|" ) ; FIELD Server := @Left( @RightBack( FromDBTitle ; "|" ) ; "!!" ); FIELD FilePath := @RightBack( @RightBack( FromDBTitle ; "|" ) ; "!!" ); @Command([ViewRefreshFields]); @UpdateFormulaContext; @Command([FileSave] ); @Command([ToolsRunMacro]; "(ACTION - Build LotusScript.doc for selected configuration)"); @Command([FileCloseWindow])
I would not typically combine the database title with the server and file path but based on yesterday's post I had no choice.
One other twist that came to mind while writing this is taking a subset (basicly removing the runing of the agent) of this code and create an option to edit the LotusScript.doc configuration document from anywhere.
Code formatted using Format Formula as HTML