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.
|
||||
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.
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.
(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 first published in March 2009