Maybe you could use IS_IN_SET... You just have to pass you query to it on
construct a dict from the query... Refer you to this post of Anthony :

https://groups.google.com/d/msg/web2py/QBTYaytNypU/DW2HpnT-xK0J

http://web2py.com/books/default/chapter/29/07/forms-and-validators#Validators
Scroll
a bit to IS_IN_SET

You may add a choice to your set for your Zero...

Richard


On Thu, Aug 15, 2013 at 3:18 PM, Annet <anneve...@googlemail.com> wrote:

> Thank you both for your replies.
>
>
> apart from that, IS_IN_DB totally works with zero (unless multiple=True,
>> in which a zero argument kinda defeats the purpose). Are you sure that
>> you're not adding other validators to that field ?
>>
>
>  This is the IS_IN_DB validator:
>
>
> db.register.navID.requires=IS_IN_DB(db(db.nav.id.belongs(WHOWEARENAVID,WHATWEDONAVID,HOWWEWORKNAVID,OPENINGHOURSNAVID,\
> EVENTLISTNAVID,TIMETABLENAVID,COURSETABLENAVID)),'nav.id','%(name)s',
> orderby='nav.id', multiple=(1, 5))
>
> which works as expected, accept that I cannot set zero='select 4 functions'
>
>
> Kind regards,
>
> Annet
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to