IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

GetEntryProperty Method

Get an OData entry property.

Syntax

odata.getEntryProperty(XPath, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method is intended for extending functionality of the OData class and will retrieve the value of the entry property specified by XPath. XPath is the XPath of the element or attribute according to the following convention: entry[x]/element@attribute. The @attribute part is optional. When EntryIndex is set to an index greater than or equal to zero, a relative path can also be used: property or property@attribute. When a relative path is specified, the value of the specified XPath will be returned for the entry identified by EntryIndex.

entry[x] is the feed's xth entry (or any other root level child), where the indexer x starts at 1.

property is any child of the properties element, and attribute can be any attribute of that field. If an attribute is not supplied, the GetEntryProperty method will return the text portion of property. For example:


	ODataControl.GetEntryProperty("entry[5]/content/properties/ID")
	ODataControl.GetEntryProperty("entry[5]/content/properties/ID@type")

Here is an example using a relative path to retrieve properties of the first feed entry:

	ODataControl.EntryIndex = 1
	ODataControl.GetEntryProperty("ID")
	ODataControl.GetEntryProperty("ID@type")
	ODataControl.GetEntryProperty("Address/State")

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0