Data Type Conversions

Not all Oracle Data Relationship Management property definition data types have corresponding representations in JavaScript. For any that do not have a corresponding representation, the StringValue and Value will be identical and you must ensure that you understand how to parse the string value. If returning a value for a property of one of these data types, you are also responsible for ensuring you return a proper string representation of that data type. If the stored value does not have a valid conversion to the property’s data type, then the value will be undefined.

List properties will return an Array with each element of the array containing objects of the type appropriate to the data type. For example, a Date property marked List would return an Array containing Date objects.

Lookup properties may not always return the data type expected when the lookup target is invalid, the key is not found in the lookup table, or the value in the lookup table is not valid for the data type. For example, if the value for a key-value pair is "TEST," but the data type is Date, then the result will be Undefined.

Following are the Data Relationship Management data types with their corresponding representation in JavaScript.

Table 12-4 Data Type Comparison

Property Definition Data Type JavaScript Data Type

AscGroup

NodeObject Array

AscNode

NodeObject

AscNodes

NodeObject Array

Boolean

Boolean

Date

Date

DateTime

DateTime

Float

Number

FormatMemo

String

GlobalNode

NodeObject

Group

String Array

Hier

HierObject

Hierarchy Group

String (hierarchy group name)

Hyperlink

String (representing the URL)

Integer

Number

LeafNode

LocalNodeObject

LimbNode

LocalNodeObject

ListGroup

String Array

Memo

String

MultiNode

LocalNodeObject array

Node

LocalNodeObject

NodeProps

PropDefObject array

Query

String (query name)

Property

PropDefObject

Sort

Number

SortProp

PropDefObject

StdQuery

String (query name)

String

String

Time

String

Version

String (version name)

When calling another JavaScript derived property (or a derived property of a different node), because the value returned by that deriver is not converted to its string representation immediately, you can pass complex objects between derivers and delay coercion until the final result is returned by calling toString() on that complex object (except as noted for built-in conversions such as from Arrays).