Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have a list box with "Month(DateField)" value. I would like to sort my months in a cronological order (Jan - Dec).
How can i do this?
Hi Tumelo,
as you are using an expression in your listbox rather than a field, you'll need to use an expression to sort (as samapthbotla has said).
I would recommend actually creating a month field in your script, based on your existing code, so just
Month(DateField) AS Month
You can then just use the field in the listbox and as Jonathan has says, at that point you'll be able to use the standard number sorting option.
This way you are pushing the overhead back into the script, rather than in the UI.
Hope that helps
Joe
Hi
Month() returns a dual value, so you should sort on numerical value to get a chronological order.
HTH
Jonathan
Hi,
In object properties sort tab select the dimension and in expression write below
=num(month(datefield))
Regards
Hi Tumelo,
as you are using an expression in your listbox rather than a field, you'll need to use an expression to sort (as samapthbotla has said).
I would recommend actually creating a month field in your script, based on your existing code, so just
Month(DateField) AS Month
You can then just use the field in the listbox and as Jonathan has says, at that point you'll be able to use the standard number sorting option.
This way you are pushing the overhead back into the script, rather than in the UI.
Hope that helps
Joe
Hi Guys
Thanks for all your replies. The month is ordered accordingly. But when concaternate another clculation to the field the months loses the ordering.
is there any way to keep the ordering after using &''& to add another calculation?