* Custom Query

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
avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 20 Oct 2012 18:36

I have created a Custom Query for Notes for Individuals which works. What I now want to do is to add the 'Note' field that appears at the bottom of the Source Pane but cannot seem to find the right one to select from the column Fields list. I am looking under 'Sources' in the Fields list but everytime you expand the '+' button I never seem to get the right one. How do you decide which is the correct one to open?

If and when I can get that to work is there a clever way of copying the data in the local note field to the Note field in the Source pane?
Robert

ID:6541

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

Custom Query

Post by tatewise » 20 Oct 2012 21:32

There is as you say lots of Note fields, and you need to be quite precise about which is which.
Added to that, there may be multiple instances of every such Note, but only the 1st is usually displayed.

%INDI.NOTE2[1]%  is whole record Note in Property Box on Main tab & Notes tab.

%INDI.SOUR[1].NOTE2[1]%  is whole record Citation Note at bottom of yellow Sources pane.

%INDI.SOUR[1]>NOTE2[1]%  is whole record cited Source Record local Note.

%INDI.BIRT[1].NOTE2[1]%  is Fact Note in Property Box at bottom of Facts tab per Fact.

%INDI.BIRT[1].SOUR[1].NOTE2[1]%  is Fact Citation Note at bottom of yellow Sources pane per Fact.

%INDI.BIRT[1].SOUR[1]>NOTE2[1]%  is Fact cited Source Record local Note.

The difference between a Citation Note and a Source Record Note is a dot . and a greater than > symbol.

The whole structure is repeated for every type of  Fact including CENS[1] and OCCU[1], etc, etc.
Not forgetting that there can be multiple instances of Facts such as CENS[2] and OCCU[2], etc, etc.

In addition the Individual Property Box also shows some Family Facts and their Notes:

%INDI.FAMS[1]>MARR[1].NOTE2[1]%  is Marriage Fact Note at bottom of Facts tab per Fact.

%INDI.FAMS[1]>CHIL[1]>BIRT[1].NOTE2[1]%  is Child Birth Fact Note at bottom of Facts tab per Fact.

When you say you have a 'Custom Query for Notes for Individuals', which of the above are you talking about.
I suspect only whole record Notes, and not Fact Notes.
The latter would be best achieved with a Fact Query which would change the above Data References.

The simple answer to 'Is there a clever way of copying the data in the local note field to the Note field in the Source pane?' is Yes just Copy & Paste in the Property Box.
But I suspect you mean some form of bulk select and copy in the Result Set to which the answer is No.
The solutions involve complex batch editing or writing a Plugin.

May I ask why you want to perform such copying?

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 20 Oct 2012 22:43

Mike
What I have are %INDI.NOTE2[1]% (whole record Note in Property Box on Main tab & Notes tab)an example being 'Age at death recorded as 82 on Death BMD record'.
What I feel may be more appropriate would be to record that in the Note Field of the Source pane under the Death citation.
In my custom query I can see all such notes and was hoping that I could bulk copy and drag them accross to the new column %INDI.SOUR[1].NOTE2[1]% (whole record Citation Note at bottom of yellow Sources pane) but it would appear not.
If I proceed it will be 1 by 1 then.
Robert

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

Custom Query

Post by tatewise » 21 Oct 2012 00:15

I have a number of comments on your intentions.

I agree your example Note is inappropriate where it is.

You say you want it in 'the Note Field of the Source pane under the Death citation', which would be %INDI.DEAT[1].SOUR[1].NOTE2[1]%.
But then refer to 'the new column %INDI.SOUR[1].NOTE2[1]% whole record Citation Note', which is a completely different Note.

If you have a Death Event then its Age field should hold the 82 value, not a Note field.

The Death Event citation lists a Source Record presumably entitled SMITH, John 1876 Death Record or similar, in the yellow Sources pane.
So that deals with the rest of the Note.

Finally, the Source Record itself could hold a transcript of the Death Record in its Text From Source field, which would include the Age at Death among many other details.

So if my analysis is correct, the whole record Note is redundant and could be deleted.

Similar arguments should be applied to all your other whole record Notes.

If they all need to be deleted, that can be done in bulk, by selecting the entire Note column and clicking the Delete key.

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 21 Oct 2012 09:35

Mike
I am using the wrong trerminology here. All I should be referring to is the Source Pane adjacent to the Individual Property Box.
Here I have Citations for Birth Marriage and Death. Under each category I have the Entry Date; Assessment; Where within Source ( which for my purposes I record as e.g. Q2 1914 Walsall Volume no:111 Page no:222).Then under Text from Source I record other information like BMD record spells surname differently as '???' whatever it may be.

For modern Death records it sometimes says Age at death 0 or may state the DOB. It is this item / fact that I want to record under the source pane. So age at death would go under the Death citation and DOB I would put under the Birth citation as 'DOB listed as xxx on Death BMD' or words similar.
Currently all such Notes for BMD are recorded as Local Notes under the Notes tab of the Individual Property Box.

I am not at this point referring to Notes under 'Facts' tab or anywhere else.

I hope that helps and clears up my intentions.
Robert

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Custom Query

Post by Jane » 21 Oct 2012 09:40

I think this is the one you are looking for

INDI.BIRT.SOUR.NOTE2

