Page 1 of 1

FactValue and Residences

Posted: 20 Jan 2010 15:56
by JonAxtell
Just checking with people's views about =FactValue() in queries.

For most attributes, it just returns the value, however for residences it makes up a sentence. Eg. Occupation returns just the occupation whilst Residence returns 'Resided in x,y,z date' where x,y,z is the place.

To be useful in queries, which can be output as a CSV file and used as input into other programs, it would be better if only the actual data was output, without any fancy embellishments. Sentences are best kept in reports and diagrams.

I can see why it might be thought useful to output a sentence for the residence attribute as it is an exception in the Gedcom spec as the only attribute without a value. More like an event actually. This is probably because the value for a residence can be found in the place structure field. However in handling this exception I think it better that just the place field is returned by FactValue for the residence attribute.

Does anyone think this is a bit of an inconsistency that FactValue outputs residences as a sentence? Would it be better to fix it and return just the place?

ID:4301

FactValue and Residences

Posted: 20 Jan 2010 19:03
by gerrynuk
Would it not be possible to allow the output to depend on a value so that the user could specify what was required?

=FactValue(%FACT%,0) might output a default value and =FactValue(%FACT%,1) might output a sentence; etc.

FactValue and Residences

Posted: 20 Jan 2010 21:30
by JonAxtell
Good idea, but is the sentence format any use at all. If not any use at all, just adding extra complexity with another option doesn't solve much.

To be honest, does anything depend that much on the sentence structure which is not solved by a simplified output of just the residence place which would be more useful - IMHO.

FactValue and Residences

Posted: 20 Jan 2010 22:52
by PeterR
Why not simply use the %FACT.PLAC% data reference rather than invoke the =FactValue function?

FactValue and Residences

Posted: 21 Jan 2010 08:45
by JonAxtell
That works if you are sticking with just residences. If you are doing a query with facts in general, then you will be handling residences as well as other types of facts so it would be better for the output to be consistent across the different facts.