6 Replies Latest reply: Jan 29, 2013 6:06 AM by Peyman Azimabadi RSS

    List Box sorting based on Expression

    Peyman Azimabadi

      Hi everybody,

      i have a list box containing the Months. I need to sort this list box so that list begins with "Jul". I did this with a sort expression :


      = MOD( ( Calendar.Month + 5 ) , 12 ) + 1




      Works good! But as soon as i select one or more months, i get this result :



      I understand because of my selection, the "Calendar.Month" is NULL for all nonselected Months and therefor QV can not calculate the expression.

      But i need the result as is shown below:




      It's like the way QV shows the List Box when i select "Numeric Value" as Sort order:




      that means i want to keep the order from my Expression as i select some Months.

      I appreciate any idea.


      Best regards - Peyman