Page 1 of 1

Functions in value fields in queries

Posted: 10 May 2013 21:49
by baw
I have redone all my census image data using Ancestral source method 1 after first using method 2.
I am now happy with the result except for the fact that some facts are now duplicated - specifically occupations. These show up as identical except for different sources - one has an AS type 1 source, the other a type 2.
An example:
Occupation: Scholar
Date: 5 April 1891
Source: [S12] Census 1891
Where Within Source: RG12 piece 2100 folio 100 page 3
Occupation: Scholar
Date: 5 April 1891
Source: [S192] Census 1891 RG12 piece 2100 folio 100 page 3

I want to identify which individuals are affected so I can delete the old type 2 fact.

I'm trying to create a query which looks for occupation dates
%INDI.OCCU[1].DATE% and %INDI.OCCU[2].DATE% which are equal.
(I know I'll have problems if the duplicates are 2nd and 3rd instances, but I'll live with that)
Using something like an Include if in the Rows part of a query the problem is specifying the value that I want to compare %INDI.OCCU[1].DATE% to. I've tried using
Contains text
=FieldText(%INDI.OCCU[2}%,'INDI.OCCU[2].DATE')
and variations, (e,g, was on and Field(... ) but I can't do it.

I'm using FH v4.1.3

Any ideas?

Thank you

Brian

ID:6939

Functions in value fields in queries

Posted: 10 May 2013 22:07
by baw
Ah, If I use the Textif function in the expression field I can do it.

Functions in value fields in queries

Posted: 10 May 2013 23:06
by tatewise
Why not simply select the Type 2 Source Record in the Sources Records Window and use View > Record Links.

Functions in value fields in queries

Posted: 11 May 2013 15:54
by baw
Tatewise: because I have many more records linked to the old type 2 source than had the duplicate occupation problem. In my early days of setting up the tree I used those type 2 source types for names, estimated birth years and so on. In due course, I'll clean everything up, but with over 900 individuals it's going to take time, so I'm doing it bit by bit.....

Brian

Functions in value fields in queries

Posted: 11 May 2013 16:31
by Jane
If as some point you move to V5, the List Citations for Source Plugin should help allowing you to delete the items you want to get rid of on a single screen.

Functions in value fields in queries

Posted: 11 May 2013 17:28
by tatewise
Returning to your original question, the following will work:
Condition: Add if
Expression: =IsTrue(%INDI.OCCU[1].DATE% = %INDI.OCCU[2].DATE%)
Operator: is true

and
Expression: =IsTrue(%INDI.OCCU[2].DATE% = %INDI.OCCU[3].DATE%)

will find further instances.

Functions in value fields in queries

Posted: 13 May 2013 12:06
by baw
A neater solution than mine, thank you

Brian