HTTP filtered based value set not retrieving the values in the combo box
Hello Team,
I am new to RTC attribute customization. I was trying the HTTP filtered based value set on one basic example :
I am new to RTC attribute customization. I was trying the HTTP filtered based value set on one basic example :
dojo.provide("org.example.workitems.providers.CDCatalogValueSet"); dojo.require("com.ibm.team.workitem.api.common.connectors.HttpConnectorParameters");
(function() {
var HttpConnectorParameters= com.ibm.team.workitem.api.common.connectors.HttpConnectorParameters;
dojo.declare("org.example.workitems.providers.CDCatalogValueSet", null, {
getFilteredValueSet: function(attributeId, workItem, context, filter) {
var params= new com.ibm.team.workitem.api.common.connectors.HttpConnectorParameters();
params.url= "http://www.w3schools.com/xml/cd_catalog.xml";
params.xpath= "//CD";
params.columnXpaths= ["./ARTIST"];
params.columnIds= ["ARTIST"];
var connector= context.getDataConnector("HttpConnector");
var values= connector.get(params);
var result= [];
while(values.hasNext()){
var entry= values.next();
var title= entry.getById("ARTIST");
if (title.indexOf(filter) > -1) {
result.push(title);
}
}
return result;
}
});
})();
I have also created the attribute with Medium HTML datatype. but when I see in the UI, I see the empty dropdown with no values, it displays "retrieving". however there are values in http://www.w3schools.com/xml/cd_catalog.xml.
Could you please assist me on this.
Comments
Shwetha G
Sep 04 '17, 3:02 p.m.Sorry to Correct : am using "Script based value set" instead of "HTTP filtered based value set"