assuming 1.74.6

db.challenge.person.requires=IS_IN_DB(db
(db.person.created_by==auth.user_id),db.person.id,'%(name)s')

On Jan 22, 10:56 pm, johntynan <jgty...@gmail.com> wrote:
> I have a class called create_challenge here:
>
> http://code.google.com/p/pledgedrivetracker/source/browse/pledgedrive...
>
> This model for the challenge has a foreign key to the person table.
>
> In the resulting form to create a challenge, I would like the contents
> of the select tag to only contain a list of people who were created by
> the current user.
>
> I believe the query for this selection might look like this:
>
> persons=db(db.person.created_by==auth.user.id).select
> (orderby=db.person.name)
>
> However, I'm unsure how to work this into the form.  Or, would I
> define this in the model instead?
>
> Any suggestions that you have would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to