InViewEdit (NotesUIView - LotusScript®)

Allows the user to edit a document through its view column entries. Occurs as follows:

  1. Query: when the user enters an editable view column entry.
  2. Validate: when the user exits an editable view column entry.
  3. Save: after validation of one or more view column entries in an existing document.
  4. New entry: after validation of one or more view column entries in a new document.
Note: This event is new with Release 6.

Defined in

NotesUIView

Syntax

InViewEdit(Source As NotesUIView, RequestType As Integer, ColProgName As Variant, ColumnValue As Variant, Continue As Variant)

Parameters

Source

NotesUIView. Read-only. The current view.

RequestType

Integer. Read-only. The current event request:

  • 1 for a query request
    Note: For Release 6.0 request 1 is reserved. It should not be used.
  • 2 for a validate request
  • 3 for a save request
  • 4 for a new entry request

ColProgName

Array of type String. Read-only.

  • For query and validate requests: the programmatic name of the current column, in element 0.
  • For save and new entry requests: the programmatic names of the columns being processed, starting in element 0.

ColumnValue

Array of type Variant. The elements of this array correspond to those of ColProgName.

  • For query and validate requests: the text of the current column entry, in element 0.
  • For save and new entry requests: the text of the column entries being processed, starting in element 0.

Continue

Boolean. Read-write. Indicates whether or not a query or validate request proceeds. Initially set to True. Set this parameter to False to stop processing and generate an error message. This parameter does not apply to save and new entry requests.

Usage

This event occurs only for an editable column.

Use CaretNoteID to get the Note ID of the document containing the item represented by the current view column entry. If the user is creating a new document, this property has a value of "0" for the query request.

Making the programmatic name of a column the same as the name of the item associated with the column facilitates processing. You can then use the names in the ColProgName array to get and set item values.

The user clicks on or tabs to an editable column to edit it. A box opens containing the existing value which the user can then modify before clicking or tabbing out.

To process editable column entries in an existing document:

  • Check ColumnValue(0) during the validation request and set Continue to False if the value is in error.
  • Write all the values in ColumnValue to their associated items during the save request.

To process editable column entries in a new document:

  • Exit if CaretNoteID has "0" for a value.
  • Check ColumnValue(0) during the validation request and set Continue to False if the value is in error.
  • Write all the values in ColumnValue to their associated items during the new entry request.

The query and validate requests act upon one column entry. For efficiency, the save and new entry requests may act upon accumulated column entries.

A special case is a column that represents the item as an icon. You change the icon by writing to the item represented by the view column entry in a save request. Each time the user clicks on the column entry, your save code executes.

When you create a script that responds to this event, Notes® creates the syntax of the event for you (including the parameters). You do not need to type it in.

Example