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 25, 2017, 3:51 PM
9 Posts
topic has been resolvedResolved

Weird behavior

  • Category: Server Side JavaScript
  • Platform: Other
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 1

Hello everyone,

I'm having this weird behavior and I'm not sure if it's me not misunderstanding variables or it's an xpage bug.

I have a document with a field called "hours" and it has a value of 8.

Here is my simplified code . 

var xHrs = doc.getItemValueDouble('hours');
println (xHrs);  // at this point, hours is 8
doc.replaceItemValue('hours', 0);
return xHrs;  // returns 0;

 

Why is xHrs back to 0 when I replace the document value to 0?  How do I break the link?

 

Thanks in advance for the help :)

R.

Oct 25, 2017, 6:09 PM
9 Posts
Fixed.

Somewhere lost in the code, the function was being called twice.


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