Record ID output in charts and reports


katrina.hodgson@gmail.com
 

Including the record id with a person's name in charts was demonstrated today by Jane Taubman.
The syntax used was =RecordId() which was added to the end of the name template. 
The result is  however Person NAME () 96  where the 96 is the record ID.

I'd like to show  Person NAME (96), or ideally  Person NAME [96]

Thanks for your help, Katrina


John Hanson
 

Katrina

Difficult to tell the error without seeing the code you used

 

Was busy yesterday and didn’t see Jane’s presentation but hope to catch it later

 

Regards

John Hanson FSG

 

From: family-historian@groups.io <family-historian@groups.io> On Behalf Of katrina.hodgson@...
Sent: 12 November 2022 21:34
To: family-historian@groups.io
Subject: [family-historian] Record ID output in charts and reports

 

Including the record id with a person's name in charts was demonstrated today by Jane Taubman.
The syntax used was =RecordId() which was added to the end of the name template. 
The result is  however Person NAME () 96  where the 96 is the record ID.

I'd like to show  Person NAME (96), or ideally  Person NAME [96]

Thanks for your help, Katrina


Mike Tate
 

Welcome Katrina,

Just insert the bracket characters around the =RecordId() function.

i.e. (=RecordId())

However, in FH you will discover that the Record Id is conventionally shown within square brackets.

i.e. [=RecordId()]

 


katrina.hodgson@gmail.com
 

Thanks John & Mike for your replies.

Jane's presentation was jam-packed with info. The part about rrecordid was in the questions, towards the end of the session.

I'm testing in the FH Sample Project, descendants chart, for Charlotte E (HODGES) [81].
Diagram options > text > clone bbmbd > edit text scheme > name

original bbmdb name
%INDI.NAME:FULL% (=GetContextInfo(DGM_MARR_INSTANCE)) Charlotte E (HODGES)

clone & rename bbmdb
1.
%INDI.NAME:FULL% (=GetContextInfo(DGM_MARR_INSTANCE)) =RecordId()
   Charlotte E (HODGES) () 81

2. 
%INDI.NAME:FULL% (=GetContextInfo(DGM_MARR_INSTANCE)) [=RecordId()]
   Charlotte E (HODGES) () [81]

3.
%INDI.NAME:FULL% [=RecordId()]
  Charlotte E (HODGES) [81]

4.
%INDI.NAME:FULL% [=RecordId()] (=GetContextInfo(DGM_MARR_INSTANCE))     
   Charlotte E (HODGES) [81  
   right ] is dropped

It seems the code (=GetContextInfo(DGM_MARR_INSTANCE)) is influencing the output. What are the implications of eliminating this code?

Jane's edit of the name tag, appending =recordid()  done in her project gave results like #1 above.

I'm test driving FH before importing my data from TMG. Expect lots of questions!

Thanks for your kind help, Katrina


Mike Tate
 

Templates are an advanced feature of FH and can have complex features.

 

The (=GetContextInfo(DGM_MARR_INSTANCE)) function only applies in the special case of Remarriage boxes. However, I don’t want to get into box type discussions at his point. For the default Diagram settings they don’t occur. So you can omit that function and it is unlikely to be a problem. i.e. your option 3)

 

There are rules about when plain text characters such as ( ) [ ] are displayed depending on whether subsequent variable data such as functions produce any output.

 

=GetContextInfo(DGM_MARR_INSTANCE) rarely produces output so the ( ) are suppressed.

=RecordId() always produces output so all the preceding plain text characters ( ) [ ] get displayed.

Swap the functions around and =GetContextInfo(DGM_MARR_INSTANCE) suppresses the ] ( ) characters that follow the preceding =RecordId() output.

 

If you wish to retain =GetContextInfo(DGM_MARR_INSTANCE) and manage the plain characters use this:

%INDI.NAME:FULL% =CombineText("[",RecordId(),"]",) (=GetContextInfo(DGM_MARR_INSTANCE))

which is the working version of your option 4)

 


katrina.hodgson@gmail.com
 

I appreciate your reply, especially the omission of the "box type discussions" :)
Your working version of option 4  is what I'll choose, since multiple marriages occur fairly often in my data.

Thanks, Katrina

On Sun, 13 Nov 2022 at 15:48, Mike Tate <post@...> wrote:

Templates are an advanced feature of FH and can have complex features.

 

The (=GetContextInfo(DGM_MARR_INSTANCE)) function only applies in the special case of Remarriage boxes. However, I don’t want to get into box type discussions at his point. For the default Diagram settings they don’t occur. So you can omit that function and it is unlikely to be a problem. i.e. your option 3)

 

There are rules about when plain text characters such as ( ) [ ] are displayed depending on whether subsequent variable data such as functions produce any output.

 

=GetContextInfo(DGM_MARR_INSTANCE) rarely produces output so the ( ) are suppressed.

=RecordId() always produces output so all the preceding plain text characters ( ) [ ] get displayed.

Swap the functions around and =GetContextInfo(DGM_MARR_INSTANCE) suppresses the ] ( ) characters that follow the preceding =RecordId() output.

 

If you wish to retain =GetContextInfo(DGM_MARR_INSTANCE) and manage the plain characters use this:

%INDI.NAME:FULL% =CombineText("[",RecordId(),"]",) (=GetContextInfo(DGM_MARR_INSTANCE))

which is the working version of your option 4)