* Problem creating a query

Homeless Posts from the old forum system
Locked
avatar
k0065126
Newbie
Posts: 2
Joined: 04 Sep 2009 16:30
Family Historian: None

Problem creating a query

Post by k0065126 » 19 Sep 2009 11:40

I wish to create a query showing all names which have been used in official records for my ancestors. To do this I have created an attribute called 'Name Variant' which allows me to enter the name recorded, and the date and place of the record.

I modified the 'Qualifiers for Names' standard query so that I have column headings called 'NAME:SURNAME_FIRST', 'Name Variant' and 'Name Variant Date'. In Rows I have 'Exclude if %INDI._ATTR-NAME_VARIANT% is null'.

Unfortunately if a person has more than one name variant the query only produces one row for that person.
Is there a way of getting the query to output one row for each name variant for a person, or can I achieve what I want by some other method?

I did try creating an Event but this does not seem to allow me to add the variant name as a field.

Thanks in advance,
Viv

ID:4003

avatar
Bilko
Diamond
Posts: 69
Joined: 04 May 2009 20:03
Family Historian: None

Problem creating a query

Post by Bilko » 19 Sep 2009 12:17

Hi Viv,

You could find which of your people have more than one name variant by copying the 'Name Variant' (& date) columns and modifying the expression like this -> NAMEVARIANT[2] for the second column(s). This will show you the second occurance for each person. If there are people with more than 2 variants, just add more columns with relevant numbers in brackets.

Unfortunately, I don't think you can get separate rows for each name variant but I'd be interested in finding out if this can be done.

Hope this helps

Bilko

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

Problem creating a query

Post by PeterR » 19 Sep 2009 14:30

FH version 4 allows you to output a separate row for each attribute value resulting in potentally many rows per person, provided you use a Fact Query.  I've just uploaded a simple example which may help:
http://www.fhug.org.uk/cgi-bin/index.cg ... ies&id=103

avatar
Bilko
Diamond
Posts: 69
Joined: 04 May 2009 20:03
Family Historian: None

Problem creating a query

Post by Bilko » 19 Sep 2009 14:59

Thanks Peter - I've learnt something else about FH4. I'll have to try a few more of the variations on queries.

Bilko
[smile]

avatar
k0065126
Newbie
Posts: 2
Joined: 04 Sep 2009 16:30
Family Historian: None

Problem creating a query

Post by k0065126 » 19 Sep 2009 15:22

Many thanks to Bilko and PeterR. I have tried the suggestion by Bilko which has helped me to understand more about queries, but the example provided by PeterR is exactly what I wanted.

Thanks again,
Viv

Locked