CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • default sort on profile page
Pages: [1]

Author Topic: default sort on profile page  (Read 592 times)

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
default sort on profile page
September 09, 2011, 02:34:21 pm
Perhaps this is easy- is there anyway on a profile listing page  like /civicrm/profile?gid=22&reset=1 to set a default sort in the url, or other ways? For example, the linking Profiles documentation describes how one can include variables in the URL to filter the results when the url is first accessed by adding query parameters like ".....&custom_2=Democrat&state_province-Primary=1004" - but is it possible to do the same with a "default_sort=custom_field-ascending" or something similar.


jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Yes, it is possible to: default sort on profile page
September 09, 2011, 02:53:49 pm
No sooner asked, than, I answered it myself.

Yes, it is possible- append this to your url: &crmSID=2_u

the "2_u" refers to how it sorts- in this case, the results will be sorted by values in the second column, going upwards. By comparison, something like "crmSID=5_u" would list the results by column 5, going upwards.

So if you use these, don't return later to mess around with the order of the columns in your profile, or it will break your intended default sort order.

Hopefully this will help someone.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • default sort on profile page

This forum was archived on 2017-11-26.