Hello

I normally bottom-post but the mailing list cut it off.

Case 1, I am adding to both parent and child. The the self.Form.Save() 
should save the parent, then do a saveall on the children if I 
understand correctly. If I get this working then case 2 would be used to 
add further rows. ie. like a VFP grid which always has a hot new row 
available on the grid.

Case 2 - I have a parent record that is on the Form through 
self.Form.requery(), go through record with next, prior, what ever.
do the self.Form.new("public.cmpd_ingredients") to add a new row to the 
child or the grid.

Case 3 - Data added to child database externally. Then I can change data 
in those records and issue the self.Form.save(). However if I add a new 
child it gives the error.

Both cases fail when trying to save the children.
Case 1 the parent is saved then the error.

How else can I add a new record to the child Biz object?

Isn't this a normal 1 to many form, like an invoice or purchase order.
How are others doing this and not running into the problem?

This is a common type of situation that I program for.

Do you have a solution for a 1 to many data entry form.
The screencasts and the tutorial I found do a great job of displaying 1 
to many after the fact but I haven't found code that helps when adding 
the data the first time.

Thank you

Paul
[EMAIL PROTECTED]




Paul McNary wrote:
> Ed Leafe wrote:
>> On Jul 13, 2008, at 5:36 PM, Paul McNary wrote:
>>
>>> This happens whether I have let the Biz Objects create the new grid  
>>> row
>>> or if I have a button to add the row to the Biz Object:
>>>
>>> def onHit(self, evt):
>>>     self.Form.new("public.cmpd_ingredients")
>>>
>>> ---------------------------------------------------------------------------------
>>> However if I add data to the child externally( ie. pgadmin3), requery
>>> fills in the data on the grid. I can change data in that row and
>>> self.Form.save() works as expected. Data is saved.
>>>
>>> This only occurs when trying to add a new child row. It happens  
>>> whether
>>> the grid has any rows or rows that have been added externally.
>>      Since the data displays, it sounds like you've gotten all the  
>> bindings correct. I'm just curious if you're only adding data to the  
>> child, or if you're also adding to the parent record, too. I know that  
>> you have 'self.SaveNewUnchanged=True' for both bizobjs, but that's one  
>> area that has not received stringent testing.
>>
>> -- Ed Leafe
>>
>>
>>
>>
>>
[excessive quoting removed by server]

_______________________________________________
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