getValue (DataService - JavaScript™)
Read-only. Can be used as an alternative to return the
same values as getName()
, getLabel()
,
and getPlan()
. The method looks directly at the values
in the VCAP_SERVICES
environment variable.
Defined in
Syntax
getValue(String) : String
Usage
You can use this method to write to the DataService object in the following ways:
- getValue("name") returns the same as getName()
- getValue("label") returns the same as getLabel()
- getValue("plan") returns the same as getPlan()
This method looks directly at the related values in the
VCAP_SERVICES
environment
variable which look like the following:{
"XPagesData": [
{
"name": "myXPagesDB-XPagesData",
"label": "XPagesData",
"plan": "xpages-data-free",
"credentials": {
"apppath": "bluemix/xxxxxx/data1.nsf",
"username": "xxxxxx",
"host": "169.53.5.242",
"rootDir": "bluemix/xxxxxx/dev/",
"servername": "CN=server_name/O=Bluemix",
"password": "xxxxxx",
"url":"http://xxxxxx:xxxxxx@9.39.221.87/reg/BmUsrMgr.nsf/bmUserDashboard.xsp
?documentId=123456&action=openDocument"
}
}
]
}
Language cross-reference
getValue method in Java™ DataService class.