Is it possible to use an enum field with a function defined as the data provider as a trigger for another fields visibility grid?

I have one enum field where there is no options parameter, instead, I am using a defined function.

$dictionary['Case']['fields']['pr_department']['name']='pr_department';
$dictionary['Case']['fields']['pr_department']['vname']='LBL_PR_DEPARTMENT';
$dictionary['Case']['fields']['pr_department']['type']='enum';
$dictionary['Case']['fields']['pr_department']['function']='getUserDepartments';

I have a second field that has a visibility grid defined using the first field as the trigger.

$dictionary['Case']['fields']['pr_team']['name']='pr_team';
$dictionary['Case']['fields']['pr_team']['type']='enum';
$dictionary['Case']['fields']['pr_team']['options']='pr_team_list';
$dictionary['Case']['fields']['pr_team']['visibility_grid'] = array (
'trigger' => 'pr_department',
'values' => ...

If I use the options parameter on the first field instead of a function the visibility grid works fine. However, when I set the data provider to a function the visibility grid no longer applies.
Am I doing something wrong, or is there a way around this?

Note: I am trying to avoid using JS so it will also work on sugar mobile.

Parents Reply Children