- Code: Select all
function UTIL_choiceListToArray(valueList, arrayName, arrayType) {
if(valueList && arrayName) {
var querytext = "";
if((arrayType) && (arrayType == 'name')) {
querytext = "SELECT choice_list.chc_item_name FROM choice_list WHERE ";
} else { // default to obtaining the code value --
querytext = "SELECT choice_list.chc_item_code FROM choice_list WHERE ";
}
querytext += "choice_list.valuelist_name = \'" + valueList + "\'";
var ds = databaseManager.getDataSetByQuery('SELPA_Mgr_SQL', querytext, null, 1000);
ds.sort(1,true);
arrayName = ds.getColumnAsArray(1);
}
}
Right now the dataset is populated, but the array is empty. I've tried passing both an array object and a string (name) as arrayName.
Thank you,
Don