aamir_faried
19th November 2011, 12:35
Hello guys,

I have a problem with a session and need your help to solve it.


I have a session that is 'Sort by' Date (index), I want to sort it by date but in descending (desc) order.

Could any body please tell me how to SORT session by date (index) in desc order.

Thanks in advance.
/Aamir

ulrich.fuchs
19th November 2011, 18:39
either you have source code. Then you can modify the session script, using the (undocumented) query.extend.order function.

Or you help your users defining a filter on the session, in the "specifcs" for that filter go to "sort order" and there you can also sort descendendly.

best regards
Uli

aamir_faried
20th November 2011, 17:31
Hi Ulrich,
Thanks for your reply.

I have tried function query.extend.order it works but it result in very strange behavior of session for example when you select any record it changes it value randomly. that is very strange...

Is there any other way to sort session by date descendingly when you open a session.??
any more suggestion?????

/Aamir

günther
21st November 2011, 16:41
Hi,

just a concept, but it might work:
1. extend your table by one field (e.g. long sort)
2. create an index that uses this field instead of the original date field
3.a) fill that field by *every* insert (might cause lots of changes) -or-
3.b) fill that field at session start (might take some time)
4. sort should be -1 * the value of your date field

Hope you get the idea. I've done such a work around for some other things, but never for a date.

Günther

rahul.kolhe22
22nd November 2011, 07:23
Hi,

May be you can go thru this thread (http://www.baanboard.com/baanboard/showthread.php?t=7569) and give it a try.

Regards,
--Rahul