Dojo script to create dependent enumeration
Hi,
I'm trying to create dependent enumeration using dojo script (for one internal requirement). I have tried the fillowing dojo script (script based value set), but it didn't worked.
dojo.provide("featuregroup.dojo");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("featuregroup.dojo", null, {
getValueSet: function(attributeId, workItem, configuration) {
var domain= workItem.getValue("com.visteon.enum.domain");
var functionalblockoptions= [];
if ((domain === "com.visteon.domain.literal.l9")) {
functionalblockoptions.push("com.visteon.functional.block.literal.l3");
functionalblockoptions.push("com.visteon.functional.block.literal.l4");
functionalblockoptions.push("com.visteon.functional.block.literal.l5");
functionalblockoptions.push("com.visteon.functional.block.literal.l6");
functionalblockoptions.push("com.visteon.functional.block.literal.l7");
functionalblockoptions.push("com.visteon.functional.block.literal.l8");
functionalblockoptions.push("com.visteon.functional.block.literal.l9");
functionalblockoptions.push("com.visteon.functional.block.literal.l10");
}else if((domain === "com.visteon.domain.literal.l8")) {
functionalblockoptions.push("com.visteon.functional.block.literal.l11");
functionalblockoptions.push("com.visteon.functional.block.literal.l12");
functionalblockoptions.push("com.visteon.functional.block.literal.l13");
functionalblockoptions.push("com.visteon.functional.block.literal.l14");
functionalblockoptions.push("com.visteon.functional.block.literal.l15");
functionalblockoptions.push("com.visteon.functional.block.literal.l16");
}
functionalblockoptions.push("com.visteon.functional.block.literal.l1");
return functionalblockoptions;
}
});
})();
================================
Please let suggest if any other process we have to achive this requirment.
One answer
Hi Chandra,
Does the out of the box dependency not work for you?
Comments
Hi Matt,
Out of the box option is working. but we wanted to do the same funtionality using the dojo.
Because, we have a requirement where the dependent enumeration has more number of literals (now it is morethan 50) it will keep on increase.
Each time we open out of the box functionality, its taking toomuch of time to load the enumeration fields. assuming because of more number of enumerations available in the project area.
So we thought of using dojo script, which will be easy to configure and maintain the list (easy to add when additional literals needed).
Thanks in advance.