Page 1 of 1
Reference part of repository name
Posted: 04 Feb 2022 14:40
by JoopvB
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?
Re: Reference part of repository name
Posted: 04 Feb 2022 15:03
by tatewise
Simply use {ArChief} or whatever by using the << Add > Add Field Code option in the Source Template Definition Editor.
Re: Reference part of repository name
Posted: 04 Feb 2022 15:12
by JoopvB
I would like to, but MidText({Archief},3) didn't work.
Re: Reference part of repository name
Posted: 04 Feb 2022 15:29
by JoopvB
I can get to the Custom id using {%SOUR.~RP-ARCHIEF>REFN%}. But now I need part of the name.
Re: Reference part of repository name
Posted: 04 Feb 2022 15:47
by tatewise
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)}
Re: Reference part of repository name
Posted: 04 Feb 2022 15:50
by JoopvB
Thanks Mike!
Re: Reference part of repository name
Posted: 04 Feb 2022 16:00
by tatewise
Actually {=MidText(%SOUR.~RP-ARCHIEF%,3)} works just as well because %SOUR.~RP-ARCHIEF% defaults to the Name.