> >>         def fillDerivedFields(self):
> >>                 cur = self.getTempCursor()
> >>
> >>                 # cust_name, cust_account:
> >>                 cur.UserSQL = "select name, account from customers where 
> >> id='%s'" %
> >> self.Record.cust_id
> >>                 cur.requery()
> Well, it'll hit the database every time you call fillDerivedFields(),
> yes. I only call fillDerivedFields() in biz.afterSave(), so I don't
> notice a performance hit.

Wouldn't I have to update the derived fields everytime I changed the
foreign key entry (which is available as a textbox)?

What I'm looking for, is if I have I have ids 1-2000, and I start
writing the number '1234' in the foreign key (id) field, when I press
'1', it will display the name/accounts for id #1, then when I press
'2' it will display the name/accounts for id #12, press '3' and
display the name/accounts for id #123, and finally after pressing '4'
will display the name/accounts for id #1234.

I see the only way to do this, without saving, is either run an
explicit query against a cursor for each change and set the values
directly, or search a DataSet and set the values directly.

****
But I think I know how it *should* work:

DataSource : DataSet :: LinkField : LinkValue

Program in a LinkValue property for the bizObjs. Change the LinkValue,
tell the bizObj to requery, and the fields will be automatically
filled in.
****
Before I finish this, I've got a question about the API documentation
for dBizobj:
"""
FillLinkFromParent

In the onNew() method, do we fill in the linkField with the value returned
by calling the parent bizobj's GetKeyValue() method? (bool)
"""
1. Should "linkField" be "LinkField"?
2. The GetKeyValue() method does not exist in the dBizobj API
documentation; what does it do?

I'm going to start implementing my suggestion above. I think it will
be very easy to do.

Thanks,
Cory Cross

_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to