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



May 30, 2013, 8:52 AM
12 Posts

Vector Problem

  • Category: Server Side JavaScript
  • Platform: Not Applicable
  • Release: 9.0
  • Role: Developer
  • Tags: vector toString toArray reverse
  • Replies: 2
Hi Everyone,

i had a litte vector conversion problem. 

In my application i create a two dimensional vector


Vector Example:
[0][0][Tue Jun 25 09:00:00 CEST 2013]
    [1][Tue Jun 25 14:00:00 CEST 2013]
[1][0][Wed Jun 26 09:00:00 CEST 2013]
    [1][Wed Jun 26 14:00:00 CEST 2013]
[2][0][Thu Jun 27 09:00:00 CEST 2013]
    [1][Thu Jun 27 14:00:00 CEST 2013]
[3][0]
    [1]
[4][0]
    [1]
[5][0]
    [1]

and i save it to a notes document with document1.replaceitemvalue("xyz",vector.toString())

 
If i get back the value from the document i get a string and fail to convert the string back to a vector... 
 

String Example: 
[[Tue Jun 25 09:00:00 CEST 2013, Tue Jun 25 14:00:00 CEST 2013], [Wed Jun 26 09:00:00 CEST 2013, Wed Jun 26 14:00:00 CEST 2013], [Thu Jun 27 09:00:00 CEST 2013,Thu Jun 27 14:00:00 CEST 2013 ], [, ], [, ], [, ]]

cound anyone help me ? 


greetings 
Jun 3, 2013, 3:36 PM
586 Posts
Re: Vector Problem
 I've never heard of converting a 2D vector to string and back again.  They way to store something complex like that to a document and retrieve it is via a mimeBean.  I'd look into that.  I think Jesse has a project on OpenNTF to get you started.
Jun 10, 2013, 7:53 PM
170 Posts
You could probably

Store the data as Json and convert it back to a vector later.


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