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

RE: Date format when using InViewEdit
~Umberto Nongeroson 15.Feb.03 08:00 PM a Web browser
Applications Development 6.0 Windows 2000


The value entered into the column by the user is a text value. Even though the value may have been a date/time before the user started to edit it, they can type any characters into the cell, so a modified column value is given to you as text, even if it's text that happens to look like a date. Your code in the Inviewedit event must convert the value to the desired datatype, in this case date/time. There are a couple of ways you could do this:
  • Declare a New Notesdatetime object and give it the value entered into the column as an initializer.
  • After assigning fields, call ComputeWithForm method to adjust all fields to their correct datatypes.
The disadvantage to ComputeWithForm is that it may be slow. The big advantage to using it, is that your program is much simpler and the maintenance is easier (e.g. if you change the datatype of a field on the form). This applies not only to date/time fields, but to number fields, Author and Reader fields, multivalued fields of all sorts, etc.

Incidentally, the QUERY_REQUEST event is not "reserved", you can certainly use it, and it's very handy. For instance, you could put code in there so that when the user tries to edit a date column, instead of just letting them type anything they like, you could pop up a date picker dialog. Or for a keyword field, you can pop up a list of keyword choices instead of just letting the user enter any value.

Also, I suggest you don't bother to fetch the current document before seeing what event you're processing. It's a waste of time to fetch the document every time the user enters or exits a cell, unless they are leaving the row and you need to save the document.

- Andre Guirard
IBM Lotus Software
Enterprise Integration Team




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






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


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

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS