* Service Number

Older V4 Queries please post for any version in the General Forum
Locked
avatar
ruhane
Diamond
Posts: 57
Joined: 12 Jun 2005 16:06
Family Historian: V6
Contact:

Service Number

Post by ruhane » 03 Feb 2012 15:57

I have many individuals who have more than one military service number. When I am searching on-line records I need to know who has a specific service number. How can I get query to show all service numbers for an individual? I use a simple query to show service numbers for all those that have them, but it only shows one number even though an individual has 2 or 3.
Any help would be very appreciated [grin]

ID:5878

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Service Number

Post by Jane » 03 Feb 2012 17:16

Assuming you are using a Individuals Query, just copy the current service number column and change the index number to 2
and repeat a couple of times.

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

Service Number

Post by tatewise » 03 Feb 2012 20:11

If you are using FH V4 then a Fact Query might be a better solution because it automatically picks up all instances of an Event or Attribute.

For example use the Standard Query called All Facts and in the Result Set click the Fact column header to sort it, and all your Military Service Facts will be listed together.

See the Knowledge Base on Creating a Query at
http://www.fhug.org.uk/wiki/doku.php?id ... ng_a_query
that gives some tips on Fact Queries and multiple instance Facts.

avatar
ruhane
Diamond
Posts: 57
Joined: 12 Jun 2005 16:06
Family Historian: V6
Contact:

Service Number

Post by ruhane » 07 Feb 2012 11:45

Sorry i must be stupid. I have up to 3 service numbers for an individual. No matter what i do any query only gives one service number for any individual. All i want to do is show all service numbers and if individual has more than one then show each one for the individual with his %INDI% next to it. This will enable me to see all service numbers and who they belong to. What am i doing wrong? Do i need to show you a copy of my query? Thanks for your help

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Service Number

Post by Jane » 07 Feb 2012 12:04

Make sure you are using a 'Fact' query and not an individual one or make sure you have added the additional columns as per my first post incrementing the Event index number.

avatar
ruhane
Diamond
Posts: 57
Joined: 12 Jun 2005 16:06
Family Historian: V6
Contact:

Service Number

Post by ruhane » 07 Feb 2012 14:24

Sorry, if i make the query a fact query, how do i then select service number? Ive tried but there is no column for this.

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

Service Number

Post by tatewise » 07 Feb 2012 14:50

On the Rows tab add a Filter such as:

Condition:   Add if
Expression:  =FactLabel(%FACT%)
or =FactName(%FACT%)
Operator:    matches
Value:         Service Number

Tick the Parameter option and enter a Label: such as Fact Name

The Fact Name Value you enter must match the name of your Fact.
By using the Parameter option you can select any Fact by this method.

The Knowledge Base advice that I mentioned above at http://www.fhug.org.uk/wiki/doku.php?id ... ng_a_query does say the primary Filter probably will be as illustrated above.

avatar
ruhane
Diamond
Posts: 57
Joined: 12 Jun 2005 16:06
Family Historian: V6
Contact:

Service Number

Post by ruhane » 07 Feb 2012 15:30

Thanks, what do i put in column? Im lost

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

Service Number

Post by PeterR » 07 Feb 2012 15:46

You must be using FH v4 to be able to use a Fact Query.  I think you should start with the standard All Facts Query, as recommended earlier, and then click Save as Custom Query... on the Query Menu, and input a new name for your Custom Query.

You can probably leave the entries on the Columns tab as they are for now.  On the Rows tab, you should enter the Filter as specified by tatewise, above.

avatar
ruhane
Diamond
Posts: 57
Joined: 12 Jun 2005 16:06
Family Historian: V6
Contact:

Service Number

Post by ruhane » 07 Feb 2012 16:45

Thank you all very very much!

Locked