* FactValue and Residences

Homeless Posts from the old forum system
Locked
avatar
JonAxtell
Superstar
Posts: 481
Joined: 28 Nov 2006 09:59
Family Historian: None

FactValue and Residences

Post by JonAxtell » 20 Jan 2010 15:56

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

User avatar
gerrynuk
Megastar
Posts: 565
Joined: 25 Apr 2007 09:21
Family Historian: V6
Location: Welwyn Garden City
Contact:

FactValue and Residences

Post by gerrynuk » 20 Jan 2010 19:03

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.

avatar
JonAxtell
Superstar
Posts: 481
Joined: 28 Nov 2006 09:59
Family Historian: None

FactValue and Residences

Post by JonAxtell » 20 Jan 2010 21:30

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.

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

FactValue and Residences

Post by PeterR » 20 Jan 2010 22:52

Why not simply use the %FACT.PLAC% data reference rather than invoke the =FactValue function?

avatar
JonAxtell
Superstar
Posts: 481
Joined: 28 Nov 2006 09:59
Family Historian: None

FactValue and Residences

Post by JonAxtell » 21 Jan 2010 08:45

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.

Locked