Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Keiko Asaresateretsi 13.Feb.03 10:25 AM a Web browser
Applications Development 6.0 Windows 2000


I am working on a view using InViewEdit on a column. The idée is to edit a date filed from the view. Using the script below I can edit the filed from the column. But, the problem appears when I change the value from the view. The value doesn’t displays as a date. I have to open and save the document before the value changes to Date. Please help………

Here is the scrip....

Sub Inviewedit(Source As Notesuiview, Requesttype As Integer, Colprogname As Variant, Columnvalue As Variant, Continue As Variant)

%REM
In this view, the programmatic name of each editable column
is the same as the name of the field whose value it holds.
All the fields for the editable columns are simple Text.
Each editable column gets the same processing.
%END REM

REM Define constants for request types
Const QUERY_REQUEST = 1
Const VALIDATE_REQUEST = 2
Const SAVE_REQUEST = 3
Const NEWENTRY_REQUEST = 4

REM Define variables
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim caret As String

REM Get the CaretNoteID - exit if it does not point at a document
caret = Source.CaretNoteID
If caret = "0" Then Exit Sub

REM Get the current database and document
Set db = Source.View.Parent
Set doc = db.GetDocumentByID(caret)

REM Select the request type
Select Case Requesttype

Case QUERY_REQUEST
REM Reserved - do not use in Release 6.0

Case VALIDATE_REQUEST
REM Cause validation error if user tries to exit column with no value
If Fulltrim(Columnvalue(0)) = "" Then
Messagebox "You must enter a value",, "No value in column"
Continue = False
End If

Case SAVE_REQUEST
REM Write the edited column view entries back to the document
For i = 0 To Ubound(Colprogname) Step 1
Call doc.ReplaceItemValue(Colprogname(i), Columnvalue(i))
Next
REM Save(force, createResponse, markRead)
Call doc.ComputeWithForm( False, False)
Call doc.Save(True, True, True)

Case NEWENTRY_REQUEST
REM Create document and create "Form" item
REM Write column values to the new document
Set doc = New NotesDocument(db)
Call doc.ReplaceItemValue("Form", "fa_Saledescription")
For i = 0 To Ubound(Colprogname) Step 1
Call doc.ReplaceItemValue(Colprogname(i), Columnvalue(i))
Next
REM Save(force, createResponse, markRead)
Call doc.ComputeWithForm( False, False)
Call doc.Save(True, True, True)


End Select

End Sub






Date format when using InViewEdit (~Keiko Asaresat... 13.Feb.03)
. . RE: Date format when using InViewEd... (~Bill Frokimari... 15.Feb.03)
. . RE: Date format when using InViewEd... (~Tip Xanfanalit... 7.Jan.04)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS