Manage Learn to apply best practices and optimize your operations.

Mass-input form uses LotusScript to ease large-scale employee moves

Use this LotusScript button and Lotus Notes form with a spreadsheet-style interface to enter a high volume of records. This tip is helpful during a large-scale office move and can save your help help desk team time and trouble.

A customer recently expressed the need for a Lotus Notes form that has a spreadsheet-style interface so users could enter a high volume of records. Typically, you could import the records from a Microsoft Excel spreadsheet. We needed to do something different though, because only a handful of the fields would differ from one document to the next.

The customer was planning a large-scale employee move involving cubicle contents, equipment, phone/LAN jacks and more. Since their help desk team would be performing the move -- while still covering help desk calls -- the company thought this Lotus Notes form could help to track employees. The company also thought this could track their employees' previous and new locations within the office.

I developed a three-column table and a LotusScript button that initiates all requests simultaneously. This solution will also collect and share some fields that are common to each request. Additionally, you can include and pass rich-text data such as seating layouts or diagrams.

The form

The mass input form I created was fairly simple. I created a table, added three fields, set up the hide/when formulas (using @ThisField where appropriate in Lotus Notes 6.x and higher), and then copied and pasted.

Related resources from SearchDomino.com:
How to import data from Microsoft Excel to a Lotus Notes form with LotusScript 

Using LotusScript to retrieve names of fields on a Lotus Notes form 

I didn't worry about renaming the fields to clean up the "_1, _2" that Notes automatically places in the field. My LotusScript already accounts for it. My three columns were named: Caller Name, Old Location and New Location, but you can call them anything you want.

You could also include a fourth column that only LotusScript can access to indicate when a row was processed.

Note: I added a Save As Draft button, since large departmental moves may occur before an official request is pushed out.

The mass input form
Figure 1: A screenshot of my Lotus Notes form.

The LotusScript button

This code leverages the power of LotusScript and is backward compatible with Lotus Notes 4.x. Since Notes append the number to the fields that I copied and then pasted when designing the form, I could liberally use the loop structures to dynamically access the variables and flatten the code.

Note: If your client requires a larger worksheet containing 50 or 100 rows, you can copy the first row and paste another batch of table rows into the Notes form. This bumps the counter in the script and quickly adjusts the design.

You could also store it on your form and use a variable call to retrieve your loop counter variable.

Because you would launch this from edit mode, you can make use of the UI object methods and dynamically reference the variables. Requests were part of a batch beneath the table on the form. You can capture the common values of the request and push them out to newly created documents and multiple document types based on your requirements.

Using the Case mechanism in the subroutine, tailor the common information into a format specific to your team. Some users may only need the ticket in their queue, while other users would prefer email notifications, etc. Those users may want to apply it to different forms if it meets user requirements (see highlighted portion of LotusScript code).

I grouped requests beneath the primary form in the view to ease status reporting. This is especially helpful when the project involves relocation because the requester can monitor using view icons to map project status.

Note: I like to use the three-color traffic light icons for this style.

LotusScript button code for large-scale employee move
(Click on code for enlarged view and script download.)

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

Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was last published in March 2009

Dig Deeper on LotusScript

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

The best and easy method is 3rd party tools. You should try SysinfoTools that what i did when i stuck
Cancel

-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

SearchExchange

SearchContentManagement

Close