Page 1 of 1
Using Custom ID in Source Record Title
Posted: 14 Aug 2023 13:57
by McHooty
Hi
I am creating custom Source Templates and want to include the individual's Custom ID in the Record Title.
If this is possible could you advise on the format I should be using.
What I am aiming for is along the lines of: Smith - Albert Charles (S 356) Obituary 26 Jan 1989.
Using: {Name:SURNAME} - {Name:GIVEN} (%INDI.RFN%) {Type} {Date_of_Publication} I can achieve everything except (S 356).
I have tried %INDI.RFN% and variations around this, but nothing that I have tried works.
Probably missing something obvious as usual.
Thanks in advance
Re: Using Custom ID in Source Record Title
Posted: 14 Aug 2023 16:31
by tatewise
The way to find valid data refs is to use one of the many Data Reference Assistants.
The easiest is in the Query window, Columns tab, Fields pane, with the box at the bottom set to Show Both in Box.
In this case, use the All Individuals query and select Individual + Miscellaneous + Custom Id to find ref %INDI.REFN[1]%
The index [1] is not strictly needed as %INDI.REFN% defaults to the 1st Custom Id.
In Source Template Formats all such data references must be enclosed in { curly brackets } like the other codes.
So that leads to the required code of ({%INDI.REFN%}) to display the Custom Id inside parentheses.
Re: Using Custom ID in Source Record Title
Posted: 14 Aug 2023 16:52
by ColeValleyGirl
I'm curious -- which Individual's record ID would you include for e.g. a Marriage? Both of them I guess.
What about a census?
Re: Using Custom ID in Source Record Title
Posted: 14 Aug 2023 18:22
by tatewise
Michael, I have experimented with my suggestion and thought a bit more and realised what you want is not possible.
In general, a single Source record can be attached to multiple Facts &/or Individuals.
So it is not possible to identify any one specific Individual record that has cited the Source record.
I'm sorry, but the only way you can get such details is to have a Source Template metafield 'Custom Id', in much the same way as you already have a 'Name' metafield.
Re: Using Custom ID in Source Record Title
Posted: 14 Aug 2023 19:05
by McHooty
Hi Mike
Thanks for the reply. I have played about a bit more before seeing your second message and came to the same conclusion. I have been adding the CustomID by manually amending the Title so I'll just carry on doing that.
Learnt a few things in the process though so not been a waste of time.
Thanks
ColeValleyGirl wrote: ↑14 Aug 2023 16:52
I'm curious -- which Individual's record ID would you include for e.g. a Marriage? Both of them I guess.
What about a census?
For marriages Yes, both. I'm working on my Scottish family at the moment and using records from Scotland's People and then entering the data through Ancestral Sources which creates the Title in the format I'm after
Census I also use AS but only use the Key Person in the Title. Each to their own I suppose.
Re: Using Custom ID in Source Record Title
Posted: 14 Aug 2023 19:17
by ColeValleyGirl
You and Mike have both arrived at the same conclusion i did. A source is often not specific to an individual/fact so a single Custom ID cant be added automatically.
Re: Using Custom ID in Source Record Title
Posted: 15 Aug 2023 09:52
by NickWalker
McHooty wrote: ↑14 Aug 2023 19:05
For marriages Yes, both. I'm working on my Scottish family at the moment and using records from Scotland's People and then entering the data through Ancestral Sources which creates the Title in the format I'm after
Census I also use AS but only use the Key Person in the Title. Each to their own I suppose.
If you're using templated sources with Ancestral Sources then the default setting (under Tools->Options) is this:

- image.png (2.36 KiB) Viewed 34 times
So the title generated by AS will be replaced with the version generated by the Family Historian title template when the project next loads up in FH.
But you could change that setting to this (and I guess you may already have done this):

- image.png (2.38 KiB) Viewed 34 times
You would then use the AS title templates to specify the format of the title. The only downside to this is that you wouldn't then be able to easily change the titles in the future if you decided to alter the formatting. To be clear, you would need to specify the 'Method 1 Source Title Template' for each of the source types in AS to ensure they are in the format you require.