Forum Academy Marketplace Showcase Pricing Features

Sort by option set attribute

Hi guys, I’m trying to sort my clients in a repeating group, based on status and date.
The date is type date, and status is an option set which has an attribute “sort index”. I don’t see status in the “sort by” dropdown of the constraint. Is there a way to sort by it?

Hi there, @silverishclover… unfortunately, the short answer is no (which is one of the biggest limitations of option sets, in my opinion). I’m sure there are workarounds (one or more of which can be found in the forum, I believe), but they’re not going to be pretty.

Just food for thought… have you considered allowing users to filter the repeating group by status as opposed to doing a sort? If a user is sorting by status, they obviously want to see all of the things that have a particular status, and in that case, one might argue that a filter is just as good (if not better) than a sort. Again, just food for thought.

Best…
Mike

thanks for the quick answer Mike. I do use a filter as well but I want to have a default view for the employee where clients with status “done” appear at the end of the list.
This problem arises in other places as well, i.e., when I want to hide elements of a certain type (option set selection).
I might resort to using text to identify the status instead of an option set, but as you say, messy.

2 Likes

Hi - not sure if you’re still having this issue but I ran into the same problem so I created a text field to house the display property of the option set and then sorted on that text field.
To make sure that the text field remained consistent with the option set I added a database trigger to update the text field every time the status was updated. Hope this makes sense.