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


Oct 13, 2016, 3:45 PM
8 Posts
topic has been resolvedResolved

Computed Date/Time Field - Formula for valid Date/Time Null Value

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: Date,Field,Time
  • Replies: 2

I am getting a Type Mismatch Error. It occurs In Lotus Script either when I do a ComputeWithForm or Refresh.

All of my editable fields are Valid upon saving.

I have read that Computed Date Time fields that save a "", of Text datatype, to the backend or Date Time Fields that resolve to a number data type both cause Type mismatch errors.

The Date Time Fields I have don't have Formula language Formula.  The value comes from Lotus Script after the form is computed.

Currently they have the Field Name typed into the formula area. That resolves as a text "".

What formula can I put in there that wouldn't cause an error ?

I have tried @ThisValue

@TextToTime(@ThisValue)) both still convert and save a "" TEXT datatype.

Is it possible to pass a NULL date Time Datatype or just leave it uninitialized until I put a value in it ?

Thanks !

Oct 13, 2016, 8:29 PM
82 Posts
One option ...
Make it an editable field that is hidden from the end user and only shows up in read mode
Oct 14, 2016, 5:49 PM
8 Posts
"Null" Date Time for computed Date Fields

 

That would work unless the date has to be seen when the document is being edited by someone, which depends on the purpose of the field.

It depends on the field and how Lotus Script is expecting the Item.

If it is an editable field and doesn't have anything in it yet, then it  "IS Nothing", versus an Invalid blank value "".

That might be better in some instances than setting a Valid date time such as 01/01/0100. Lotus Script CDat (0) = 01/01/0100.

I'll have to go field by field.

Apparently X-pages doesn't like Text in Date Fields of its datasource documents. I can understand that.

It puzzles me a bit that in order to create a New NotesDateTime CLASS in Lotus Script you give it a "", a text value, but when you save a "" to a date/Time FIELD it is an Invalid Text data type.

 


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