contao/test — Issue #1042: backend filter for field with foreign key missing values
Author: importer
Created: 2011-11-29 07:16:07+00:00
State: open
Labels: backend, Defect

When a filter is specified for a field in the backend DCA, and this field is an ID field (foreign key), so TL retrieves the values from the 'name' field form the related table, TL lists unique NAMES instead of unique ID's. This is a problem when multiple records in the related table have the same value for 'name', but have different ID's. Example

MAIN TABLE-
foreign_key_id:
1
2
3
4

LOOKUP TABLE
id name
1 AA
2 AA
3 BB
4 AA

RESULT
Filter for field 'foreign_key_id':
AA
BB

[Download the attachments](http://www.contao.org/tl_files/tickets/1042.zip "Download the attachments of this ticket")

--- _Originally created by michiel on September 29th, 2009, at 05:08pm (ID 1042)_