# Some Source citations entries are showing more times used than actually used

**URL:** <https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935>\
**Category:** RootsMagic\
**Tags:** question, issue\
**Created:** [June 10, 2024, 2:41pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935 "2024-06-10T14:41:12Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![DanYaklin](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@DanYaklin](https://community.rootsmagic.com/u/DanYaklin)\
**Post date:** [June 20, 2024, 11:31am UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/22 "2024-06-20T11:31:58Z")

</div>

I couldn’t find the scripts that you wrote. Could you provide a link? Thanks.

---

<div class="post-metadata">

**Author:** ![thejerrybryan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/thejerrybryan/32/404_2.png) [@thejerrybryan](https://community.rootsmagic.com/u/thejerrybryan)\
**Post date:** [June 20, 2024, 12:39pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/23 "2024-06-20T12:39:25Z")

</div>

Go to [SQLite Tools for RootsMagic](https://sqlitetoolsforrootsmagic.com/) and then to Forum.

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 7:01am UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/24 "2025-01-08T07:01:36Z")

</div>

Sorry for the thread necromancy, but I’ve discovered I’ve run into what appears to be the same issue. This is what I see on my “Citation Used” screen for a particular citation:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/4/4bda58dfce1c6ced50ac02672c0562f7917afc27.png)  
Can you think of any reason why your SQL delete script above would not also work on an RM10 database?

---

<div class="post-metadata">

**Author:** ![TomH](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/tomh/32/30_2.png) [@TomH](https://community.rootsmagic.com/u/TomH)\
**Post date:** [January 8, 2025, 11:38am UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/25 "2025-01-08T11:38:18Z")

</div>

More info is required:

1. Post a shot of the Edit Citation screen
2. Post a shot of the Edit Person screen for Darnell-929 focussed on the Death event
3. Check that these are really “phantom” links as @thejerrybryan 's script is addressing:

> [@thejerrybryan](#):
>
> The only way to determine which is the real citation link and which is the phantom citation link is to click on the Edit icon for each link in turn.

---

<div class="post-metadata">

**Author:** ![TomH](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/tomh/32/30_2.png) [@TomH](https://community.rootsmagic.com/u/TomH)\
**Post date:** [January 8, 2025, 1:34pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/26 "2025-01-08T13:34:48Z")

</div>

1. Export this person to GEDCOM and import to another database. Does the multiplicity of links for the given citation reduce? That also would confirm there are phantoms of the sort discussed in this topic.

---

<div class="post-metadata">

**Author:** ![thejerrybryan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/thejerrybryan/32/404_2.png) [@thejerrybryan](https://community.rootsmagic.com/u/thejerrybryan)\
**Post date:** [January 8, 2025, 2:17pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/27 "2025-01-08T14:17:39Z")

</div>

> [@BGilkison](#):
>
> Can you think of any reason why your SQL delete script above would not also work on an RM10 database?

The RM9 script should work on RM10. Nothing has changed in the CitationLinkTable between RM9 and RM10.

Remember that the script only works for citations for people, families, facts, and names. It doesn’t work for citations for tasks or associations because I don’t use those RM features. If RM adds support to the Remove Phantom Records tool to remove phantom citations, the tool should delete all phantom citations. And I don’t use the new DNA tools in RM. Do the DNA tools support citations?

The reason I had to have separate scripts for RM7 and RM8/9/10 is that RM7 did not have a CitationLinkTable. Rather, the citation links were directly in the CitationTable. RM8 introduced reusable citations which introduced the CitationLinkTable. The CitationLinkTable is identical for RM8, RM9, and RM10 so the same script works in all three.

---

<div class="post-metadata">

**Author:** ![rzamor1](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/rzamor1/32/8_2.png) [@rzamor1](https://community.rootsmagic.com/u/rzamor1)\
**Post date:** [January 8, 2025, 2:51pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/28 "2025-01-08T14:51:14Z")

</div>

I don’t have a sample file with phantom citation links. If this is an example of it please send in support ticket Attn: Renee  
[https://support.rootsmagic.com/hc/en-us/requests/new](https://support.rootsmagic.com/hc/en-us/requests/new)

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 5:42pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/29 "2025-01-08T17:42:56Z")

</div>

> [@TomH](#):
>
> 1. Post a shot of the Edit Citation screen

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/c/c97db31e1fb3d7459fcbe99971e2b5bac6486db8.png)

> [@TomH](#):
>
> 2. Post a shot of the Edit Person screen for Darnell-929 focussed on the Death event

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/a/ab304d3aa2c04846d91274e64c3ce3feb90f1d06.png)

> [@TomH](#):
>
> 4. Export this person to GEDCOM and import to another database. Does the multiplicity of links for the given citation reduce? That also would confirm there are phantoms of the sort discussed in this topic.

Yes, by 24:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/9/9af4f7b293bbb9791d57df5c4f9bdb36d09b559e.png)

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 5:56pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/30 "2025-01-08T17:56:44Z")

</div>

I ran your deletion script on a copy of my database. Examining the “Edit Citation”:“Citation Used” screen after doing that, I no longer see multiple copies of the same event.

I also ran the following on the original and the post-deletion copy:

> SELECT COUNT(\*) FROM CitationLinkTable

… and got the following counts:  
Original: 10710  
Post-deletion: 8871

[Edit:] I believe I started using RootsMagic with version 8. But I started using Familiy Tree Maker around 1994 (2.0 I think) through 11; switched to The Master Genealogist around its v.5 (~2003 maybe) through its discontinuance after v.9 (~2014); finally started using RM8+ in early 2022. So I supposed whatever caused those citation errors could’ve crept in as a result of how the data was stored/migrated during any of those transitions…

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 5:58pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/31 "2025-01-08T17:58:06Z")

</div>

Renee — I have sent a copy of my database as you requested via your support link.

FWIW, Jerry’s script _did_ appear to resolve the issue for me…

---

<div class="post-metadata">

**Author:** ![TomH](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/tomh/32/30_2.png) [@TomH](https://community.rootsmagic.com/u/TomH)\
**Post date:** [January 8, 2025, 8:09pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/32 "2025-01-08T20:09:07Z")

</div>

Glad to hear you’ve resolved the problem but I wonder if we understand it correctly.

1. How did you make the copy of your database on which you ran Jerry’s script successfully?
2. Does Jerry’s script not succeed on the original database?
3. Your image of the Edit Citation screen in response to my #1 confirms that it is a unique citation name not subject to a Merge All Duplicate Citations miscue.
4. Your image of the Edit Person windows in response to my #2 is a surprise with the overlay of a second window for a Nameless person. That’s a different kind of phantom and I do not know if it would cause the multiplicity of the Citation Links you reported. What I wanted to see for Darnell-929 is hidden by the overlay - the number of Death facts and the number of citations for the Death fact.
5. In response to my #4, I wanted the Citation Used image as you initially presented. If you simply reported the total uses, that would have changed if you GEDCOMed just the one person, not the whole database, because the citation is used for other people. So it tells us nothing definite about the effect on uses by Darnell-929.

Sorry, I think I was not as clear as I should have been.

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 8:56pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/33 "2025-01-08T20:56:55Z")

</div>

#1. Literally a file-copy from outside of RootsMagic (i.e., at the Windows folder level).

#2. Once I confirmed it worked on my copy, I backed up my original (via RM backup), then ran the script on the original.

Re: #4 and #5, yes, I misunderstood. Hopefully the following is more what you were looking for?

#4. Ronald W DARNELL-929’s “Edit Person” screen — 1 Death fact, 1 Source for the fact, and 1 Citation of that source (I don’t know any way to show the Source _AND_ Citation at the same time though):

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/5/5dab796c9ad5f6d16be7118dd1426c1bf453737f.png)

#5. This is from the RM file imported from a GEDCOM of the entire database. The Citation Used totaled 61 times for that particular citation, but only the 3 highlighted here for Ronald:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/rootsmagic/original/2X/f/f7fbbc9d3aefd20ce8df2b21b2514d98e6cfabc8.png)

---

<div class="post-metadata">

**Author:** ![TomH](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/tomh/32/30_2.png) [@TomH](https://community.rootsmagic.com/u/TomH)\
**Post date:** [January 8, 2025, 9:34pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/34 "2025-01-08T21:34:31Z")

</div>

Okay, I still need to be clearer but I’ll drop my line of inquiry because I mistakenly inferred from your first post that you had already run Jerry’s script and it had left the plethora of citation links untouched:

> [@BGilkison](#):
>
> Can you think of any reason why your SQL delete script above would not also work on an RM10 database?

I’m still puzzled about that empty Edit (nameless) Person window, though!

---

<div class="post-metadata">

**Author:** ![BGilkison](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.rootsmagic.com/bgilkison/32/4418_2.png) [@BGilkison](https://community.rootsmagic.com/u/BGilkison)\
**Post date:** [January 8, 2025, 9:48pm UTC](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935/35 "2025-01-08T21:48:45Z")

</div>

> [@TomH](#):
>
> I’m still puzzled about that empty Edit (nameless) Person window, though!

That’s what I was getting when I clicked on the Edit Person “pencil” with a phantom citation highlighted

[Previous page](https://community.rootsmagic.com/t/some-source-citations-entries-are-showing-more-times-used-than-actually-used/10935.md?page=1)
