Custom Query - no result set

Edward Sneithe

I am trying to create a custom query so that I can look at the contents of  particular fact from every person who has one.

This has been disabled and I still get no output. There are facts with sources.


Mike Tate

Hi Edward,

It looks like you are using an Individual type of Query which should work if you are only searching for one particular fact.

The data reference will need to be something like %INDI.BIRT[1].SOUR[1]>% as %FACT… will only work in a Fact type of Query.

But instead of BIRT use the tag for the fact you are interested in finding, e.g. OCCU for Occupation, CENS for Census, etc.


If not sure what the fact tag is then on the Columns tab use the Fields on the left and expand the Events and Attributes sections.

That works for Individual facts but for Family facts such as MARRiage and DIVorce you must first expand the Family as Spouse section.


Note that %INDI.CENS[1].SOUR[1]>% only finds the 1st instance of possibly many Census facts for one Individual and also only the 1st Source Citation.

You will have to use %INDI.CENS[2].SOUR[1]>% to find the 2nd Census fact and so on for 3rd & 4th etc.

Similarly, for each of those use SOUR[2] to find 2nd Source Citation and so on for 3rd & 4th citation, etc.


If you are searching for a variety of facts especially those with multiple instances then a Fact type Query may be easier.

There are examples of such Queries in the FHUG Knowledge Base Downloads.


Mike Tate