Results 1 to 5 of 5

Thread: HOW TO sort by "number" in listview ?

  1. #1
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default HOW TO sort by "number" in listview ?

    Hi,

    I've made an custom module called "Acc_Accounts".
    I also created the field "number". Now i've created some new data within.
    When i go to the listview of my module, i want to let it sort by "number" (ascending) and not by standard "name" (ascending)

    See screenshot

    Where can i change or modify this?

    Do i have to create the file listviewdefs.php and copy this in
    custom\modules\Acc_Accounts\metadata ?

    What code do i have to add or modify?

    Thankssss
    Attached Images Attached Images  
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: HOW TO sort by "number" in listview ?

    hi
    customize you query like this

    Code:
    select number from (table) order by (number+0);

  3. #3
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: HOW TO sort by "number" in listview ?

    thanks, but I would like to change this in my php code..

    any ideas?

    I very appreciate
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  4. #4
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: HOW TO sort by "number" in listview ?

    I already find out the answer.

    See earlier post;

    http://www.sugarcrm.com/forums/showt...change+sort+by

    It works great
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  5. #5
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: HOW TO sort by "number" in listview ?

    Hi
    ok just customize the number field like your mention url this will work. try this.
    otherwise customize your list query form include/ listview/ListViewData.php.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sort "Assigned to" on Accounts/Advanced Search page
    By umayxa3 in forum Developer Help
    Replies: 0
    Last Post: 2009-02-06, 08:37 PM
  2. "View Summary" sort order
    By monkey in forum Help
    Replies: 12
    Last Post: 2007-07-24, 11:47 AM
  3. Task "View Summary" sort order
    By 3tpcad in forum Help
    Replies: 0
    Last Post: 2006-08-03, 08:03 PM
  4. Replies: 1
    Last Post: 2005-09-08, 10:51 PM
  5. Replies: 1
    Last Post: 2005-03-03, 05:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •