Controlling Text in Diagrams (Simon Orde)
Posted: 24 Aug 2006 08:18
Suppose you have some extra text that you want to add into boxes in diagrams, but you want it to be free text that you write on a per-person basis. If the text is such that you are happy for it to be a paragraph in the person's record notes (or several paragraphs) you could do the following:
Edit your text scheme (Text tab of the Diagram Options dialog) and insert ' ' (select ' ' and press the '>' button). In the Edit Text Scheme Item text, set the Template to:
=GetParagraph(%INDI.NOTE2%,1)
This will get you the first paragraph of the person's note (change '1' to '2' if you want the 2nd etc). Set the Description to 'Extra Diagram Note'. Tick 'Flag Condition' and enter 'Note in Diagram' (say) in the Record Flag field and make sure that the value of 'must be...' is set to 'Set'. Press OK. Position this item line wherever you want it to appear amongst the other lines in the text scheme using the Move up/down arrow buttons, and save the text scheme.
Then select the people that you want to override text for and use Edit > Record Flags to set a new flag for them called 'Note in Diagram' (or whatever you called the new flag). Now, whatever you type into the first paragraph of the note for these individuals will appear in the appropriate place in the text boxes in the diagrams when you use this text scheme.
If you want the whole note to appear (not just the first paragraph), set the
template to
%INDI.NOTE2%
Yet another alternative, which would mean that you wouldn't need to set a record flag, would be to use the following template instead
=GetLabelledText(%INDI.NOTE2%, 'Extra Diagram Text:')
If you used this template, when you want extra 'free' text to appear for a given person only, simply edit the person's note and add the 'free text' as a paragraph somewhere in the note, starting with the label 'Extra Diagram Text:' (make sure the spelling exactly matches the template version). Whatever appears after this label will be displayed in the appropriate place in the box.
The disadvantage of the latter is that you may not want this label appearing in notes as it may look odd when notes are output in reports. You can get round that problem by putting the whole paragraph in double-square brackets (which are used to mark a 'private note' - not normally output in reports). e.g. you could add the following to a note, perhaps at the end of it:
[ [
Extra Diagram Text: Future Prime Minister of the United Kingdom
] ]
There are more options and other ways of getting free text into diagram boxes (you can do it avoiding having to edit a person's notes at all if you use enough flags) but this at any rate is one way.
Incidentally, you may not just want to add some extra text. You may also want to hide some or all of the other text scheme lines for given people. If so, simply create a flag (e.g. 'Hide Standard Text') and edit the relevant text lines in the text scheme to make them conditional upon the 'Hide Standard Text' not being set. Then set that flag on the appropriate records.
Simon Orde
List Administrator & Family Historian designer
Lifted from Simon's Mailing List Post, with his permission
Edit your text scheme (Text tab of the Diagram Options dialog) and insert ' ' (select ' ' and press the '>' button). In the Edit Text Scheme Item text, set the Template to:
=GetParagraph(%INDI.NOTE2%,1)
This will get you the first paragraph of the person's note (change '1' to '2' if you want the 2nd etc). Set the Description to 'Extra Diagram Note'. Tick 'Flag Condition' and enter 'Note in Diagram' (say) in the Record Flag field and make sure that the value of 'must be...' is set to 'Set'. Press OK. Position this item line wherever you want it to appear amongst the other lines in the text scheme using the Move up/down arrow buttons, and save the text scheme.
Then select the people that you want to override text for and use Edit > Record Flags to set a new flag for them called 'Note in Diagram' (or whatever you called the new flag). Now, whatever you type into the first paragraph of the note for these individuals will appear in the appropriate place in the text boxes in the diagrams when you use this text scheme.
If you want the whole note to appear (not just the first paragraph), set the
template to
%INDI.NOTE2%
Yet another alternative, which would mean that you wouldn't need to set a record flag, would be to use the following template instead
=GetLabelledText(%INDI.NOTE2%, 'Extra Diagram Text:')
If you used this template, when you want extra 'free' text to appear for a given person only, simply edit the person's note and add the 'free text' as a paragraph somewhere in the note, starting with the label 'Extra Diagram Text:' (make sure the spelling exactly matches the template version). Whatever appears after this label will be displayed in the appropriate place in the box.
The disadvantage of the latter is that you may not want this label appearing in notes as it may look odd when notes are output in reports. You can get round that problem by putting the whole paragraph in double-square brackets (which are used to mark a 'private note' - not normally output in reports). e.g. you could add the following to a note, perhaps at the end of it:
[ [
Extra Diagram Text: Future Prime Minister of the United Kingdom
] ]
There are more options and other ways of getting free text into diagram boxes (you can do it avoiding having to edit a person's notes at all if you use enough flags) but this at any rate is one way.
Incidentally, you may not just want to add some extra text. You may also want to hide some or all of the other text scheme lines for given people. If so, simply create a flag (e.g. 'Hide Standard Text') and edit the relevant text lines in the text scheme to make them conditional upon the 'Hide Standard Text' not being set. Then set that flag on the appropriate records.
Simon Orde
List Administrator & Family Historian designer
Lifted from Simon's Mailing List Post, with his permission