* Reference part of repository name

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Reference part of repository name

Post by JoopvB » 04 Feb 2022 14:40

My memory is failing me. I need to get part of the repository name in a source template. I guessed {%SOUR.~RP-ARCHIEF>%} or {%SOUR.~RP-ARCHIEF.NAME>%} would do the trick. But FH thinks differently. What am I missing?

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Reference part of repository name

Post by tatewise » 04 Feb 2022 15:03

Simply use {ArChief} or whatever by using the << Add > Add Field Code option in the Source Template Definition Editor.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: Reference part of repository name

Post by JoopvB » 04 Feb 2022 15:12

I would like to, but MidText({Archief},3) didn't work.

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: Reference part of repository name

Post by JoopvB » 04 Feb 2022 15:29

I can get to the Custom id using {%SOUR.~RP-ARCHIEF>REFN%}. But now I need part of the name.

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Reference part of repository name

Post by tatewise » 04 Feb 2022 15:47

Ah! You forgot to mention that you wanted to apply a function to the Repository Name.

The clue is in your Custom Id data reference %SOUR.~RP-ARCHIEF>REFN%
So the Repository Name data reference is %SOUR.~RP-ARCHIEF>NAME%
To use a function it must be enclosed in the curly brackets like this where the equals prefix is crucial:
{=MidText(%SOUR.~RP-ARCHIEF>NAME%,3)}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: Reference part of repository name

Post by JoopvB » 04 Feb 2022 15:50

Thanks Mike!

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Reference part of repository name

Post by tatewise » 04 Feb 2022 16:00

Actually {=MidText(%SOUR.~RP-ARCHIEF%,3)} works just as well because %SOUR.~RP-ARCHIEF% defaults to the Name.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply