Question
Given a field with non-unique values, such as surnames. A pre-filter with a select option provides a list of all values. For example, if there are 20 Ivanovs in the table, it shows all of them. When selected, it filters for a specific Ivanov. How can it be set up to display only one Ivanov while still allowing the pre-filter to function?
Answer
It seems that the Select in the prefilter is made by the id field and linked to id:
Select code in the prefilter field:
=: selectRowListForSelect(table: $#ntn; field: 'name')
It is necessary to change its base field to name and link it to name:
=: selectRowListForSelect(table: $#ntn; bfield: 'name'; field: 'name')
But the best way would be to make the Select in the prefilter field by the table with names and link it to the name field, which should also be made a Select by the table with names:
Select code in the prefilter field and similar in the name field in the row part:
=: selectRowListForSelect(table: 'names_table'; field: 'name')