Alpha Video Training
Results 1 to 13 of 13

Thread: Bug in parent-child-grandchild 1:M:1 set?

  1. #1
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,200

    Default Bug in parent-child-grandchild 1:M:1 set?

    The attached is an example with a three table set with Parent:Child 1:M and Child:Grandchild 1:1. I believe this would fall into Dr. Wayne's example of three table set with parent = patient_header, child = patient_visits, and grandchild = visit_notes scenerio.

    The attached shows this does not work.
    1. All grandchild record for a parent are shown, not the grandchild specific to the child.
    2. You are unable to add a grandchild for a new child
    3. When you try and delete the grandchild, it deletes the child.
    4. It is displaying 4 grandchild records for parent record #3, one as showing twice when there are only 3 grandchild records in the table and there is not a duplicate.

    Please confirm before I send in as a bug. Thanks.
    build: 1815:3211
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Mike, I think what's wrong is the use of an embedded browse for the 1:1 grandchild table. Compare your form to the default form for the set, to see what I mean. I don't think it's correct to use an embedded browse object for a child or grandchild that's linked 1:1. -- tom

  3. #3
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    As Tom suggests, the "correct" way to display a 1:1 grandchild is within the child browse.

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    ... or by dropping fields from the grandchild table directly on to the form, as per the attached example.

  5. #5
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    See the attached modification of Mike's db which successfully shows the grandchild and correctly marks the grandchild.

  6. #6
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    The display per se shouldn't make any difference, what matters is whether the ref integrity is turned on or not. See related thread.
    Didn't open Mike's zip, but would be quite hesitant to call it a bug.

  7. #7
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Tom,

    I get an error message using either of your delete GC buttons.

  8. #8
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    They're not my buttons. Did not do anything other than delete the browse object and replace with fields from the grandchild table.

  9. #9
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Quote Originally Posted by Tom Cone Jr View Post
    They're not my buttons.
    Shows you how how observant I am.

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Mike's data reveals an issue I haven't bumped into before.

    Use the default form for his set.

    If a child record has no linked grandchild record, the browse displays field values from the last physical grandchild record anyway.

    I see the same thing in my example, where I deleted the embedded browse object and dropped grandchild fields directly on the form.

    This seems wrong to me. What am I missing?

  11. #11
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Quote Originally Posted by Tom Cone Jr View Post
    This seems wrong to me. What am I missing?
    The GC is linked by "closest". Change it to "first" and you won't see a GC where there isn't one.

  12. #12
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    Thanks, Peter. Should have seen that myself. Guess I'm so used to using link "first" that I didn't check it. -- tom

  13. #13
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,200

    Default Re: Bug in parent-child-grandchild 1:M:1 set?

    I guess to conclude this thread, this example sums up what has been said. Thanks.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

Similar Threads

  1. ew grandchild records for parent
    By richard2007 in forum Alpha Five Version 8
    Replies: 8
    Last Post: 02-08-2008, 08:46 AM
  2. Set link between parent/child key, appears not working, V7.
    By Tony Saladino in forum Alpha Five Version 7
    Replies: 3
    Last Post: 01-05-2006, 11:27 AM
  3. Update of Set Child with Parent fields
    By lgoode in forum Alpha Five Version 6
    Replies: 4
    Last Post: 06-23-2005, 02:29 PM
  4. Parent record switches when entering in grandchild
    By Rick Hollowell in forum Alpha Five Version 4
    Replies: 11
    Last Post: 03-09-2001, 09:32 AM
  5. Parent record switches when entering in grandchild
    By Rick Hollowell in forum Announcements
    Replies: 2
    Last Post: 03-08-2001, 06:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •