Home > Ask the Domino Experts > Application Development Questions & Answers > How to capture values from one doc to another using LotusScript
Ask The Domino Expert: Questions & Answers
EMAIL THIS

How to capture values from one doc to another using LotusScript

Brian Mahoney EXPERT RESPONSE FROM: Brian Mahoney

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


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


>
QUESTION POSED ON: 06 October 2005

I have a form that has a checkbox which contains values such as Accounting, Service and Maintenance. The user is able to select one or more of these values from the list. I need to run through the values that the user has selected and add his or her name to another field on another document that corresponds to their selection.

The fields that appear on the other document are Accounting, Service and Maintenance. If the user has selected Accounting, their name is to be added to the Accounting field, and so on. The document that we are loading their name to is used for mailings corresponding to their selection. The intent is to have this information populate the document at the time the user submits the document. I would like to do this dynamically, but am not sure how I can capture all of the values and load into the correct fields. I am writing this in LotusScript.


>
Something like this will help you out:
 Dim ws As New NotesUIWorkspace
 Dim doc As NotesDocument
 Set doc = ws.currentDocument.document
 Dim item As NotesItem
 Dim MyType As NotesItem
 Set MyType = doc.getFirstItem("MyTypes")
 'MyTypes is the field with the values the user selected'
 Forall SelectedType In MyTypes.Values
  Set Item = doc.ReplaceItemValue
( SelectedType, "UserName" )
 End Forall
      'save the document'


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



RELATED CONTENT
Application Development
Calculating results for a column in a Lotus Notes view
Do I use Formula or LotusScript to include a doclink to a Notes view?
'Customize this view' options are disabled in Lotus Notes databases
Give external users access to workflow-based Notes Domino applications
Setting the field value of a table
Troubleshooting non-delivery of agent notification e-mails
Exporting data from Microsoft Excel to Lotus Notes
How to send a form to a non-Lotus Notes email client
Manipulating the replication and form of profile documents
How to create an icon on an HTML page that opens the Lotus Notes database from a Lotus Notes client

LotusScript
LotusScript agent parses ACL to Microsoft Notepad
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

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



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
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