Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 :

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.

0 votes

Comments

Sorry to Correct : am using "Script based value set" instead of "HTTP filtered based value set"


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,117

Question asked: Dec 15 '16, 12:29 a.m.

Question was seen: 1,922 times

Last updated: Sep 04 '17, 3:02 p.m.

Confirmation Cancel Confirm