* Bulk adding source data
- craigmollekin
- Famous
- Posts: 247
- Joined: 06 Mar 2009 00:28
- Family Historian: V6.2
- Location: Rotherham, South Yorkshire, England
- Contact:
Bulk adding source data
Hi,
Is there any way to add the same source data to multiple records?
The only way I can currently think of is by exporting a Gedcom to a new Gedcom with the new source data and then merging it back.
Is there any way to add the same source data to multiple records?
The only way I can currently think of is by exporting a Gedcom to a new Gedcom with the new source data and then merging it back.
Craig Mollekin
I'd rather look for dead people than have them look for me.
I'd rather look for dead people than have them look for me.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Bulk adding source data
Do mean adding a Citation to the same Source Record from many Individual Records or Facts.
If so, then Copy an existing Citation and Paste it wherever you want it using the Copy and Paste icons/buttons on the yellow Sources pane.
If so, then Copy an existing Citation and Paste it wherever you want it using the Copy and Paste icons/buttons on the yellow Sources pane.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- craigmollekin
- Famous
- Posts: 247
- Joined: 06 Mar 2009 00:28
- Family Historian: V6.2
- Location: Rotherham, South Yorkshire, England
- Contact:
Re: Bulk adding source data
No, I mean I have 4500 people that I'd like to add a citation to 
Craig Mollekin
I'd rather look for dead people than have them look for me.
I'd rather look for dead people than have them look for me.
- DavidNewton
- Superstar
- Posts: 462
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: Bulk adding source data
Although this may not be what you are looking for it seems to me that if you are making 4,500 copies then you should consider creating a source (Method 1) rather than a citation (Method 2). Attaching a source to a list of people, as a <whole record> source is fairly simple as a plugin - with a bit of preparation.
1. Create the source
2. Create a named list of the individuals
3. Run the following rough and ready plugin
fs=fhNewItemPtr()
tsour=fhPromptUserForRecordSel('SOUR',1)
tsel=fhPromptUserForRecordSel('INDI')
for i=1, #tsel do
fs=fhCreateItem('SOUR',tsel,true)
fhSetValueAsLink(fs,tsour[1])
end
When the plugin asks for the list go to the Named lists tab and double click your named list.
I'm afraid I don't have a file with 4,500 individuals so cannot test this on a data set of that size so take the usual backup precautions should you decide to try it.
David
1. Create the source
2. Create a named list of the individuals
3. Run the following rough and ready plugin
fs=fhNewItemPtr()
tsour=fhPromptUserForRecordSel('SOUR',1)
tsel=fhPromptUserForRecordSel('INDI')
for i=1, #tsel do
fs=fhCreateItem('SOUR',tsel,true)
fhSetValueAsLink(fs,tsour[1])
end
When the plugin asks for the list go to the Named lists tab and double click your named list.
I'm afraid I don't have a file with 4,500 individuals so cannot test this on a data set of that size so take the usual backup precautions should you decide to try it.
David
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Bulk adding source data
Yes, that Plugin approach is the neatest method.
It results in every one of the 4,500 Individual Records having a <whole Record> Citation, and each one links to the chosen Source Record.
I have tried it on some sample data and it certainly works fine.
I am fascinated as to why all 4,500 have a common Source.
It results in every one of the 4,500 Individual Records having a <whole Record> Citation, and each one links to the chosen Source Record.
I have tried it on some sample data and it certainly works fine.
I am fascinated as to why all 4,500 have a common Source.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- craigmollekin
- Famous
- Posts: 247
- Joined: 06 Mar 2009 00:28
- Family Historian: V6.2
- Location: Rotherham, South Yorkshire, England
- Contact:
Re: Bulk adding source data
Thanks for the replies and for creating that, David. I will try it in the next few days and report back
The Gedcom in question contains 4500ish people transcribed from headstones from a single person. I just wish to acknowledge them as the source of the data before adding additional data to it
The Gedcom in question contains 4500ish people transcribed from headstones from a single person. I just wish to acknowledge them as the source of the data before adding additional data to it
Craig Mollekin
I'd rather look for dead people than have them look for me.
I'd rather look for dead people than have them look for me.
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Re: Bulk adding source data
If it was me, I would have each headstone as a Source record, with citations by one or more Individuals or Families, and by one or more Facts (birth, death, etc.) for each Individual. Presumably there are a lot less than 4,500 headstones and thus Source records. A Source record cannot itself have a Source, but they could all have an Author. I'm sure the Plugin can be adapted to do that instead.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)
- craigmollekin
- Famous
- Posts: 247
- Joined: 06 Mar 2009 00:28
- Family Historian: V6.2
- Location: Rotherham, South Yorkshire, England
- Contact:
Re: Bulk adding source data
Well, I took the photos of the headstones but somebody has transcribed the names and dates for me from the photos of the headstones. I'm just wanting the transcribed data to be associated with the person who transcribed them 
Craig Mollekin
I'd rather look for dead people than have them look for me.
I'd rather look for dead people than have them look for me.
- DavidNewton
- Superstar
- Posts: 462
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: Bulk adding source data
I do agree about the citations but I also think as far as possible we should avoid repetition of details. I don't know if this is relevant but I have a transcription list of memorials and a source record which contains all the common details and then use citations to refer to the individual items. (I am certain that everyone will have their own way of detailing this).
David
Oh and before anybody else points it out I will be changing the image location to a more appropriate Sources > BMD
David
Oh and before anybody else points it out I will be changing the image location to a more appropriate Sources > BMD
- Attachments
-
- Capture.PNG (26.25 KiB) Viewed 6013 times
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Bulk adding source data
Follow-up on the PeterR comment "A Source record cannot itself have a Source, but they could all have an Author."
It is true a Source Record cannot have a Source, but its Note field can cite a Source.
Unfortunately, this Citation does not appear in the yellow Sources pane of the Source Record Property Box.
Alternatively, a Source Record can link to a Note Record which appears on the Notes tab of its Property Box.
I assume Craig does have a separate Source Record for each tombstone.
So I would be tempted to create a Note Record detailing the transcription acknowledgements.
Then link this one Note Record to each Source Record using the Plugin method.
It is true a Source Record cannot have a Source, but its Note field can cite a Source.
Unfortunately, this Citation does not appear in the yellow Sources pane of the Source Record Property Box.
Alternatively, a Source Record can link to a Note Record which appears on the Notes tab of its Property Box.
I assume Craig does have a separate Source Record for each tombstone.
So I would be tempted to create a Note Record detailing the transcription acknowledgements.
Then link this one Note Record to each Source Record using the Plugin method.
Code: Select all
fs=fhNewItemPtr()
tnote=fhPromptUserForRecordSel('NOTE',1)
tsel=fhPromptUserForRecordSel('SOUR')
for i=1, #tsel do
fs=fhCreateItem('NOTE',tsel[i],true)
fhSetValueAsLink(fs,tnote[1])
end
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- tLeodiensian
- Platinum
- Posts: 31
- Joined: 03 Dec 2004 18:02
- Family Historian: V7
- Location: Pudsey, West Yorkshire.
Re: Bulk adding source data
I'd love to use this as it is exactly what I want to do.
I have a named list and want to add a source link to all the individuals in it (~ 250).
1. Create the source
2. Create a named list of the individuals
3. Run the following rough and ready plugin
fs=fhNewItemPtr()
tsour=fhPromptUserForRecordSel('SOUR',1)
tsel=fhPromptUserForRecordSel('INDI')
for i=1, #tsel do
fs=fhCreateItem('SOUR',tsel,true)
fhSetValueAsLink(fs,tsour[1])
end
When the plugin asks for the list go to the Named lists tab and double click your named list.
However, when I run it I get a plugin error :-
"path_to_script....];5: bad argument #2 to 'fhCreateItem' (fh.PITEM expected, got table). No changes made...."
What is the change needed in the above code to allow the loop to read from a named list (aka a table) instead of selecting separate individuals, as seems to have been David Newton's original intent ?
I don't claim to be coder, MD-DOS batch files or Linux bash scripts are my limit, so I'd like some help here.
I also see that this was posted in 2014, and FH has moved on, so there might need to be other tweaks. I'm on latest V7.
Thanks in advance
I have a named list and want to add a source link to all the individuals in it (~ 250).
1. Create the source
2. Create a named list of the individuals
3. Run the following rough and ready plugin
fs=fhNewItemPtr()
tsour=fhPromptUserForRecordSel('SOUR',1)
tsel=fhPromptUserForRecordSel('INDI')
for i=1, #tsel do
fs=fhCreateItem('SOUR',tsel,true)
fhSetValueAsLink(fs,tsour[1])
end
When the plugin asks for the list go to the Named lists tab and double click your named list.
However, when I run it I get a plugin error :-
"path_to_script....];5: bad argument #2 to 'fhCreateItem' (fh.PITEM expected, got table). No changes made...."
What is the change needed in the above code to allow the loop to read from a named list (aka a table) instead of selecting separate individuals, as seems to have been David Newton's original intent ?
I don't claim to be coder, MD-DOS batch files or Linux bash scripts are my limit, so I'd like some help here.
I also see that this was posted in 2014, and FH has moved on, so there might need to be other tweaks. I'm on latest V7.
Thanks in advance
Doug Whiteley - Researching mostly in Yorkshire.
PCs use Manjaro or Debian Linux with Cinnamon desktop, FH & AS accessed via Remote Desktop hosted on a Windows 11 "box", that is accessible from anywhere in the house on any device.
PCs use Manjaro or Debian Linux with Cinnamon desktop, FH & AS accessed via Remote Desktop hosted on a Windows 11 "box", that is accessible from anywhere in the house on any device.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Bulk adding source data
That is a near-perfect first shot.
The problem is the tsel variable that is a table or array of pointers to the Individual records selected using the Named List.
Whereas, the fhCreateItem(...) function needs just one of those pointers, not the whole table.
Similar to the way you chose tsour[1] as the source pointer.
You could have used:
but there is a neater way, so replace the for i=1, #tsel do and fhCreateItem(...) statements with:
The problem is the tsel variable that is a table or array of pointers to the Individual records selected using the Named List.
Whereas, the fhCreateItem(...) function needs just one of those pointers, not the whole table.
Similar to the way you chose tsour[1] as the source pointer.
You could have used:
Code: Select all
fhCreateItem('SOUR',tsel[i],true)Code: Select all
for i, psel in pairs (tsel) do
fs=fhCreateItem('SOUR',psel,true)Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- tLeodiensian
- Platinum
- Posts: 31
- Joined: 03 Dec 2004 18:02
- Family Historian: V7
- Location: Pudsey, West Yorkshire.
Re: Bulk adding source data
Thanks,
Just what I wanted, and so quick to reply.
Thanks again.
Doug
Just what I wanted, and so quick to reply.
Thanks again.
Doug
Doug Whiteley - Researching mostly in Yorkshire.
PCs use Manjaro or Debian Linux with Cinnamon desktop, FH & AS accessed via Remote Desktop hosted on a Windows 11 "box", that is accessible from anywhere in the house on any device.
PCs use Manjaro or Debian Linux with Cinnamon desktop, FH & AS accessed via Remote Desktop hosted on a Windows 11 "box", that is accessible from anywhere in the house on any device.