Page 1 of 1

Named List in a Query

Posted: 07 Jan 2022 15:41
by ississi
fH7

Hi,
I'm going slowly bonkers here...I've been adapting the "Alive in 1901" query to use for the 1921 census. I've added a column to show their age in 1921, and I've added a way to choose a named list as input.
Weirdly, despite saving the query, it's including people who aren't in the named list chosen, in the output, though the numbers of people selected does change by a handful depending which named list I choose.
So I guess I'm adding it in wrong, or I don't understand the logic of how the row rules are applied (I'd assumed it was "take the people from the first rule and pass to the next rule" etc.
I hope someone lovely out there can unscramble my brain for me, please :shock: many thanks :)
Attached are the Rows page and the Columns page:
p1.jpg
p1.jpg (176.26 KiB) Viewed 869 times
p2.jpg
p2.jpg (53.09 KiB) Viewed 869 times

Re: Named List in a Query

Posted: 07 Jan 2022 16:14
by Jane
You currently have 3 adding lines, which will all ADD to the list.

The simplest solution is to move your list select down after adding the people by dates and then do an exclude unless in list line.

Re: Named List in a Query

Posted: 07 Jan 2022 16:32
by tatewise
See the FH Help page Query Window: Rows Tab that explains how the Rows tab filters behave.

Every Add filter will add every record that matches the conditions regardless of what has gone before.
So your two Add If %INDI.DEATH.DATE% rows will add anybody who fits those criteria.

The Add If =IsInList(...) row will add everybody in the Named List regardless of their DEAT.DATE.

The question is: How do you want the Result Set adjusted by the Named List?

Re: Named List in a Query

Posted: 07 Jan 2022 16:48
by ississi
Ooh brilliant! Thank you both of you, Jane I will use your suggestion. I'd assumed the AddIf's filtered into each other. Many thanks,
Isabel

Re: Named List in a Query

Posted: 07 Jan 2022 17:00
by neil40
ississi wrote:
07 Jan 2022 15:41
fH7

Hi,
I'm going slowly bonkers here...I've been adapting the "Alive in 1901" query to use for the 1921 census. I've added a column to show their age in 1921, and I've added a way to choose a named list as input.
I don't know if you wanted to adjust dates in the query, as the 1921 Census was taken on 19th June 1921.

Re: Named List in a Query

Posted: 08 Jan 2022 10:47
by ississi
Thanks Neil, will do