Q
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
Document)
  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.

This was last published in March 2004

Dig Deeper on Lotus Notes Domino Application Development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • 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 ...

SearchDataCenter

SearchContentManagement

Close