server-side sort with php editor lib
server-side sort with php editor lib
Hello
Im confused about sorting server side with Editor and editor php library.
I set complex views which return JSON fields such as
{"ens": "CONTACT COMMUNICATION", "nom": "SARL CONTACT COMMUNICATION"}
or
[{"id": 3483, "date": "2020-10-07", "text": "*** some text*** ", "type": "tel + mail"}, {"id": 2962, "date": "2019-06-12", "text": "envoi offre 4%", "type": "mail"}, {"id": 1457, "date": "2016-07-26", "text": "*** some text ***", "type": "téléphone"}]
And of course I would like to sort by values such as "ens" or "date" rather than by whole field.
Is there a way to do that in
->order
part of the field initialisation ?
Thanks
Michel
This discussion has been closed.
Replies
Hi Michael,
Can you show me how you are using the Editor PHP libraries? They should do the ordering automatically if you are using server-side processing.
Allan
Hi Allan,
thanks for your time
I use in a fairly simple way
But when my data is complex like
the automatic sorting is irrelevant.
I should sort by something like
How should I configure the
->orderitem to implement this ?Thanks
Michel
Hi Michel,
Thanks for the explanation. I'm afraid there is no option for that in Editor at this time. The ordering is always a simple
ORDER BY {columnName} {asc|desc}.It would require a custom implementation of server-side processing if that is what you require I'm afraid.
Allan
thanks Allan I will do that.