Page 1 of 1
Queiry not providing expected result
Posted: 05 Oct 2021 06:04
by arnoldijzermans
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.
The result is as it should be
I did the same for
#research
I did add 3 #research notes in my file as you can see below
But only 2 show up in my result list.
Who can give me some hints that might fix it.
I seem to miss the issue.
Thanks in advance!
Re: Queiry not providing expected result
Posted: 05 Oct 2021 10:00
by tatewise
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.
Re: Queiry not providing expected result
Posted: 05 Oct 2021 11:36
by arnoldijzermans
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
Re: Queiry not providing expected result
Posted: 05 Oct 2021 12:35
by tatewise
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.
Re: Queiry not providing expected result
Posted: 05 Oct 2021 12:48
by arnoldijzermans
Thanks!!
Much appreciated.
We can close this one as far as I am concerned.
