Sorting by a checkbox column, and having the record titles within the results sorted in alphabetical order

7 posts by 2 authors in: Forums > CMS Builder
Last Post: May 26, 2020   (RSS)

By Damon - May 22, 2020

Hi Jerry

Sorting by the top column title sorts for that value but the secondary sort appears to be by the created date which is the default order without any sorting applied. I will add a feature request for having a secondary sort when sorting field headers to apply the Sorting tab value.

A solution you could use right now is to create an Advanced Search using the Checked field. Go to the Section Editor edit page under the Searching tab and add this:

_all_
Checked|checked|match

Change Checked to match the name of your checkbox field. Now can filter results on the checkbox field and keep the sort order.

Let me know if you have any questions and if this will work for you.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gkornbluth - May 22, 2020

Hi Damon, thanks for getting back so quickly.

I've changed the search field in the section editor to:

_all_
Checked|checked|match

and the sort is still 'title'

However when I sort by the clicking on check box column, all the yeses do come to the top of the list, as expected, but the titles are still sorted by creation date(record num) There's an image attached...

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Damon - May 25, 2020

Hi Jerry,

My idea is that the Title sort would be maintained when you search on checked Yes or No but the results would be limited to either your checked Yes or No choice.

This would not require you to click the top column to sort by that column but would instead limit the results to checked while maintaining the Title sort.

Does that make sense?

I have added the secondary sort as a feature request for CMS Builder.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gkornbluth - May 25, 2020 - edited: May 25, 2020

Hi Damon,

I don't quite understand what you mean.

It seems like you're saying that even with your suggested sort criteria implemented, if I want to click on the 'want that book' column header and not lose the ascending alphabetical title sort within the 'yes' or 'no' group when all the 'yes' or 'no' entries are at the top, that would take the secondary sort feature request to be implemented.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Damon - May 25, 2020

Hi Jerry,

Sorry that my explanation wasn't clear.

My suggestion involved limited the record results using the advanced search options in CMS Builder, not using the top column name to sort.

So for example, there are 100 records sorted by Title and there is a Featured checkbox. Using the advanced search, one could limit the results to either Featured (Yes) or Featured (No) and the records would still be sorted by Title.

Does that make sense?

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gkornbluth - May 26, 2020

Hi Damon,

It makes more sense now, thanks for the clarification.

I'm really looking for the 'want this_book' top column name to sort with while still keeping the grouped 'yes' or 'no' records in alphabetical order by 'title'.

I guess I'll have to wait for the feature request to be implemented.

Thanks for spending so much time on this.

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php