Defects

GetFieldValue does not return consistent results for Date/Time fields of type "Time of day"



ID:    D27859
Published:    23 September 2022
 

Defect Id

DEF347212

Originally Reported Against

SBM 11.4.2

Status

Submitted

Description

When using javascript to the the value of a Time of Day field, GetFieldValue returns inconsistent results. For example, when using code such as this:

var firstvalue = new Date(GetFieldValue("MY_DATE_FIELD"));
alert ("arrive as Date " + firstvalue);

The new Date object will sometimes return with today's date and the time set as the value from MY_DATE_FIELD. Other times, it will return with no date (resulting in December 31, 1969) and the time set as the value from MY_DATE_FIELD but offset by GMT time. Because the results are not consistent, you cannot use the value after it is read.

NOTE: This is most likely to happen when the javascript reads more than one "Time of Day" field. It will usually work consistently as long as only one field is read.
 

Find Answers

Type a question or describe what you are looking for below

My Recent Searches

Welcome kb sso

Additional Assistance

  • Submit a Case Online
  • FAQs