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 gkornbluth - May 22, 2020

Hi All,

I've set up a multi-record section with a text field called title and a check box field.

I've also set the sorting tab orderby to sort by the ‘title’ field.

I assumed that when I clicked the top of the check box field column in the record list (to sort the record list by the check box field), all of the records would first be sorted by the checkbox field and secondarily, alphabetically by the ‘title’ field.

This unfortunately doesn’t seem to be the case (at least in version 3.50).

The check box sort is fine, but the records come back sorted secondarily by their record number.

Don’t know what I’m doing wrong and would appreciate any insights on how to resolve this issue.

Thanks, and stay safe,

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 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 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