I am using views 3 in D7 and have added custom field of percentage on students result listing. I want to sort on the percentage field, how can I add sort on custom field?
Thanks for your help.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
I would go with using views php, they have a sorting option on there.
Your custom field is added after the query is performed by views, and a the sort is done as part of the query, therefore your sort doesn't know about your custom field.
I'd probably try to store the percentage in a field on the content type and then you'll be able to sort using the normal views sort handlers.