In addition,
I have tried IS_IN_DB(...), however the db([query]) will require a variable 
which can be loaded by the ajax call (which I have bolded it, in the code 
below). But I don't know how I can make the two meet (set IS_IN_DB and pass 
a variable to it on-the-fly).

My query is simple:
query = 
db.contacts.customer_id==*request.post_vars.id*<http://request.post_vars.id/>

<http://request.post_vars.id/>

On Wednesday, August 29, 2012 12:50:37 AM UTC+8, Richard wrote:
>
> make_a_set = (query)
>
> Than use IS_IN_DB(db(make_a_set),...)
>
> Richard
>
> On Tue, Aug 28, 2012 at 12:28 PM, lyn2py <lyn...@gmail.com 
> <javascript:>>wrote:
>
>> Hello experts,
>>
>> Generally, when we do a SQLFORM, the 'reference table' fields 
>> automatically gets *all* the available options for choosing as a dropdown 
>> menu.
>>
>> However, I would like to get a filtered list instead of *all* of the 
>> items. Is there an available function I can use to achieve a filtered list 
>> for choosing in the dropdown menu?
>>
>> Another way to look at this is:
>> I would like to generate a SELECT/OPTIONS html using a specific query, 
>> i.e. it uses the retrieved Rows to generate the HTML. I wonder if there is 
>> a function in web2py for doing this.
>>
>> I hope my question is understood. Thank you.
>>
>>
>> PS. If there isn't an available function, I appreciate any tips or 
>> pointers how I can make this work. Thanks!
>>
>> -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to