NetTalk Central

Author Topic: Order on DROP boxes issue  (Read 4144 times)

Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Order on DROP boxes issue
« on: February 12, 2009, 01:20:13 PM »
I set the order on my drop list to be "-ShCom:CompanyActive,+ShCom:CompanyName", and the generated line was
filter:id_company_maxtel_OptionView{prop:order} = 'UPPER(-ShCom:CompanyActive,+ShCom:CompanyName)'

I was able to override in the following embed point to:
filter:id_company_maxtel_OptionView{prop:order} = '-ShCom:CompanyActive,+ShCom:CompanyName'

But the templates incorrectly wrap UPPER() around all fields.

Regards,
Alan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Order on DROP boxes issue
« Reply #1 on: February 16, 2009, 12:23:46 AM »
Hi Alan,

your solution for now is the correct one.

The problem is the "case sensitivity" of keys. _Usually_ in a drop down, where the list is alphabetical, then you want a case in-sensitive sort. So this is what the template does.
Clearly there are cases where a case-sensitive sort is in order, but they are fewer.

The template could be expanded to handle both, but most people get the option wrong, if it is offered to them. Also it's another option on an already fairly complex template.

So for now I think we'll stick with the current behavior, and override it in the embed point if you know what you're doing.

Cheers
Bruce


Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Order on DROP boxes issue
« Reply #2 on: February 16, 2009, 11:40:27 AM »
Perhaps add a #DISPLAY at that point which notes that a case-insensitive sort is done of the full ORDER statement.

It's easy to override in source WHEN I remember what the problem is.
A small note in the template reminding what is happening will help.

Alan