Manage Learn to apply best practices and optimize your operations.

Process large arrays in Notes forms without undue coding or testing

When two Domino developers had to process large arrays in Lotus Notes forms for an international company, they devised a solution that reduced the coding, debugging and testing time involved. Get the LotusScript code they used to easily process the arrays.

Processing large arrays in a Lotus Notes form can be cumbersome and time consuming. This tip gives you the LotusScript code that two Domino developers used to process complicated budget forms for an international company. The solution successfully reduced the coding, debugging and testing time previously required. It also reduced the size of the script library by a factor of 12. Here's their story.

Six years ago, we wrote an application for an international company with offices in 27 countries that would allow their Lotus Notes users to enter budgets for each of their particular sales offices.

Related resources from SearchDomino.com:
Array is too large and field doesn't support it

Bypass 65k when searching through large amount of data

Our top 10 LotusScript tips

LotusScript Reference Center

The company's budget form contained a profit and loss account (one for each product/customer) and 24 cost and revenue fields for each month and record.

The form also contains 24 x 12 fields and a view key field, for a total of about 3,000 fields per document. Testing the code was a nightmare.

We decided to use a different field-naming convention so that the information following the "_" in the field name represented the month. For example, Frate_1 is the rate for Month 1, Frate_2 is the rate for Month_2, and so on. We found that this naming convention made testing and coding much easier.

This solution moves the rates into a subscripted table in a Lotus Notes document. The LotusScript code effectively reduced the size of the script library by a factor of 12.

LotusScript to process large arrays
(Click on code for enlarged view and script download.)

This can be written as:

LotusScript to process large arrays
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Clive Belsham. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on LotusScript

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