* Queiry not providing expected result

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
arnoldijzermans
Newbie
Posts: 4
Joined: 03 Jul 2021 17:31
Family Historian: V7
Location: Netherlands
Contact:

Queiry not providing expected result

Post by arnoldijzermans » 05 Oct 2021 06:04

I switched from RM to FH7 just now.

I really like the idea to use Research Notes to support my (well) research.
I am, however, struggling with the result sets of queries I created.

To test functionality, I created an individual query to search for the #Todo. I have added 3 Research Notes containing #Todo in my file.
Image

The result is as it should be
Image

I did the same for #research
Image

I did add 3 #research notes in my file as you can see below
Image

But only 2 show up in my result list.
Image

Who can give me some hints that might fix it.
I seem to miss the issue.

Thanks in advance!

User avatar
tatewise
Megastar
Posts: 27079
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Queiry not providing expected result

Post by tatewise » 05 Oct 2021 10:00

Welcome to the FHUG Arnold.

Your problem is with instance indexes of items.
%INDI._RNOT[1]>% refers to the 1st linked instance of a Research Note.
%INDI._RNOT[2]>% refers to the 2nd linked instance, and so on...

I suspect your missing #Research case is the 2nd or later linked Research Note to one of the Individuals.
So you need other Rows tab entries for:
Add if %INDI._RNOT[2]>% contains...
Add if %INDI._RNOT[3]>% contains...
etc.
Also, use the Parameter option on the right so you only need to enter the search word once.

This scenario occurs in many situations where there can be more than one of the same item.
e.g. multiple Census events, multiple family partnerships, multiple Source Citations.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
arnoldijzermans
Newbie
Posts: 4
Joined: 03 Jul 2021 17:31
Family Historian: V7
Location: Netherlands
Contact:

Re: Queiry not providing expected result

Post by arnoldijzermans » 05 Oct 2021 11:36

Thanks for the reply Tatewise,

Adding %INDI._RNOT[2] did the trick.
However, this means that you can't really trust the outcome of the query setup in this way.

I tried to do a note query before, which works well. The only downside is, that you don't see who the note belongs to in the result set. As a workaround, I added the individual to the note, but I wanted to get away of the double work.

The penny did not quite drop on the parameter thing. Is there a link you know off that could help me understand a bit better?

Cheers
Arnold

User avatar
tatewise
Megastar
Posts: 27079
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Queiry not providing expected result

Post by tatewise » 05 Oct 2021 12:35

See the FHUG Knowledge Base An Overview of Queries where under Creating a Custom Query it refers to "Getting the Most From Family Historian 5" that in Chapter 14 'Writing Custom Queries' it explains multiple instances, using Parameters, etc.

To investigate your Research Notes try this technique:
Open the Records Window and on the Research Notes tab use the Title Filter to find #Research or #ToDo records.
( Contrary to what you might think, that searches all the text of the Research Notes. )
Select all those records and run the Where Used Record Links plugin from the Plugin Store.
That will list every instance of where the Research Note is used.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
arnoldijzermans
Newbie
Posts: 4
Joined: 03 Jul 2021 17:31
Family Historian: V7
Location: Netherlands
Contact:

Re: Queiry not providing expected result

Post by arnoldijzermans » 05 Oct 2021 12:48

Thanks!!

Much appreciated.
We can close this one as far as I am concerned. :D

Post Reply