Home > Domino Tips > Developer > LotusScript > Mass-input form uses LotusScript to ease large-scale employee moves
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

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


Paul Stockinger, Contributor
03.03.2009
Rating: -3.17- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication
LotusScript filters and attaches files to a Notes form

LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
Run or restart Notes/Domino agents via text messages
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication

Lotus Notes 8
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Using Domino Administrator to manage client settings
Setting up a Domino 8.5 XPages example
Four-step application rollout with Notes 8.0.1 Widgets
IBM Lotus to end Notes/Domino 7.x support
An introduction to ID Vault in Lotus Notes/Domino 8.5
Are you ready for LotusLive hosted email services?
JavaScript workaround fixes Lotus Notes 8.x PostOpen event issue
LotusScript code rebuilds corrupted busytime.nsf file
LotusLive spurs IBM's entry into the hosted services market

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts