Hi everyone,
I posted recently about trying to sort columns based on a calculation. I have since added a column to the table to store the calculation. Here is the code that I am using to sort the column:
// Sort ascending to descending
var test = application.getMethodTriggerElementName(); // create variable to test against using ==
if (test == “level_1”){
if (globals.gSort)
{
controller.sort(‘core_hierarchy_level_to_core_hierarchy_emp_cost.cName1 asc’);
globals.gSort = null
}
else
{
controller.sort(‘core_hierarchy_level_to_core_hierarchy_emp_cost.cName1 desc’);
globals.gSort = 1
}
}
When I click on “level_1” which is the column heading to sort based on the data in level 1 the entire table disappears. I have to then click Show All to refresh the table.
Here also is the calculation for cName1:
var emp1 = emp_cost_to_emp.first_name + " " + emp_cost_to_emp.last_name;
return emp1;
I also thought by storing the calc the data would be present in the column in which it was being stored. For some reason nothing appears in the column. Data however does display in the calc field.
Thank you again for all your help.
Matt