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



  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...