Sorting Collection List by Option Field

I created a simple collection with a combination of text and option fields. The option fields allow me to define the client options ahead of time to ensure consistency and also to save them time when creating new collection records. When I try to define how the collection should be sorted I find no way to sort on option fields. All I see are options to sort on text fields.

I can understand why reference fields are excluded but why not support option fields? Am I missing something?


Here is my public share link: LINK
(how to access public share link)

1 Like

Hi @meinar and welcome to the community forum.

For us to help you we will need you to post a copy of your share link for review. You can find how to do that here: How to Enable a Webflow Share Link

Thank you for responding to my inquiry. I am not able to link my client’s site but I think the question is not project specific. All I need to know is if simple “Option” collection field types may be used to specify a collection list sort.

I am not sure what u mean by “option” collection fields. Do u mean reference and multi-reference fields?

If u do then YES u can filter by those fields now!

I am not having an issue with filtering. The issue is with sorting.
The “Option” type field in a collection is this one:

When I go to the collection sort order properties I can only select “Plain Text” fields:

I hope that helps. Thank you!

Ok ok, now i see what u are referring to! Unfortunately, the “Option” field does not have a filtering option. To be honest I’ve never seen someone use that for filtering. Not sure how you would be able to!

Have u checked out MixItUp?

I am just trying to use a collection’s option field for “sorting” (not for filtering). I am surprised this seems to be a no go in Webflow.

Thanks

2 Likes

Hi @meinar, yes, I have not come up with an answer to your question.

Maybe @Waldo, @vincent, @webdev, @jorn, @cyberdave, @Brando, would have a better answer for you?

At this time, I have never seen the “Option” field have a sorting capability.

Hi @meinar Thanks @QA_Brandon

Brandon is right you can’t use the option field for sorting. You could use the Numbers field instead, depending on your sorting needs, and sort by that.

Let me know if this was helpful or not.

1 Like

Option is more designed as a quick category feature, one that doesn’t require to create another collection for it. It’s easy to filter on it, but yes, it could be possible to order a list with this field (A-Z and Z-A I guess) but this feature isn’t available yet.

I kinda do it anyway on several projects of mine. Rather than sorting per se, I filter the options in a series of lists that I put one after another, or one in each tab of a tab component. It’s a design solution that fits my needs, but depending on the context, it’s possibly not a solution for you. Especially if you have a large number of options (you could hit the limit of 20 collections lists per page).

I am surprised this is not being requested by more people. Imagine a collection that consists of just a person’s full name and their home state name. When someone enters a record into this super simple collection they need to type the person’s name (text field) and select the state from a drop down that has all the state names (option field). When presenting the collection’s data it may be useful to sort by state i.e. a table sorted by the state column. If the Option field is not available for sorting that means we have to create a third field and assign numbers or letters to it to simulate a sort by states. This seems redundant and time consuming
 but it works.

Thank you for your help at @QA_Brandon and @QA_Brandon

9 Likes

@meinar I was looking also for the same solution, I created an option field with numbers from 1 to 20 so it’s easier for the clients to order and then I saw that it doesn’t appear aon sort ordner option, that’s really frustrating how Webflow misses these simple improvements :s they also don’t have the option of reordering items with drag and drop like pages :S.

I don’t understand why webflow launches something big like eCommerce when they miss simple improvements like these :S.

Any updates on this? Just created a drop-down field so we can easily sort a staff directory based on seniority, and it doesn’t look like it’s possible. I know I could filter and just add lists one after the other, but it doesn’t work for my layout and this seems like it should be a fairly basic fix for Webflow?

1 Like

REPLYING TO THIS because I am too looking for this function. My dropdown field corresponds to companies and I want to sort my collection list based on alphabetical companies. How is this not a feature yet?

1 Like

I have courses - some open and some closed. I’d love this feature to sort my open/closed courses to show the open courses first. No brainer.

1 Like

+1 on this. I have a collection of products, some available and some sold. I’d like the available ones to show up first, and the the ‘sold out’ ones to appear second.

UPDATE: A workaround is to use a Switch. You can sort by Switch first and then by whatever your regular sort text is (alphabetical, etc).

So for @Evan1, you could have a Switch called ‘Open’ and ‘Closed’ for your courses and sort by Open first. Works well for anything that has 2 options. Open/Closed, Available/Sold Out, etc.

I was also looking for this function because I have three different categories for my different program offerings and I want to sort those programs by option in alphabetical order.
Webflow, please implement this feature!

1 Like

@meinar , @gencdoda , @Mandy_Hopp , @farewellmedia , @jheidel
Although Webflow doesn’t yet offer in-designer Collection List sorting for Option fields or Ref fields, it’s easy to setup sorting with a small script.

I’ve done a tutorial here;

** 20-Jan-2023 - Video redone due to the massive A/V sync issue, and cloneable added

Thanks for making this tutorial but the audio is so out of sync with the video it’s almost impossible to follow what you’re doing.

I too have encountered this frustration. +1 for this feature.

Thanks a ton for letting me know Steven, I’ve just redone that one and added a cloneable. Loom is fantastic but I’ll need to watch A/V sync carefully, I tend to have a million browser tabs open at any given moment


1 Like