Main Help →
GENerel Commmands →
OptionalTag Command
OptionalTag Command
The OptionalTag command defines an GEDCOM tag and some initial settings that the user can attach to either the current window using the "Optional Data..." command in the "Attach" submenu or can attach as subordinate data in a particular structure by clicking a provided button. The command is the same for the two attachment options:
OptionalTag #1,<#2>,<#3>,<#4>,...
where
- #1 is the optional GEDCOM tag that can be attached
- #2 is a description of the data to be display in the panel for attaching the optional data. If this parameter is omitted, it is set equal to the GEDCOM tag in #1.
- #3 is initial content when the data is attached to the record. If this parameter is omitted, it is set equal to the GEDCOM tag in #1.
- Optional parameters #4, #5, etc., can define subordinate tags to be added when the data is attached to the record. Each parameter is an entire subordinate line starting with the GEDCOM tag followed by the initial content. The line should not have a level number. For example, to attach a subordinate
TYPE tag, #4 could be "TYPE a type line".
Notes
- When this command is used in record editing templates, its function is to attach optional data at the base level of the current window. For example, in record windows, it can attach data at level 1. In children windows, it can only attach data at the level of other tags in that window. The user attaches the data using using the "Optional Data..." command in the "Attach" submenu (the browser style may want to provide a button with a
MenuLink for that menu command).
- If no
OptionalTag command appears in the record editing template for a window, the user will not be able to attach optional tags to that window and the "Optional Data..." command in the "Attach" submenu will be disabled.
- The
OptionalTag command can alternatively be used to attach tags subordinate to data in the current window (i.e., at a level higher then the base level of the window). The steps to using this approach are:
- Create a tag editing template for a non-GEDCOM tag (e.g., an
_OptionalData Tag Editing template).
- Within the new template, define a CreateLinkButton cell.
- Within the commands for that cell use any number of
OptionalTag commands.
- To allow attaching the data defined in that template, display the button with a Show command in the template for the intended parent structure.
- The tags in OptionalTag commands should be standard tags that are simply added to the data. GEDCOM tags that require links between records require more user input and should be created with CreateLinkButton cells or with buttons that have MenuLinks to the various GEDitCOM II attaching commands.