* Query
-
mikegscoles
- Diamond
- Posts: 66
- Joined: 01 Sep 2006 21:27
- Family Historian: V6.1
Query
I am trying to write a query to find which of my people I have found a marriage certificate for.
I have created separate sources for each individual certificate and a type for the source - 'Marriage Certificate'.
The filter %INDI.SOUR[1]>_TYPE% Matches 'Marriage Certificate'does not produce any results.
Can anyone help?
Mike
ID:4871
I have created separate sources for each individual certificate and a type for the source - 'Marriage Certificate'.
The filter %INDI.SOUR[1]>_TYPE% Matches 'Marriage Certificate'does not produce any results.
Can anyone help?
Mike
ID:4871
-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Query
Mike:
A query I have used successfully for this situation uses the filter:
%INDI.FAMS>MARR.SOUR>_TYPE% Matches 'marriage certificate'
Hope this helps.
Derek
A query I have used successfully for this situation uses the filter:
%INDI.FAMS>MARR.SOUR>_TYPE% Matches 'marriage certificate'
Hope this helps.
Derek
-
mikegscoles
- Diamond
- Posts: 66
- Joined: 01 Sep 2006 21:27
- Family Historian: V6.1
Query
Thanks for your reply Derek.
I stll cannot get it to work.
What do you use for the column expression - I assume it is a family query?
Mike
I stll cannot get it to work.
What do you use for the column expression - I assume it is a family query?
Mike
-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Query
The filter I posted was for an individual query. For a family query (which is probably better) use theexpression
%FAM>MARR.SOUR>_TYPE%
I've road-tested both this and the individual version and they work with my dataset.
Depending how you have named your individual certificate sources (for example mine are all in the form 'Marriage certificate of X and Y') you could use the filter
Add if %FAM.MARR.SOUR>TITL% contains 'marriage certificate'
taking care to see that the match case box is unticked.
Regards,
Derek
%FAM>MARR.SOUR>_TYPE%
I've road-tested both this and the individual version and they work with my dataset.
Depending how you have named your individual certificate sources (for example mine are all in the form 'Marriage certificate of X and Y') you could use the filter
Add if %FAM.MARR.SOUR>TITL% contains 'marriage certificate'
taking care to see that the match case box is unticked.
Regards,
Derek
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Query
The reason this does not work is you are looking for the source type for the individual record being the Marriage Certificate rather than as Derek correctly suggests the source for the Marriage event of the Family as Spouse.mikegscoles said:
The filter %INDI.SOUR>_TYPE% Matches 'Marriage Certificate'does not produce any results.
Derek: for the Family Query I would have expected:
%FAM.MARR[1].SOUR[1]>_TYPE%
As you don't need to change records between the FAM and the MARR
-
mikegscoles
- Diamond
- Posts: 66
- Joined: 01 Sep 2006 21:27
- Family Historian: V6.1
Query
Thanks again.
The query works but what I wanted to do was to use the output to add a flag to the individuals in diagrams.
Unfortunately it appears that flags cannot be added using 'Set flag on result set records' using the queries you suggest.
Mike
The query works but what I wanted to do was to use the output to add a flag to the individuals in diagrams.
Unfortunately it appears that flags cannot be added using 'Set flag on result set records' using the queries you suggest.
Mike
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Query
A Flag can only be set for Individual records, not for Family records. Thus an Individual Query with the following row filter can be used (as first suggested by Derek above), and then you can use the menu option to Set Flag on Result Set Records...:You only need the default column expression %INDI%. However, please note that this only detects Individuals where there is a marriage certificate for their 1st marriage, i.e. the marriage to their 1st spouse. You can Add an additional filter for the 2nd marriage, i.e. strictly the 1st marriage to their 2nd spouse:However, please also note that both these filters only detect marriages where the 1st Source is the marriage certificate. You may also need additional filters like the following for cases where there is more than one Source:If you use a Family query with row filters as follows you can then use the menu option to Add Result Set Records to Named List...:
Code: Select all
Add if %INDI.FAMS[1]>MARR[1].SOUR[1]>_TYPE% matches 'Marriage Certificate'Code: Select all
Add if %INDI.FAMS[2]>MARR[1].SOUR[1]>_TYPE% matches 'Marriage Certificate'Code: Select all
Add if %INDI.FAMS[1]>MARR[1].SOUR[2]>_TYPE% matches 'Marriage Certificate'
Add if %INDI.FAMS[2]>MARR[1].SOUR[2]>_TYPE% matches 'Marriage Certificate'Code: Select all
Add if %FAM.MARR[1].SOUR[1]>_TYPE% matches 'Marriage Certificate'
Add if %FAM.MARR[1].SOUR[2]>_TYPE% matches 'Marriage Certificate'-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Query
Apologies to Mike if I misled him by the typo in my earlier post - Jane is of course correct and the line I intended to type was
%INDI.FAMS.MARR.SOUR>_TYPE% Matches 'marriage certificate'
As Peter says, however, further tweaks are necessary to allow for second marriages or for multiple sources.
Derek
%INDI.FAMS.MARR.SOUR>_TYPE% Matches 'marriage certificate'
As Peter says, however, further tweaks are necessary to allow for second marriages or for multiple sources.
Derek
-
mikegscoles
- Diamond
- Posts: 66
- Joined: 01 Sep 2006 21:27
- Family Historian: V6.1
Query
Many thanks to Derek, Jane and Peter,
All is now clear and all is now working.
Mike
All is now clear and all is now working.
Mike