Bug 6524

Rows added to a nested datawindow vanish 04 May, 2021

Mike Trainor
30 April, 2021
Product: PowerBuilder Category: DataWindow
Version: 2019 Build: 2082
Classification: Enhancement Publishing: Public
Priority: P3
Status: Transferring Reason:
Mark Lee @Appeon 04 May, 2021
#13
Hi Mike,

Thanks for reporting this problem and for your valuable suggestion. 
We'll record it as a new requirement/enhancement request.
We'll transfer it to our product team for consideration. 

Regards,
Mark Lee
Chris Pollach @Appeon 03 May, 2021
#12
Hi Mike;

  Thanks. I have updated this ticket's "classification" to be an enhancement.

  I will now transfer this ticket over to the main Support / Engineering team for their review & feedback.


Regards ... Chris
Mike Trainor 03 May, 2021
#11
Hi Chris,

Yes, I think this would e a useful enhancement.

Regards, Mike
Chris Pollach @Appeon 03 May, 2021
#10
Hi Mike;

  FYI: The nested DWO's are in face Child DW's. Its just that Sybase never implemented the GetChild() to work from a Nested Parent DWO - only a Composite DW parent. This never made any sense and many PB developers asked Sybase to implement this feature.

  Would like to change this ticket into an enhancement request to support the GetChild() command on this type of parent DW type?


Regards ... Chris
Mike Trainor 03 May, 2021
#9
Chris, I'll add this code sample to the Code Exchange. That may help others in the future.
Regards, Mike
Mike Trainor 03 May, 2021
#8
Hi Chris, I've got this figured out so I'm ok, but I did find quite a few threads on various forums so I wasn't alone.

I think if the Nested Datawindow discussion in the help area better explained the nested dw . This would help.
In my case, I did not have a table for parent data and another for child data, but a single transaction file (a payroll file) with which generate the parent child data.  So the child rows were being created well before all the parents had been added.

Also, the nested dw is not a true child as you can see by clicking the Get Child Test in the model.

Thanks , Mike
Chris Pollach @Appeon 03 May, 2021
#7
Hi Mike;

  Yes, the sequence is very "touchy". You must follow the create all parents and then all children. Of course, the Composite & Nested DWO types were never designed to be manually (externally) propagated and were always assumed to be for "reporting" purposes only.

  If you like though, we could change this to an enhancement request and see what Engineering thinks. Thoughts?

Regards ... Chris
Mike Trainor 03 May, 2021
#6
Hello  Chris,

Yes adding parent, child , parent, child should work but it doesn't.  Click buttons 1,4,2,5 in your model and you'll see the first child disappear,
I guess I need to start a ticket for this.
Chris Pollach @Appeon 30 April, 2021
#5
Yes in your design, you need to create the "Parent" rows first so that the child (nested) DWO can "hook on" to them OK. Otherwise, display errors would occur. In other words, you need to follow how the nested DW would behave if it were firing SQL (create the parent row, then the child, then the next parent, then the next child ....)

So as long as your code follows the above rule, it should work.
Mike Trainor 30 April, 2021
#4
(In reply to Chris Pollach @Appeon from comment #3)
Hi Mike;

  I have reworked your initial Test Case PB App around. I can now see all
the report details clearly. See what you think.

Regards ... Chris
Hi Chris, Looks much nicer. Now run step 1, 4, 2 then 5 to see the details from step 4 vanish.
Chris Pollach @Appeon 30 April, 2021
#3
Hi Mike;

  I have reworked your initial Test Case PB App around. I can now see all the report details clearly. See what you think.

Regards ... Chris
Chris Pollach @Appeon 30 April, 2021
#2
Test Case (By Chris)
Mike Trainor 30 April, 2021
#1
mt_test.usr.zip (14KB)

*Phenomenon:
I' have an application which uses a nested data window. It is very much like the example given in the PowerBuilder Help area
In the attached application, steps 1 and 2 will add a state and people
Steps 3 and 4 will add another state and people to the second state, but note, the people in the first state will vanish
Once the master data windows(states) have all been added the people can be added to any of the nested report. Steps 4 and 6. Thus in my live application I added all detail rows to a data store with a pointer to the master , then copied the data from datastore to the detail data window using the dot notation as in the attachment.

Also,
The child test results in an error, meaning that the nested report is not truly a child.
I think this would work for a composite report. (I tried so many scenarios trying to get this to work)

But the major issue was the vanishing details.



*Reproduce Steps:


Remarks:
OS:
Windows 10
Platform:
32-bit
Database Type:
Database Version: