Trouble with query


Edward Sneithe
 

I have created a new census fact that now reflects the sentence structure that I want. It looks to be just like the standard census fact in FH but with a different sentence structure. I have tried both an event and an attribute type for my census fact.

 

A query was provided that works with standard census fact but not with my new census fact.




With a standard CENSUS fact resulted in:




I included my custom fact and it appeared as the last two columns.

%INDI._ATTR-CENSUS-ALL[1].DATE:YEAR%

 

I tried adding my new census fact to the query and got these results:

 

I tried modifying the line to accommodate my fact and go this:

 

%INDI.CENSUS-ALL[year=1850].DATE:YEAR%

the expression entered is not recognized as a valid tag "address"

 

I tried friends and searched FHUG (maybe not the right search criteria) but could not find an answer.

 



 


Mike Tate
 

Edward, you have already discovered that the fact data ref is %INDI._ATTR-CENSUS-ALL[1] …

So stick with it for the year index %INDI._ATTR-CENSUS-ALL[year=1850] …

 

However, I would STRONGLY advise you to abandon that custom fact and use the Standard Census (CENS) event.

There are several ways to alter the standard Census Sentence Template in whatever way you prefer.

The simplest method is to just edit the Standard Census fact definition.

Alternatively, you can Copy the Census fact to a Custom Fact Set and edit the copy.

If the Custom Fact Set has higher priority than the Standard Fact Set then that will take precedence.

If you only want one Project to use this edited definition then make the Custom Fact Set local to the Project.

 

The reasons for using the Standard Census event are given in the FHUG Knowledge Base “Recording from a Census Record”:

https://fhug.org.uk/kb/kb-article/recording-from-a-census-record/

Various tools, Plugins, Reports, Ancestral Sources, etc, rely on the Standard Census event.

When you export to another product such as GedSite they expect standard GEDCOM Census (CENS) events.

 


Edward Sneithe
 

Mike,

Thank you for the response. I tried your reference to %INDI._ATTR-CENSUS-ALL[year=1850].DATE:YEAR%. The error message went away but the result did not produce the same result as a census record.

I had thought about your other suggestion. I copied the standard CENSUS fact into a new fact set with only that census fact in it and then adjust the ranking of the new fact set to be on the top it appears that the query then runs correctly.

I always like to test my modifications before replacing a tried and true fact. If I leave this scheme in place with my customized census fact in the new high ranking fact set and then add that fact to all my people what other catastrophes might I encounter?

On Saturday, December 3, 2022 at 06:08:55 AM EST, Mike Tate <post@...> wrote:


Edward, you have already discovered that the fact data ref is %INDI._ATTR-CENSUS-ALL[1] …

So stick with it for the year index %INDI._ATTR-CENSUS-ALL[year=1850] …

 

However, I would STRONGLY advise you to abandon that custom fact and use the Standard Census (CENS) event.

There are several ways to alter the standard Census Sentence Template in whatever way you prefer.

The simplest method is to just edit the Standard Census fact definition.

Alternatively, you can Copy the Census fact to a Custom Fact Set and edit the copy.

If the Custom Fact Set has higher priority than the Standard Fact Set then that will take precedence.

If you only want one Project to use this edited definition then make the Custom Fact Set local to the Project.

 

The reasons for using the Standard Census event are given in the FHUG Knowledge Base “Recording from a Census Record”:

https://fhug.org.uk/kb/kb-article/recording-from-a-census-record/

Various tools, Plugins, Reports, Ancestral Sources, etc, rely on the Standard Census event.

When you export to another product such as GedSite they expect standard GEDCOM Census (CENS) events.

 


Mike Tate
 

I cannot explain why %INDI._ATTR-CENSUS-ALL[year=1850].DATE:YEAR% does not work as you wanted.

However, that becomes irrelevant if you use the Standard Census event copied to a custom fact set.

Why the pessimism? No catastrophes will occur! That is because you are using the Standard Census fact.

I cannot predict everything that might happen without knowing what you customised.

But if you only changed the Sentence Template then all that is affected is the Sentence box for Census facts on the Property Box Facts tab and of course Narrative Reports where Census facts are mentioned.

All Plugins, Queries, Diagrams, Reports, Ancestral Sources, etc, will continue to work the same as before.