@UpdateFormulaContext and @Command([Compose])

I found some interesting results using the @UpdateFormulaContext and the Compose command. It looks likes the tempary variables are actually pointers. Notice the difference (shown below) when the database information is stored in the variable instead of a string.
FromTitle := @DbTitle; 
 FromServerPath := @DbName ; 
 FromDB := @DbTitle + " | " + @Implode( @DbName ; "!!" ); 
 
 @StatusBar( "From title " + FromTitle ); 
 @StatusBar( "From path " + @Implode( FromServerPath ; "!!" ) ); 
 @StatusBar( "From DB " + FromDB ); 
 
 @StatusBar( "Before compose "  ); 
 @Command( [Compose] ;"" : "names.nsf" ; "Person"  ); 
 
 @StatusBar( "After compose "  ); 
 @StatusBar( "After compose From title " + FromTitle ); 
 @StatusBar( "After compose From path " + @Implode( FromServerPath ; "!!" ) ); 
 @StatusBar( "After compose From DB " + FromDB ); 
 
 @UpdateFormulaContext; 
 @StatusBar( "After Update Formula Context "  ); 
 @StatusBar( "After Update Formula Context From title " + FromTitle ); 
 @StatusBar( "After Update Formula Context From path " + @Implode( FromServerPath ; "!!" ) ); 
 @StatusBar( "After Update Formula Context From DB " + FromDB ); 
 
 @StatusBar( "Names title " + @DbTitle ); 
 @StatusBar( "Names path " + @Implode( @DbName ; "!!" ) ); 
 @StatusBar( "Names DB " + @DbTitle + " | " + @Implode( @DbName ; "!!" ) );
Here are the results: From title Some Database From path !!somedb.nsf From DB Some Database | !!somedb.nsf Before compose After compose After compose From title Some Database After compose From path !!somedb.nsf After compose From DB Some Database | !!somedb.nsf After Update Formula Context After Update Formula Context From title Someone’s Address Book After Update Formula Context From path !!names.nsf After Update Formula Context From DB Some Database | !!somedb.nsf Names title Someone’s Address Book Names path !!names.nsf Names Someone’s Address Book | !!names.nsf Code formatted using Format Formula as HTML

One thought on “@UpdateFormulaContext and @Command([Compose])

  1. Pingback: Start LotusScript.doc from Designer « ChadSmiley Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">