In tt_address I only want to show sys_categories that have a certain parent category. In my tt_address tca override I tried to prepend to the existing where clause.
$GLOBALS['TCA']['tt_address']['columns']['categories']['config']['foreign_table_where'] = ' AND sys_category.parent IN (14,15,16,67,68) '. $GLOBALS['TCA']['tt_address']['columns']['categories']['config']['foreign_table_where'];
as well as
$GLOBALS['TCA']['tt_address']['columns']['categories']['config']['foreign_table_where'] = ' AND sys_category.parent > 13 '. $GLOBALS['TCA']['tt_address']['columns']['categories']['config']['foreign_table_where'];
Both show up correctly in the TCA in the backend configuration view but they both lead to an empty category field in the tt_address entries. I get no errors so I am at a loss why this might be. Any ideas or maybe better approaches are greatly appreciated.