On Wednesday, July 28, 2010 12:59:20 pm Paul McNett wrote: > On 7/28/10 8:48 AM, John Fabiani wrote: > > Is it possible to setup the ParentLinkField to a virtual field? and also > > set the LinkField to virtual field for a bizobj? > > This use was never intended. I don't know the answer, but I highly doubt it > would work. For one thing, when a child is requeried, it sends that SQL > *to the database server* for processing. The database server doesn't know > anything about virtual fields. > > > self.ap_bizobj.ParentLinkField = 'special_docnumber' > > self. ap_bizobj.LinkField = 'special_doc_number' > > > > Where both of the fields used are virtual fields? > > Can you give us an idea what you are trying to do using virtual fields > instead of actual foreign key fields in the tables? > > Paul
The problem was simple. I needed a way to use compound link fields. I mean I needed the Parent link to use two fields and wanted the child link to use two fields. Customer number + invoice number in both cases. I could have created a manual SQL statment in code. But I wanted to see if I could somehow use Dabo's link routines to do the work. I was partly successful. I created a virtual field in the Parent and then used a real field for the child. BTW the child in this case is a view. The child being a view it was very easy to create the new link field. But in would have been nice to have the ability to use virtual fields. There may have other ways to handle this type of linking. So if anyone has a suggestion please speak up. Johnf _______________________________________________ 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]
