Children+-+Set+Lineage+to+Birth

RootsMagic 7 and prior has the peculiar shortcoming that ancestral lineage reports, charts and other important functions follow the lineage set by the parent family displayed in the last view of each person in one of the Main screens. If the last time you viewed your mother showed her stepfather as her father, then her birth father's line is completely omitted while the stepfather's line is included. This affects several reports and charts: Moreover, it also affects the filter for selecting ancestors of the highlighted person in RootsMagic Explorer's Mark/Unmark Group functions used for RootsMagic provides no option for any of these to be directed to follow the birth line despite having the feature in the Edit Person window to set the type of relationship between a child and a parent couple to other kinds such as adoptive or step. There seems to be little point to the Relationship setting because it is visible only in the Edit Person screen and is otherwise totally ignored. There has been a long outstanding Wish List item for the system to put the relationship setting to effective use.
 * Ancestor narratives
 * Ahnentafel
 * Ancestor Box Chart
 * Pedigree Chart
 * Photo Tree
 * Ancestor Wall Chart
 * other reports
 * GEDCOM export
 * colour coding
 * Named Groups

Meanwhile, here is a potentially useful script if you have the typical family tree with several people having more than one parent couple and want to restore the focus to the birth line without having to manually search for those with other relationships to ensure that their Main View is set to the birth parents. It has been tested on a small trial database so, as always, be sure you have a backup before using it on your database or try it on a copy of your database. If you have the same database open in both RootsMagic and the SQLite manager from which you ran the script, you will not see any effect in RootsMagic until you refresh the Main Screen by switching to a different View.



code format="sql" -- Children-SetLineage2Birth.sql /* 2015-10-18 Tom Holden ve3meo

Sets the displayed lineage to that of the Birth parents so that lineage views and reports follow the birth line. In the case of multiple birth parents (permitted by RootsMagic), sets the birth family to the one with the highest Proof setting, else to the lowest FamilyID.

It does not (or cannot?) cover all possible combinations that a user might wish to allow or consider to be the preferred lineage because a parent family (couple) may have only one member (mother or father) and each spouse of a couple may have any of the four proof settings for the birth relationship (0-undefined, 1-proven, 2-disproven, 3-disputed).



DROP VIEW IF EXISTS BirthCouple -- this view of the parents includes only birth parents in descending order of proof CREATE TEMP VIEW BirthCouple AS SELECT ChildID, FamilyID FROM ChildTable WHERE RelFather = 0 AND RelMother = 0 -- birth relationships AND ProofFather < 2 AND ProofMother < 2 -- relationship proof is proven or undefined ORDER BY ChildID, ProofFather DESC, ProofMother DESC -- priority to 'proven' relationships

-- set the display lineage to the birth parents with highest level of proof and -- do not touch persons with no parents UPDATE PersonTable SET ParentID = (SELECT FamilyID FROM BirthCouple BC      WHERE PersonID = BC.ChildID) WHERE PersonID IN (SELECT ChildID FROM BirthCouple)

-- the temporary SQLite View BirthCouple will be deleted when the SQLite -- manager closes the database

code