About This Code
Brief Description:
ChangeFieldValue
Category:
Design Elements
Notes Version:
R5.x, R6.x
Last Modified:
29 Jan 2006
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
Change Field Value
This database contains 2 design elements that you should copy to the design of any Notes database in which you need the ability to select one or more documents and change/add multiple fields.
This was coded using Notes/Domino 7, but should work in versions 5, 6, and 7.
Usage / Example
This database contains 2 design elements that you should copy to the design of any Notes database in which you need the ability to select one or more documents and change multiple fields.
The two design elements to copy to the target database(s) are:
1. Form: (Change Field Values)
2. Agent: Change Field Value
Once the form and agent are present in a database, you can modify fields on selected documents:
1. Navigate to a view that has the document(s) you need to update
2. Select the target document(s)
3. Click Actions > Change Field Value
4. On the form that displays, each row represents one field that is to be modified. Follow the instructions on the form to select the field(s) to be modified (or enter the name for a new field) and to provide the new value(s). Please note:
....1. You can restrict process by optionally entering a qualifying Notes @Formula on any field's row. There is no checking to see that the formula you enter is valid.
....2. You can change the field from single value to multi-value or from multi-value to single value. It is assumed that you know what you are doing, so be certain that your form will properly display the changed value(s) and that any code that deals with the field will properly accommodate the changed value.
....3. If you are entering a single date value, the date picker will be available. If you are supplying multiple date values, you must take care to enter valid dates, as the date picker is not available for multiple values.
....4. If you are entering a name, the address book dialog is available and will restrict you to a single name selection. If you are entering multiple names (if the radio button on that row is set to designate a multi-value field), the address dialog will allow the selection of multiple names.
5. When the form is completed to your satisfaction, click the Submit button. You will be given an opportunity to quit with no changes being made.
6. Once you indicate that you do want to proceed, the routine will change the field values and display a count of the number of documents that had been selected and the number of documents updated. 7. When you click to close that messagebox, the form will also close, and you will be back at the view in which you'd selected the documents to be processed.
Please take care to set access rights to control who can use this routine, and please test thoroughly before using.
Code Attachments