BTW if you have V5 a neat trick to find the correct data reference is to use the Search and Return Result set plugin and search for something in the note/field you want as it returns the Data Reference as one of the columns.

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

Custom Query

Post by tatewise » 21 Oct 2012 11:31

Robert,
You seem to be unaware that it is possible to have not just whole record Citations, but also Fact Citations and Name Citations, etc.

To demonstrate this, open the Property Box for an Individual with many Facts defined.
In the yellow Sources pane, left-click the black triangle in the button to the right of the Sources box.
This lists all the items to which a Citation may be linked, and those with an asterisk * already have a Citation.
In addition, each item can have multiple Citations.

It sounds as if you have all your Citations attached to the <whole record>.
So, can I take your examples of Age at Death and Date of Birth shown on a Death Certificate.

I would expect both the Birth Event and Death Event to have a Citation for the Death BMD Record.
Here I am talking about separate Citations for each Fact, not Citations for the <whole record>.

The Birth Event, in its Citation for the Death BMD Record, could have the Note say Date of Birth listed as dd/mm/yyyy.
The Death Event, in its Citation for the same Death BMD Record, could have the Note say Age at Death listed as 99.

In addition, the Birth Event could have a Citation for a Birth BMD Record and have its Note say Date of Birth listed as dd/mm/yyyy.

If you have a particular reason for only using Citations attached to the <whole record> then I apologise for taking you on the preceding journey.

One final point regarding your use of the abbreviation BMD, which stands for Birth, Marriage, Death.
When expanded, the phrase Death BMD reads Death Birth, Marriage, Death, which sounds a little odd.

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 21 Oct 2012 12:16

Mike

No I have separate Sources and Citations for each fact. So Birth, Marriage and Death and any other fact, where I have a Source for has a separate Citation.

All I was doing when I started this thread was: -
a)to move what I now know are Whole record notes to the Individual Fact event if not already there and also to synchronise that with the Note field in the Source pane.
So for example if under a Death fact the Note there said 'Age at death 60' then I wanted to replicate that in the Source pane Note. As I work with the Source pane always open this would save me having to open the Fact tab when looking at the Individuals Property record.

b)Ideally I then wanted a query that when run would show me Whole record notes and then the Notes field in the Source pane for Citations for Birth, Marriage & Death so I could see when I had moved/copied the Whole note over.

I guess I still want b) above as I have started copying bthe Notes to where I want them but presumably need the query to check that I have done every one.

I hope that makes sense and apologise if I am not making myself clear (Box Titles/headers would certainly help me!).
Robert

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

Custom Query

Post by tatewise » 21 Oct 2012 13:19

Ah, I think I now understand better.

a)
When you have the Property Box open on its Main tab, you want to click on a Born: or Died: or Marr: field, and see the Sources pane Note (and other fields) display details related to the clicked Fact.
Providing you recognise that only a subset of Facts can be shown on the Main tab, then that is fine.

Some users would frown at duplicating data in the Fact and in the Sources pane Note, but that is a different discussion.

However, my preceding example still stands.
It is simply phrased from the perspective of the Facts tab instead of the Main tab, because I almost always work on the Facts tab.

b)
The Query Expressions you need on the Columns tab are:

%INDI.NOTE2[1]% whole record Note.

%INDI.BIRT[1].SOUR[1].NOTE2[1]% Individual Born: Sources pane Note.
%INDI.DEAT[1].SOUR[1].NOTE2[1]% Individual Died: Sources pane Note.

%INDI.FAMS[1]>BIRT[1].SOUR[1].NOTE2[1]% 1st Spouse Born: Sources pane Note.
%INDI.FAMS[1]>DEAT[1].SOUR[1].NOTE2[1]% 1st Spouse Died: Sources pane Note.
%INDI.FAMS[1]>MARR[1].SOUR[1].NOTE2[1]% 1st Spouse Marr: Sources pane Note.

Similar Expressions would apply to the OCCU[1] Occupation: and CHR[1] Christened: field, and with FAMS[2] for a 2nd Spouse tab.

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 21 Oct 2012 14:19

Mike

Thank you. However when I try to enter the following 2 expressions either by copy & paste or re-enter from scratch I get the error message 'The expression entered is not recognised as a valid tag 'address'


%INDI.FAMS[1]>BIRT[1].SOUR[1].NOTE2[1]% 1st Spouse Born: Sources pane Note.
%INDI.FAMS[1]>DEAT[1].SOUR[1].NOTE2[1]% 1st Spouse Died: Sources pane Note.

Any ideas?
Robert

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

Custom Query

Post by tatewise » 21 Oct 2012 14:47

Sorry my mistake, should be :

%INDI.~SPOU[1]>BIRT[1].SOUR[1].NOTE2[1]% 1st Spouse Born: Sources pane Note.
%INDI.~SPOU[1]>DEAT[1].SOUR[1].NOTE2[1]% 1st Spouse Died: Sources pane Note.

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Custom Query

Post by Robert129 » 21 Oct 2012 15:05

Mike

Thanks a lot. Works fine.

As I've taken up so much of your time recently I'll go away and tidy up my records and do a lot of experimenting with Expressions and Queries.

I am extremely grateful for your time and help.

Robert

Post Reply