I also would like to avoid running a query within the controller/
function of db(db.account.name==request.post.account_id) because I
need this function in several places. :)

On Mar 29, 3:19 pm, TheDude <[email protected]> wrote:
> Here's the code:http://pastie.org/private/wmow1xkoaov5ium6cgf8w
>
> Here's the problem:
> ok now a new problem let's say im building a mailbox application (not
> like email like a private messaging system) and int he table mailbox I
> have account_id (which account its tied to)
> On the SQLFORM it shows Account ID: <input> (which i changed to
> Player:) but I want the Player: field to actually be tied to
> accounts.name rather than mailbox.account_id
> and then use my own function called lookup_name() that returns the ID
> of the account's name
> would it be best practice to do theid = lookup_name
> (request.post.account_id) db.mailbox.account_id.default = theid ?
>
> Is there some kind of way to make it so SQLFORMS will do this
> automatically? I don't want that drop down box solution because when I
> have 100,000 user entries that would take a long time to load. :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to