It's all about the answers!

Ask a question

Scripted Value Provider to limit Category-typed attributes in RTC

June Boston (1942338) | asked Apr 10 '18, 6:50 p.m.

We need to configure a value set provider that limits the content of the Categories; we will use this on both our Filed Against attribute as well as several other Category-based attributes.  We're pulling the info from a REST call to RTC.  While I can configure an HTTP Value Set Provider to return a set of results, you cannot use an HTTP Value Set Provider with a Category-based attribute (it doesn't appear as an option in the dropdown on the config).  You also cannot use Dependent Enumerations with them.  I have written a script to try and do it as you can select a script-based value set for Filed Against and other Category attributes.  I do not know if this will actually work as I do not know what value to return; would it be the name, id, itemId, or some other value that should come back?


(function() { dojo.declare("com.zions.valuesetprovider.categoryfilteralpha", null, { getValueSet: function(attributeId, workItem, context){ console.log("Going to do the parameters now"); var params= new; params.url= "[projectArea/itemId=_TofgQPfREeOpj9QcDboLoA]/*"; params.xpath= "//workitem/category"; params.columnXpaths= ["./id"]; params.columnIds= ["id"]; params.ignoreInvalidCertificates=true; params.useOAuth=true;

        var connector= context.getDataConnector("HttpConnector");
        var values= connector.get(params);
        console.log("length of returned values: " + values.length);
        /* none of my console logs ever show up for this script */
        var result= [];
            var entry=;
            var getPushed= entry.getById("id");
        return result;


I have enabled debugging but the console isn't showing any feedback from my script, hard to tell if it's taking well.  I could easily change the params.columnXpaths to have this return any of the values in the XML result.
Link to see XML REST results in your own system:
https://<clm uri here>/ccm/rpt/repository/workitem?fields=workitem/category[projectArea/itemId=<project id here>]/*

2 answers

permanent link
Ralph Schoon (62.9k33645) | answered Apr 11 '18, 2:09 a.m.


the JavaScript API is fairly limited. If you look into you will realize that support for attribute types is pretty much limited to simple types like strings and single value enumerations.

I tried to summarize what I found here

If the HTTP filtered value set does not work the only  available option is Java. See for examples.

Debugging, you can try logging in the script if you can not debug it, see last lab for hints around debugging and logging.

permanent link
Donald Nong (14.5k414) | answered Apr 11 '18, 3:30 a.m.

The said value set provider is executed on the server side, therefore the logging is in the ccm.log file, but not the browser console.

Your answer

Register or to post your answer.