Create valuelists based on sorted search results?

A place for users and developers of the Xataface to discuss and receive support.

Create valuelists based on sorted search results?

Postby transcan » Fri Aug 27, 2010 9:11 am

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.
transcan
 
Posts: 13
Joined: Wed Jul 21, 2010 11:57 am

Re: Create valuelists based on sorted search results?

Postby shannah » Wed Sep 01, 2010 11:15 am

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"
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved