Hello,
I am creating a script that will allow the task_types to appear according to the chosen task_category.
If I choose multiple task_categories, then in the task_type lookup it should appear all the values that are beloging to the task categories that I have chosen.
This is running on the filters of the Task List screen.
I created this script that already allows me to do that, but there is a bug, if I choose multiple task_types, the task_type label only fills me with one.
var taskCategory = getControlValue('task','task_category');
var activeCriteria={};
activeCriteria['locked'] = 'Y';
activeCriteria['itemName'] = '';
activeCriteria['functionItemName'] = 'global_code_table.active';
activeCriteria['value'] = 'Y';
var codeNameCriteria = {};
codeNameCriteria['locked']='Y';
codeNameCriteria['itemName'] = '';
codeNameCriteria['functionItemName'] = 'global_code_table.code_name';
codeNameCriteria['value'] = 'task_type';
var codeValueCriteria={};
codeValueCriteria['locked']='N';
codeValueCriteria['itemName'] = '';
codeValueCriteria['functionItemName'] = 'global_code_table.code_value';
codeValueCriteria['value'] = ;
var oriSystemCriteria={};
oriSystemCriteria['locked'] = 'Y';
oriSystemCriteria['itemName'] = '';
oriSystemCriteria['functionItemName'] = 'global_code_table.user_def3';
oriSystemCriteria['value'] = taskCategory;
var navItems={};
navItems.searchCriteria={};
navItems.searchCriteria['global_code_table.code_value']= codeValueCriteria;
navItems.searchCriteria['global_code_table.code_name']= codeNameCriteria;
navItems.searchCriteria['global_code_table.active']= activeCriteria;
navItems.searchCriteria['global_code_table.user_def3']= taskCategory;
var selectComp=openPopup('TASK_CATEGORY_LOOKUP',navItems);
if (selectComp.selectedRow)
{
setControlValue('task','task_type',selectComp.selectedRow.data['global_code_table.code_value']);
}
For example : I open the task_type lookup and select 2 lines, and when I hit the search button, the task_type label only shows one value and it only searches for the value that is populated and not the two I chose.
Does anyone know a better way of doing this kind of filterting /dependency or how I can resolve this error ?