Okay. The problem is that you are using an INT_CHOICE_CONSTRAINT when your data has name-based IDs. If you look at your screenshot, all of your numeric values (the actual value of the parameter) are being set to "0" because "Sothern Ham", "North", "East", and "West" are not numbers...
2 ways around this:
Switch your parameter from an INT16 to a STRING and switch from INT_CHOICE to STRING_STRING_CHOICE for your constraint.
var xmlDocument = ogscript.parseXML('teamdata.xml'); //Parse the XML
var nodeList = xmlDocument.getElementsByTagName("team"); //Get the tags we want to include in the constraint
var constraintData = []; //Placeholder for the new constraint data
if (constraintData.length == 0) //Placeholder if we don't have anything (OPTIONAL)
{
constraintData.push({"key": " ", "value": "Nothing"});
}
for (var i = 0; i < nodeList.getLength(); i++) //Loop through each tag we found
{
var node = nodeList.item(i); //Get the node
constraintData.push({"key": node.getAttribute("AID"), "value": node.getAttribute("AID")}); //Push the key/value pair
}
var constraint = params.createStringStringChoiceConstraint(constraintData); //Create the constraint
params.replaceConstraint("a.tickerlogo", constraint); //Replace the constraint
OR
Only put the names in the array and let DashBoard auto-generate the numbers (not as good if your list ever changes/reorders)
var xmlDocument = ogscript.parseXML('teamdata.xml'); //Parse the XML
var nodeList = xmlDocument.getElementsByTagName("team"); //Get the tags we want to include in the constraint
var constraintData = []; //Placeholder for the new constraint data
if (constraintData.length == 0) //Placeholder if we don't have anything (OPTIONAL)
{
constraintData.push("Nothing");
}
for (var i = 0; i < nodeList.getLength(); i++) //Loop through each tag we found
{
var node = nodeList.item(i); //Get the node
constraintData.push(node.getAttribute("AID")); //Push the key/value pair
}
var constraint = params.createIntChoiceConstraint(constraintData); //Create the constraint
params.replaceConstraint("a.tickerlogo", constraint); //Replace the constraint#DashBoard