On Sat, Feb 28, 2009 at 10:32 PM, Ed Leafe <[email protected]> wrote:

> On Feb 28, 2009, at 2:28 AM, tim awa wrote:
>
> > How do I specify the UserSQL equivalent of the following:
> > ...
> > self.UserSQL = """select phone from tblphone where fkname=??????"""
> >
>
>         You can specify the where clause using a parameter; then all you
> have
> to do is override the getParams() method to return a tuple containing
> the parent's key value. E.g.:
>
> self.UserSQL = """select phone from tblphone where fkname=%s"""
>
> ...
>
> def getParams(self):
>        fk = self.Parent.Record.fkname
>        return (fk, )
>
>
>
> -- Ed Leafe
>

Ah so that's how it is. Thanks Ed.

I wonder how the getParams code would be if there are two or three
parameters.

I presume that the self.Parent in the override code referred to the
controlling Bizobj. What will be the code if  the third parameter is taken
from another Bizobj or should I say dataset?


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to