Problem solve Get help with specific problems with your technologies, process and projects.

How can I store code in an LSS file and call that file at the press of a button?

I want to store code in a text file like LSS and I want to call that file when I press a button. I have read the concept of LSS files, but I want to know how to use it. Can you give me an example of setting a value into the current document? Thanks in advance.
One of the most common uses of LSS files is the Lotus-supplied constants. By placing the following line in the definitions section of an agent or a form, the Lotus constants become available for you within the agent or form.

%INCLUDE "lsconst.lss"

To use executable code from such a file, the code needs to be a subroutine or function. Suppose a file called mySub.lss contained the following code:

 Sub MySub (doc As Notes
  Print "The Document was last 
modified on " & doc.LastModified
End Sub
In the declaration area, add the line %INCLUDE "mySub.lss". In the button you wish to execute the code, you would have something like this:
 Sub Click(Source As Button)
     Call mySub(doc)
End Sub

Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on Lotus Notes Domino Application Development



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury