I answered my own question: Here is what was used for someone else that may run into this issue.
public function addRow():void {
var st:AttributeVO = AttributeVO(attCombo.selectedItem);
var country:String = countriesAvailable.selectedLabel;
if(selectAtt == null) {
Alert.show("select an attribute.");
return;
}
if(!isDuplicate(selectAtt, country)){
var newAtt:AttributeVO = selectAtt.clone() as AttributeVO;
newAtt.country = country;
var list:ArrayCollection = model.category.tAttributes;
newAtt.attributeValue = "";
list.addItem(newAtt);
templatePropertiesDG.invalidateList();
}
else{
Alert.show("Country exists.");
}
}
public function isDuplicate(selectAtt:TempAttributeVO, country:String ):Boolean {
var result:Boolean = false;
var attributes:ArrayCollection = model.category.tAttributes;
for(var i:int = 0; i < attributes.length; i++) {
if(attributes[i].attributeId == selectAtt.attributeId && attributes[i].country == country){
result = true;
break;
}
}
return result;
}