Sort select control/list by month

Hi to all you smart people out there,

i need help with organize items in select control.
im sorry but i dont have dummy table for this but it would look like this:
One table with column where are dates, from this column i extract to next column the name of the month with MonthName function. Everything is easy for now.
Then outside the table i add select control where i make unique list from the months column. Also easy but the list is not sorted or it can be sorted alphabetically but i cant sort the list by month (january, february, march…etc). I also did in that table next column with function Month, where i get the number of the month but i cant get it working with sort function.
Then i want to filter that table with this select control.
thanks for help
Tomas
P.S.: if needed i can do that dummy table

Dear @Tomas_Sebes

You are totally right that it would be great if it was possible out of the box.
Not sure if this functionality is on purpose not “out of the box” available or not, as “Coda is for Makers” :thinking:

Now to the point:

You will have to define the sort function conditions as True, by the column name

And you will get the accordingly result

image

Dear @BenLee

Maybe the engineers could update this as a standard setting when selecting an interactive filter :thinking:

Thanks @Jean_Pierre_Traets
this looks like a solution for now, but it is not possible to have months in their normal order in select control (not multiple select) and then filter the table with this control?
I added dummy table - is it editable? i can see only for “view only”

Hi @Tomas_Sebes,

I’m not sure this is the final desired outcome, but have a look at the new page in the document that I added.
In order to have the select box sorted by month, this is the formula explanation:

[Dates 2].Date.Sort(True).   // First, sort by actual date
   FormulaMap(MonthName(CurrentValue)). // then, for each date (CurrentValue), extract the month name
   Unique()    // Finally, remove the duplicates

At this point, you just filter by month name in the table.

Let me know if this is going in the right direction.
Cheers!

3 Likes

Dear @Tomas_Sebes

I have no explanation (for the moment how comes) as in your doc I didn’t manage to fix and in mine, it works. Hopeful some other users, or myself at later stage will come with an explanation.

Dear @Federico_Stefanato,

Impressive, looks like you learn me a new approach, that looks like fool proof.
I remain confused, why in my sample doc embedded it just works fine

1 Like

Thank you, thats working perfectly.

1 Like