* Query query

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
ataloss
Gold
Posts: 25
Joined: 29 Jun 2010 19:02
Family Historian: V6.2

Query query

Post by ataloss » 14 Mar 2013 15:23

I have written a query that finds all the facts of the same name for the individuals that have that particular fact.
Now some individuals have got more than one entry of that fact which I have catered for by adding [2] etc after the event name etc, eg from %INDI.CENS[1]% to %INDI.CENS[2]% in the expression which works fine except that in the Result Set all details are in one row, which is rather confusing.
Is it possible to insert a function/comand in order to put each complete fact entry into a new row in the Result Set ?

ID:6835

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Query query

Post by tatewise » 14 Mar 2013 15:39

Yes, but you need to use a Fact Query and I suspect you are using an Individual Query.

Start by copying the Standard Query All Facts.

Use Rows tab filter such as:
Exclude unless =FactLabel(%FACT%) matches 'Census'

avatar
ataloss
Gold
Posts: 25
Joined: 29 Jun 2010 19:02
Family Historian: V6.2

Query query

Post by ataloss » 14 Mar 2013 16:38

Many thanks Mike
Yes I am using Individual Query as opposed to Fact Query.
Will enter all info into a Fact Query and try that.

avatar
ataloss
Gold
Posts: 25
Joined: 29 Jun 2010 19:02
Family Historian: V6.2

Query query

Post by ataloss » 14 Mar 2013 21:30

Tried using a fact query and it gives me the layout that I wanted, but I cannot get the Record ID into a column.
I tried using a function =RecordId() which is halfway there ie gives a column but no number. Also tried  =RecordId(%INDI%)  and  =RecordId(%FACTOWNER%) which FH does not accept as valid.
Is it possble to get the record ID into a Fact Query ?

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Query query

Post by tatewise » 14 Mar 2013 22:35

Yes =RecordId(GetRecord(%FACT%)) will do it, but remember it may be an Individual Record Id or Family Record Id depending on whether it is an Individual Fact or a Family Fact.

Alternatively, you can use =RecordId(FactOwner(%FACT%,1,MALES_FIRST)) and =RecordId(FactOwner(%FACT%,2,MALES_FIRST)) to give the Individual Record Id of the only Individual or both Individuals of Family.

avatar
ataloss
Gold
Posts: 25
Joined: 29 Jun 2010 19:02
Family Historian: V6.2

Query query

Post by ataloss » 15 Mar 2013 21:15

They worked perfectly.

Not that it makes any difference but an odd thing about them (all three) is that in the result set, the numbers are a grey colour as opposed to the black alpha and numerics of the other columns, although they all print black.

Thank you

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Query query

Post by tatewise » 15 Mar 2013 23:41

The black entries are clickable links that open the associated data field or record.
The grey entries are plain data without links.
This applies to all Result Set data.

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Query query

Post by PeterR » 15 Mar 2013 23:43

Please see Chapter 13 of Getting the Most From Family Historian 5, specifically pages 143 and 144:
If a cell is data-linked, its text is coloured black by default. Non-data-linked cells have text which is coloured grey by default. Look now at Figure 63 above. The cells in the first column have black text, and hence are data-linked. All the others have grey text and are not data-linked. These colours can be changed in the Query Window tab of Preferences if you wish.

avatar
ataloss
Gold
Posts: 25
Joined: 29 Jun 2010 19:02
Family Historian: V6.2

Query query

Post by ataloss » 16 Mar 2013 11:03

Ooops, sorry about that, I had read that but hadn't associated one with the other.

[oops]

Post Reply