Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Help with table sort

Avatar

Level 3

http://bingham.butterworths.co.uk/PDF/numbered_list.pdf

Can anyone help me with getting my table to sort properly on the date field, sorting by date. I have used a solution from this (or another) forum, but it does not seem to sort, but simply create a reverse order. I need a proper sort - anyone?

6 Replies

Avatar

Level 10

Hi,

You need to change the lines in the click event of the HeaderRow.date

from

dateArray.reverse();

detailArray.reverse();

to

dateArray.sort();

detailArray.sort();

Bruce

Avatar

Level 1

Hi Bruce,

Your suggestion for the "sort" instead of "reverse" worked perfectly on very similar code I had found somewhere else. Quick question though, is there a way to bind the row data so that it all stays together when sorting a column? (ie. all data in row 1 stays together even though Column A is being chosen as the sort criteria).  In the code that I found it will only sort the column that is being clicked, so all the other column data remains stationary and not sorted.

Here is a link to the discussion/code/pdf I am discussing (it isn't mine, but it has been the only pdf out there that contains the closest functionality for what I would like to do...I am new to the whole world of PDF Forms).

http://forums.adobe.com/message/3000436


Thanks,

Mark

Avatar

Level 10

Hi Mark,

The example from John Brinkman's blog that Niall suggested seemed to do exactly what I understand you want to acheive.

Maybe if you have any questions you can ask John himself.

The link again is http://blogs.adobe.com/formfeed/2009/05/sort_subforms.html.

Good Luck

Bruce

Avatar

Level 3

Hi all - in the end I also used John Brinkman's scripting - it works brilliantly for text, dates or numerials.

Avatar

Level 1

Good Morning Bruce,

Wow, great reminder for me to be a bit more diligent in my research before seeking guidance. I had only been looking at the Code/Pdf put together by Steve and not the one by John. You are absolutely correct, the one by John does do what I want. So I will disect it intensely so that I may understand it and customize it to fit my needs.

Thanks again Bruce, and thanks for not pointing out my obvious stupidity! =)

Cheers,


Mark