Query Help Request: List of Cemeteries with count of times used
Posted: 05 Sep 2022 16:42
I feel like I'm kind of close to getting this query built, but my brain is just not taking me that final step.
What I want:
List of cemeteries with a count of times they are used, so I can add the "popular" cemeteries manually to my TNG website. I do not use the Address records hack, all place content is in the Place record.
First Step
Create a named list ("cemeteries") of all places that are used in burial facts.
Fact query
- column: "Label" =FactLabel(%FACT%)
- column: "Place" %FACT.PLAC>%
- rows: Add if =FactLabel(%FACT%) matches 'Burial'
- rows: Exclude if %FACT.PLAC>% is null
Run query, select everything in the Place column, add selected records to named list "Cemeteries"
Second Step
Count the number of times the entries in the Cemeteries List have been used as the place on burial facts.
This is where I am stuck.
The number of times those places are used will include all the times they're used in all types of facts, not just burial facts.
I know it's going to be some combination of LinksTo, LinksFrom, IsInList and maybe some others, but my brain just can't get me there on what would be in the columns and what the row filters need to be. I'm not even sure if it should be a place type query or a fact type query.
Once I see it, I'm sure I'll say "yes, this is exactly how to filter this information!", but my brain only works right on troubleshooting existing code and filters and stuff, I'm just no good at all at coming up with it from the get go.
All help greatly appreciated!
What I want:
List of cemeteries with a count of times they are used, so I can add the "popular" cemeteries manually to my TNG website. I do not use the Address records hack, all place content is in the Place record.
First Step
Create a named list ("cemeteries") of all places that are used in burial facts.
Fact query
- column: "Label" =FactLabel(%FACT%)
- column: "Place" %FACT.PLAC>%
- rows: Add if =FactLabel(%FACT%) matches 'Burial'
- rows: Exclude if %FACT.PLAC>% is null
Run query, select everything in the Place column, add selected records to named list "Cemeteries"
Second Step
Count the number of times the entries in the Cemeteries List have been used as the place on burial facts.
This is where I am stuck.
The number of times those places are used will include all the times they're used in all types of facts, not just burial facts.
I know it's going to be some combination of LinksTo, LinksFrom, IsInList and maybe some others, but my brain just can't get me there on what would be in the columns and what the row filters need to be. I'm not even sure if it should be a place type query or a fact type query.
Once I see it, I'm sure I'll say "yes, this is exactly how to filter this information!", but my brain only works right on troubleshooting existing code and filters and stuff, I'm just no good at all at coming up with it from the get go.
All help greatly appreciated!