* Replacing missing surname in source title

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

Replacing missing surname in source title

Post by JoopvB » 31 Jan 2021 15:23

Some persons in my database have no surname.

When using {Persoon:REVERSE} in my template title field, I end up with a starting comma.

I Thought to fix that by prefixing it with: {=NotExistsText(%SOUR.~NM-PERSOON>NAME:SURNAME%, "NN")}.

But something must be wrong since it's not accepted. Help is very much appreciated!

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

Re: Replacing missing surname in source title

Post by tatewise » 31 Jan 2021 15:46

The problem is =NotExistsText( ... ) requires an unqualified data reference, so qualifier :SURNAME is not supported.

Use the =TextIf( ..., "NN") function instead:

{=TextIf( %SOUR.~NM-PERSOON>NAME:SURNAME% = "", "NN" )}
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: Replacing missing surname in source title

Post by JoopvB » 31 Jan 2021 16:18

@Mike

I replaced the Not Exist with TextIf but still get the error. Any ideas?

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

Re: Replacing missing surname in source title

Post by tatewise » 31 Jan 2021 16:45

Maybe it does not need the NAME tag as it is already a Name meta-field so try:

{=TextIf( %SOUR.~NM-PERSOON:SURNAME% = "", "NN" )}
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: Replacing missing surname in source title

Post by JoopvB » 02 Feb 2021 00:19

Yes, that's it.

Thanks Mike!

Post Reply