Page 1 of 1

Create valuelists based on sorted search results?

PostPosted: Fri Aug 27, 2010 9:11 am
by transcan
Can one create valuelists based on sorted search results? If so, how do you enter the search term before the sorted valuelist is created?

The reasoning behind this is when using valuelists created by "Dynamic Valuelists based on the results of SQL queries," which is superb, the drop down list is a 1000+ when employees or locations ranges into the thousands. By narrowing that down, the drop downs become more manageable less intimidating to some users.

Thanks in advance.

Re: Create valuelists based on sorted search results?

PostPosted: Wed Sep 01, 2010 11:15 am
by shannah
Do you mean, you just want the valuelist to be sorted in some order? You can use the order by clause in the __sql__ query for the valuelist.

e.g.
Code: Select all
__sql__ = "select person_id, concat(first_name,' ',last_name) as fullname from people order by last_name"