I want to sort my table view by 2 columns: first by foundset.task_to_call.main_group and then by foundset.task_to_call.sub_group.
How can I do this in the sortfunction?
/**
* Perform sort.
*
* @param {String} dataProviderID element data provider
* @param {Boolean} asc sort ascending [true] or descending [false]
* @param {JSEvent} event the event that triggered the action
*
* @properties={typeid:24,uuid:"CEC04198-198A-4D7A-8383-505C8D08141E"}
*/
function SORT(dataProviderID, asc, event) {
if (dataProviderID == 'task_to_call.main_group' || dataProviderID ==
'task_to_call.sub_group') {
controller.sort('task_to_call.main_group' + (asc ? ' asc' : ' desc') + '
task_to_call.sub_group' + (asc ? ' asc' : ' desc'), false)
}
else {
controller.sort(dataProviderID + (asc ? ' asc' : ' desc'), false)
}
}
foundset.sort(sortFunction)
Users browsing this forum: No registered users and 3 guests