Sort more then one column?

Hello,

I have followed table:

col A, col B, col c, col Value

If I click to the header from a displayed table, the old sort disapplears. e.g. I click header col A, he sort ASC the value of col A, now if I click to the header of col B, the arrow from col A disappears and only the arrow from col B is displayed.

Now I must sort by
1. col A and
2. col B, and then
3. col C

It this possible?

Thanks!
Michael



You are using DaDaBIK version 9.4-Monterosso enterprise
PHP Version: 7.1.31
mysql version: 5.7.27
Web server: Apache
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0
 

eugenio

Administrator
Staff member
Hello,
no, at the moment sorting on multiple fields is not possible. Maybe you could create a VIEW specifying multiple fields in order by but then consider you can have the additional effect caused by the user clicking on a specific column.

Best,
 
Hello,

> Maybe you could create a VIEW specifying multiple fields in order by but then consider you can have the additional effect
> caused by the user clicking on a specific column.


Now I have create a view with ORDER BY my three fields.

CREATE VIEW test AS
SELECT *
FROM source
ORDER BY A, B, C

If I look with phpmyadmin the sorting order are correct.
But if I see the data from the view in DaDaBIK, he sort automatic by the first column.
Can I deactivate the automatic sort by the first view? And only sort by column, if the user click of a column-header?

Thanks!
Michael
 

eugenio

Administrator
Staff member
Hello,
DaDaBIK always tries, if no column is selected for sorting, to select the first available so I am sorry but I think that at the moment it's not possible to achieve what you want.

Best,
 
Hello,

> if no column is selected for sorting, to select the first available

I think, this behavior can deactivate to disable a few lines of code in the rigth php file.
Can you tell me, how I must disable (/* .... */) the lines of code to deactivate this behavior?

Thank you!
Michael
 

eugenio

Administrator
Staff member
Hello Michael,
I am sorry but at the moment it is not possible to change this behaviour just by editing a file.

Best,
 
Top