evcom Posted June 17, 2020 Posted June 17, 2020 (edited) I'm developing a pages database similar to the "Recipe" example described in the "Help Guides". This database contains a number of custom fields, some of them contain "number" fields. Now the idea is to be able to sort the records according to the number in the field, ascending or descending. I've activated a default sorting for the relevant field in Databases > Edit database > Option > Field Options When loading the database, the sorting works as expected. Problem: When sorting the records according another custom (number) field, the sort order is not correct anymore. Using a default field to sort records works with all fields, however when using custom fields it will show two activated fields in the "sort by" menu (see picture, not sure if this is normal). Sorting according fields like 'title', 'create date', 'last updated' works as expected. It seems though, that sorting according custom (number) fields does not work properly when using the "sort by" functionality. Does anyone have more info on this or can reproduce this on another pages database? Picture: Look of "sort by" when database called with default sorting active Edited June 17, 2020 by evcom
opentype Posted June 17, 2020 Posted June 17, 2020 Yeah, we had a recent discussion about that. Couldn’t find it now. It does sort it, but not numerically. It will sort 1, 11, 2, 23, 3 and so on instead of 1, 2, 3, 11, 23. I hope it is fixed for 4.5. Meddysong and evcom 1 1
evcom Posted June 17, 2020 Author Posted June 17, 2020 Thanks @opentype I can reproduce the behavior as you explained it on my site. Would be nice if someone can confirm if this has been fixed in 4.5. I was unable to find any fix about it it the Release Notes. Â
opentype Posted June 17, 2020 Posted June 17, 2020 Someone can try it under 4.5 and then sneak it in the bug tracker. 😉 Â
evcom Posted June 17, 2020 Author Posted June 17, 2020 I might give it a try on my staging site. Hope to be able to do it in the coming days. Although, I did not plan to mess with any Beta version. But if I can contribute to get a an error fixed, then it's probably worth the effort.Â
evcom Posted June 22, 2020 Author Posted June 22, 2020 Upgraded staging site to 4.5 and YES, the sorting now works. However, numerical fields will be sorted as DESCending. This is not always wanted and the sorting direction doesn't allow ASCending lists. Using the default sorting option, ASCending lists are possible though.Â
Recommended Posts