NetTalk Central

Author Topic: Duplicate record in Browse  (Read 2926 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Duplicate record in Browse
« on: December 29, 2011, 01:20:48 AM »
Please see attached. The underlying data shows ONE record under my name. The Browse is showing two!

All was fine until I edited the original record after which it shows twice.

The only thing I can think of is that the browse is picking up an alias record but how? I have absolutely no reference to the alias file in the procedure. This is a standard wizard generated browse so no hand code of any significance to affect anything.

Also even if I close the server app and restart the browse continues to show 2 records. Even a reboot does not get rid of the ghost record. Yet there is still, only one record with my name in the tps file.

Sorry - I should be more specific - this happens when I add a related record. So I have Many Patients for one Contact. Add one or more Patients and this happens.

Any ideas?

Thank you

John

[attachment deleted by admin]
« Last Edit: December 29, 2011, 01:24:03 AM by John Fligg »

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Duplicate record in Browse
« Reply #1 on: December 29, 2011, 01:49:44 AM »
Update on this - I removed the Alias Contact record (which was not being used anyway) and the problem went away.

So - is this is issue with Aliases Bruce??

How to recreate ....

Create Contact with an Alias.
Contact --> Patient.

Open Browse Contact with a tab on which is a Patient Browse. Add/Modify a related Patient record via the Patient Browse. Save the Patient then Save the Contact and 2 contact records are shown.

-----------

Actually not true still.

Add ONE related record now and all is OK but add more than one and it happens again even without an alias. So now I have 6 related records and 5 contact records and yet the tps file shows one contact. Delete one contact and all 5 disappear.

Think I may need to send this app as an example now.

John
Thanks

John
« Last Edit: December 29, 2011, 01:57:02 AM by John Fligg »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Duplicate record in Browse
« Reply #2 on: December 29, 2011, 03:32:59 AM »
[from your example]

If you look at the generated browse for the VIEW you'll see;

ThisView            View(Contact)
                      Project(Con:ID)
                      Project(Con:Type)
                      Project(Con:Company)
                      Project(Con:FullName)
                      Project(Con:HomePhone)
                      Project(Con:WorkPhone)
                      Project(Con:MobilePhone)
                      Project(Con:EMail)
                      Join(Pat:KeyContactID,Con:ID)
                      END
                    END ! of ThisView

Note the join at the end. So this means you'll  get multiple rows in the browse, one for each contact/patient combination. If you have 4 patients you'll get 4 records in the browse.

You're getting the join because you've added the Patient, as a "secondary file" to the Contact table in the table schematic. (ie in the Data / Tables pad). You haven't actually used any Patient data in the browse columns so, this appears to be an unnecessary (and unwanted) join.

cheers
Bruce

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Duplicate record in Browse
« Reply #3 on: December 29, 2011, 03:45:21 AM »
OH!!! I do not recall doing that myself as I happened to notice that the other day prior to the testing. I think it was after I added some fields but cannot recall exactly when it happened.

Strange but easy to fix. And yes it is not required.

Thanks so much for that super fast response. Much appreciated.

John