I'm having a modest amount of success in developing a query (Individuals location) to produce a chart to show individuals who had events or residency associated with a particular village.
However it is limited to a specific Place. I would like to extend it to show individuals in nearby villages - say within a 3 mile radius, who may have interacted with each other.
In a different query showing the results of Events Near Place which works perfectly, the function "DistanceBetween" is used. This query is a Fact type query but is not selectable when the Select/Clear Marks using Query option in the Diagram menu, probably because it is not an Individual type query.
My difficulty is that I cannot seem to get the DistanceBetween function to work in the Individuals Location query. Below are the filters used.
Is this problem due to the fact that this query is an Individual type query and the DistanceBetween function will not work in this environment?
Many thanks as always,
Brian
* Chart to show residents or events at a location
-
bbottomley
- Platinum
- Posts: 48
- Joined: 23 Aug 2015 19:39
- Family Historian: V7
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Chart to show residents or events at a location
=DistanceBetween(...) will work in any context if you provide the necessary parameters.
As always it helps us if you posted what you tried so we can see where the mistake lies.
Did you check the Help page DistanceBetween?
There it says it needs two Place records to compare and distance units.
Your existing filters refer to three Place records such as %INDI.BIRT.PLAC>% so they can be one parameter.
The other parameter can be a prompt as in the Fact Query or a specific Place record identified by Record Id.
e.g. Record( 345, "P" )
So suitable filters might be:
Exclude unless =DistanceBetween( %INDI.BIRT.PLAC>%, [Place: "Place"], MILES ) is less than 3
OR
Exclude unless =DistanceBetween( %INDI.DEAT.PLAC>%, Record( 34, "P" ), MILES ) is less than 3
As always it helps us if you posted what you tried so we can see where the mistake lies.
Did you check the Help page DistanceBetween?
There it says it needs two Place records to compare and distance units.
Your existing filters refer to three Place records such as %INDI.BIRT.PLAC>% so they can be one parameter.
The other parameter can be a prompt as in the Fact Query or a specific Place record identified by Record Id.
e.g. Record( 345, "P" )
So suitable filters might be:
Exclude unless =DistanceBetween( %INDI.BIRT.PLAC>%, [Place: "Place"], MILES ) is less than 3
OR
Exclude unless =DistanceBetween( %INDI.DEAT.PLAC>%, Record( 34, "P" ), MILES ) is less than 3
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
bbottomley
- Platinum
- Posts: 48
- Joined: 23 Aug 2015 19:39
- Family Historian: V7
Re: Chart to show residents or events at a location
Mike
I was using the same format as in the successful "Events Near" query. So my filters in my Individuals Location query were as follows Needless to say your suggestions work a treat.
I had looked at the help page for the function but didn't realise or wasn't sure how to nest functions.
As always, thanks for your help.
Brian
I was using the same format as in the successful "Events Near" query. So my filters in my Individuals Location query were as follows Needless to say your suggestions work a treat.
I had looked at the help page for the function but didn't realise or wasn't sure how to nest functions.
As always, thanks for your help.
Brian
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Chart to show residents or events at a location
I have to admit that I don't understand why the Events Near Place query works
The =DistanceBetween(...) first parameter is blank and in this context, I would expect to default to %FACT% which is NOT a 'data reference to a Place record' as required, so it seems some 'magic' is converting that to a %FACT.PLAC>% data reference.
i.e. =DistanceBetween( %FACT.PLAC>%, [Place: "Place"], MILES )
I suspect that would have given you a better clue of how to adapt it for the Individual Query context.
I suspect you also overlooked ticking the Parameter option and Label: setting.
The =DistanceBetween(...) first parameter is blank and in this context, I would expect to default to %FACT% which is NOT a 'data reference to a Place record' as required, so it seems some 'magic' is converting that to a %FACT.PLAC>% data reference.
i.e. =DistanceBetween( %FACT.PLAC>%, [Place: "Place"], MILES )
I suspect that would have given you a better clue of how to adapt it for the Individual Query context.
I suspect you also overlooked ticking the Parameter option and Label: setting.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
bbottomley
- Platinum
- Posts: 48
- Joined: 23 Aug 2015 19:39
- Family Historian: V7
Re: Chart to show residents or events at a location
Mike, now that you've pointed that out I'm a bit puzzled too.
Anyway thanks once again for your assistance.
Brian
Anyway thanks once again for your assistance.
Brian