Jump to content


Photo

Fact Order


  • Please log in to reply
7 replies to this topic

#1 Clarinetter

Clarinetter

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 30 July 2019 - 02:05 PM

Is there a way to make a fact the first in a profile? Obviously birth will come before baptism (assuming one get the dates correct!) but I have a fact which does not need to use the date field (I have a method of using Ahnentafel numbers which I store there to help searches, lists and so on)

 

In some profiles - even though the field was added late in the day - it occurs first and appears first on Individual summaries. For other folk in appears in random places; I deduce it is not to do with the order of entry.


[Using RM (UK) version 7.5.7.0 as at 24th July 2018]


#2 Bob C

Bob C

    Advanced Member

  • Members
  • PipPipPip
  • 235 posts

Posted 30 July 2019 - 02:38 PM

You can use Sort Date.



#3 Clarinetter

Clarinetter

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 30 July 2019 - 02:50 PM

You can use Sort Date.

 

Thanks!


[Using RM (UK) version 7.5.7.0 as at 24th July 2018]


#4 Vyger

Vyger

    Advanced Member

  • Members
  • PipPipPip
  • 3404 posts

Posted 30 July 2019 - 02:54 PM

Is there a way to make a fact the first in a profile? Obviously birth will come before baptism (assuming one get the dates correct!) but I have a fact which does not need to use the date field (I have a method of using Ahnentafel numbers which I store there to help searches, lists and so on)

 

In some profiles - even though the field was added late in the day - it occurs first and appears first on Individual summaries. For other folk in appears in random places; I deduce it is not to do with the order of entry.

 

You can simply add -1, -2 etc to the end of the sort date, you may find the discussion below useful.

 

http://forums.rootsm...ore-birth-date/


We are all limited by our visions and abilities

Whilst we can borrow from the visions of others we cannot always deliver.

 

User of Family Historian 6.2.7, Rootsmagic 7.6.0, Family Tree Maker 2014 & Legacy 7.5

 

Excel to Gedcom conversion - simple getting started tutorials here

 

Root


#5 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3521 posts

Posted 31 July 2019 - 06:35 AM

The answer has already been given - sort dates. Also, it might sometimes be easier to give your fact a "real" date even for a fact that does not need to use the date field. In such a case, simply omit the [Date] parameter from your fact's sentence template. Or if nothing about your fact needs actually to be printed in narrative reports, you can leave the sentence template for your fact completely empty or specify in the definition of your fact that it is not to be included in narrative reports.

 

But here is a caution about putting facts in front of the birth fact. RM does not inherently include a person's name as the first item for the person in narrative reports. Instead, RM expects the person's name to appear in the first sentence that appears for the person. So suppose you have a fact that goes in front of the birth fact and suppose you wish for your fact to appear in narrative reports. Under these circumstances, your fact will be the place in the report where you will first introduce the person's name to the readers of your report. So under these circumstances, be sure that the person's name's is included at an appropriate place in your sentence template. RM's sentence templates uses the [Person] variable for a person's name rather than having a [Name] variable.

 

Jerry



#6 Kamolga

Kamolga

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 31 July 2019 - 10:18 AM

In my case it was way too much work to go through thousands of them manually after an import, I found a SQL query on https://sqlitetoolsforrootsmagic.com.  (I used the same web site to find out how to use SQLiteSpy with RM). The query below reorder all facts for the entire database in 2 seconds. 

/* SortDateSameDayOrder.sql
   2011-12-19 ve3meo
   Alters SortDates of Birth, Christen, Baptism, Death, Cremation and Burial
   to a natural order when any pair or more occur on the same date. 
   Could be extended to order other facts also. SortDates are effectively assigned 
   (by arithmetical offsets) an absolute suffix -1, -2, ... related to the FactType.
   Affects only those events whose SortDates correspond to the Fact Date, as computed 
   by a Date encoding algorithm. The algorithm does not handle Date modifiers so not all 
   Event dates are handled, e.g. "Bef 1960". 
   2011-12-20 order of Cremation and Burial corrected
*/

UPDATE EventTable 
SET SortDate = SortDate-6692012023*(EventType 
  IN (1,3,7,2,4,5))  -- list of FactTypes we want to sort, in no particular order except this corresponds to the desired order
  +1048576*(SUBSTR('1426503',EventType,1)-1) -- the substr maps the FactType to its order
WHERE EventID 
IN (SELECT EventID FROM EventTable
    INNER JOIN 
    (SELECT -- matching dates
     SortDate, OwnerID, COUNT()-1 AS Matches FROM EventTable
     WHERE OwnerType = 0 AND EventType IN (1,3,7,2,5,4) 
     AND 
     SortDate =   -- equals encoded event Date (if not a match, suggests that user has modified SortDate so don't touch it)
       (CASE 
        WHEN Date LIKE '.%' 
        THEN 1 
        ELSE Substr(Date,3,5) END 
        +10000
        )*562949953421312 
        + Substr(Date,8,2)*35184372088832 
        + Substr(Date,10,2)*549755813888 
        + 17178820620 
      GROUP BY SortDate, OwnerID, OwnerType
     )
     USING (OwnerID, SortDate)
     WHERE Matches
    )
;


Rootsmagic 7.5.9.0 with a lot of SQL queries (SQLiteSpy) and a bit of Family Historian 6.2 (tree view and map)


#7 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3521 posts

Posted 31 July 2019 - 04:05 PM

The SQLite query puts RM's facts in their natural order in cases where RM itself fails to do so.

 

I think the original poster wanted to do something rather different. I think the need was to add a user defined fact containing the Ahnentafel  number for each person in a particular Ahnentafel report, and the original poster wanted the fact containing the Ahnentafel  number to be placed in front of the birth fact. But the fact containing the Ahnentafel  number doesn't naturally lend itself to being given a date to put it in the correct order. What to do? The proposed solution is a sort date for the fact containing the Ahnentafel number that will place it in front of the birth fact, or even a real date for the fact containing the Ahnentafel  number to place it in front of the birth fact but prevent the real date from printing.

 

Jerry



#8 Clarinetter

Clarinetter

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 11 August 2019 - 04:52 AM

Thanks again for all the help. Using sort date produces the effect I desire.

 

Jerry - a good warning from you there. I have tried narrative reports with/without the Ahnentafel fact checked (in Edit fact) to appear/not appear in reports. Either effect is pleasing, to me. If included, a report starts 1. Joe Bloggs has the Ahnentafel number 04 and if not included it gets straight on with presenting the name and date of birth. It also appears where I want it it be in an Individual Summary.


[Using RM (UK) version 7.5.7.0 as at 24th July 2018]