TL; DR: why are group offers disabled in the search when the field using the search is not empty?
I want to do a custom search on a field in a form. The CTable
table looks like this:
Val Spec
The search applies only to the Val
column, which is determined using the EDT with a basic relation on it: Val == CTable.Val
The search obviously gives me a list like this:
A A A B C
Let the group to get rid of all duplicated As, I thought! Sort of:
QueryBuildDataSource.orderMode(OrderMode::GroupBy); QueryBuildDataSource.addGroupByField(fieldNum(CTable, Val));
Now we get the strange behavior that I have, and the actual point of my question. In an empty field, the command runs correctly, and I get the following:
A B C
Now select “A” in the search, and then search again because I wanted to press “B” instead. Now the group is disconnected for unknown reasons, and I get the same search results as before.
Why is that? How can I overcome this?
source share