Display Order of Button Groups on Panel
Currently groups are ordered by the lowest extension in the group. The SQL to simulate it is:
select `group` from fop2buttons group by `group` order by min(exten);
Is it possible to sort the groups alphabetically (with the exception of having the first group be the logged-in user's group as it is now)?
Tx,
Ted
select `group` from fop2buttons group by `group` order by min(exten);
Is it possible to sort the groups alphabetically (with the exception of having the first group be the logged-in user's group as it is now)?
Tx,
Ted
Comments
The first select gets the users in the same group and as there is only one group, it only has to sort by exten. The second selection gets all the extensions not in the same group as the current FOP2 and sorts them by the group name then the exten.
Ted
Thanks for the clarification. The problem is that the fop2 client does not perform any sql queries at the moment you login, it generates a static config that is stored in memory. And at the moment of rendering the buttons, it just swaps positions IN the group with the 1st button. So you cannot change the group display based on the extension you are logged as unless I hack deep into the code...
Best regards,
Regards,
Ted
I really appreciate your post and help, and I also like this kind of SQL challenges.
Although your solution does not apply because of the way fop2 is coded, it was an insightful post and I thank you for that, it adds richness to the forums. Proposing solutions is always a good thing in a forum.
Now that I am back from vacations I will see if I can make the group sorting query and modification on the client to see if it is possible to change the group order on the display based on the logged extension.
Best regards,