ORA Template Library Report

30 July 2024 - 07:08:45

Add_AS_1939_Register


#
#
# Author: Alan
#
# Change History     Reason for change
# --------------     ---------------------------------------------------------------------------
# 15/05/2023 07:00   Created
# 17/10/2023 1.0     Conversion of persistent variables into variances.

#
# [lib.Add_AS_1939_Register]

{target=ancestral sources}

# Execution speed
{fast}

# Set up common fields
# 17/10/2023 1.0     [lib.SetFieldName:1939 Register]

# Focus on PLACE field
{Ctrl+t}{Shift+tab*6}


# Place - use to allow Geocoding
[var.zFullAddress]
{Tab}

# Address
{Ctrl+A}{Del}{Tab}

# Ref ID
{Ctrl+A}{Del}
[var.zArchiveReference]
{Tab}

# Other Info
{Ctrl+A}{Del}
ED: [var.zEnumeration District]

Add_AS_1939_Register_Templated_Source


#
# Autotype 1 Add 1939 Register into Ancestral Sources
# [lib.Add_AS_1939_Register_Templated_Source]
# ORA will ask for...
#    [Research Place]
#
# Author: Alan
# Version Date        Reason for change
# ----------------    ---------------------------------------------------------------------
# 17/05/2023 14:00    Created
# 16/09/2023          Removed {tab}{Enter} before [Repository]
# 17/10/2023 1.0      Conversion of persistent variables into variances.
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
#

# Service       Collection
# Ancestry      
# Findmypast    
#
{Target=Ancestral Sources}

[=:var.Debug:1]

# Start "Edit Templated Source" process.
{Ctrl+Shift+T}
# Execution speed
{fast}

# Fill in missing fileds in FH Source template - Transfer to "Edited Templated Source".

# This is not possible because there is no Control or Function keys to do this...

# NB. If cursosr is not placed on the first field then the nymber of {Tab} 
# needs to be increased by 2 - one for Template name and one for Template
# Editor button.
#

# Skip fields
{Tab*17}
# 16/09/2023 {tab}{Enter}


# Repository
[lib.SetRepositoryAS]


# Collection
{tab}


<[?:Page.ServiceName=Ancestry][Source.Title]>
<[?:Page.ServiceName=Findmypast]1939 Register>
{Tab}

# URL
{tab}<[URL]|[Page.URL]>
{Tab}

# URL dropdown box
{Tab}

# Resource Date
{tab*2}

# Research Place
{tab}[Research Place]{tab}

# OK
{Enter}


# Save record
#{ALT+F,S}

#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

Add_AS_Autotext

{Target=Ancestral Sources}
[=:Start:Add_AS_Autotext]

# Author: Alan
# Description: Insert Autotext for Ancestral Sources (AS).

# Change History     Reason for change
# --------------     -------------------------------------------------------------------
# 23/09/2023         New autotext introduced for Banns. Templates are in alphabetical
#                    sequence which means the count has to go down by 1 for Marriage.
# 24/09/2023         Reversed change of 23/09/2023 as BANNS does not fit well with AS
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 06/11/2023         Fact Type is updated by a previous process from the field Source Type but
#                    the Source Type was enhanced with Register Type such as NC, BT, PR and the
#                    Fact Type included that Register Type incorrectly. Temporary fix to check 
#                    the Marriage Fact Type using SUBSTRING transform. Same fix applied to 
#                    Baptism and Burial.
# 11/07/2024         BETA8_3 Changed {DOWN*14} to {DOWN*15} for Marriage to load custom autotext.

#


# Usage: [lib.Add_AS_Autotext]

# Execution speed
{fast}
# Select Autotext option
{Ctrl+Shift+u}

# Select Autotext template by [zType]

<
# 1939 Register
[?:var.zFactType=1939 Register]{down}

|
# Baptism
[?:var.zFactType:substring:1:7=Baptism]
# ... Parish Registers 1813-(England/Wales)
<
[?:var.zFactYear>=1813]{down*9}
|
# ... Parish Registers 1813-(England/Wales)
[?:var.zFactYear<=1812]{down*6}
>

|
# Burial
[?:var.zFactType:substring:1:6=Burial]
<
# ...RTF custom (includes entry no)
[?:var.zFactYear>=1812]{down*9}
|
# RTF built in
{down*6}
>

|
# Census
[?:var.zFactType=Census]{down}

|
# Electoral Register
[?:var.zFactType=Electoral Register]{down}

## 24/09/2023  |
## 24/09/2023  Banns
## 24/09/2023| [?:var.z_FactType=Banns]
## 24/09/2023  ... year
## 24/09/2023| {down}
|
# Marriage
[?:var.zFactType:substring:1:8=Marriage]
# ... year
<
# 1837 Built in (down*14); 1837 Custom (down*15)
[?:var.zFactYear>=1837]{down*15}
|
[?:var.zFactYear>=1812]{down*12}
|
[?:var.zFactYear>=1754]{down*10}
>

>


# Extra {Enter} required if Autotext previously entered
{Enter}


[=:End:Add_AS_Autotext]

Add_AS_Baptism

[=:Start:Add_AS_Baptism]
#
# Autotype 1 Add baptism into Ancestral Sources
# Usage: [lib.Add_AS_Baptism]
# ORA will ask for...
#    [Occupation]
#    [Abode]
#    [Research Place]
#
# Flow of script was being affected depending on whether the baptism age or birth date 
# appears in the ORA Penel.
#
#
# Author: Alan
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 15/05/2023 07:00   Created
# 03/07/2023         New AS7.7.7 uses Control keys to move to different tabs
# 10/09/2023         Added {Del} after occupation as AS looks up similar name and inserts it.
# 14/09/2023         Added [lib.ValidateInputField] for [Birth Date] and [BirthDate]
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 08/11/2023         Added [var.z_BaptismDate] as an alternative date.
#                    [Residence] contained a space (nk) and followed by {tab} displayed first
#                    place in the place list.
# 06/05/2024         Check for NK (Not Known) with [Birth Date]
# 18/05/2024         Check for NK (Not Known) with [var.zResidence]

# Service       Collection
# Ancestry      Norfolk, England, Church of England Births and Baptisms, 1813-1919
# Ancestry      London, England, Church of England Births and Baptisms, 1813-1923
# Ancestry      Lancashire, England, Church of England Births and Baptisms, 1813-1911
# Ancestry      Dorset, England, Church of England Births and Baptisms, 1813-1906
#
{Target=Ancestral Sources}

[=:var.debug:1]

# Execution speed
{fast}



#-------------------------------------------------------
# Tab "Main info"...
#03/07/2023# Place focus on [Place] field can only be done by {Ctrl+2}{Ctrl+1}
{Ctrl+2}{Ctrl+1}
# Baptism place
[var.zBaptismPlace]

{Tab*3}

<[Baptism Date]|[Date]|[var.zBaptismDate]>{Tab*4}

# Father's Name
#[Father's Name]
#<[?:zFathersGivenName][zFathersGivenName]{space}[zFathersLastName]>
{tab*4}

# Mother's Name
# Typically Scotland reveals the mothers name
#[Mother's Name:nameGiven]{space}[Mother's Name:nameSurname:uppercase]
#<[?:zMothersGivenName][zMothersGivenName]{space}[zMothersLastName]>
{tab*3}

# Edit Baptism Age
[Baptism Age]
{tab*2}

<
[?:Birth Date]
[lib.ValidateInputField:Birth Date]
<[?:Birth Date!=nk][Birth Date]>
|
[?:BirthDate]
[lib.ValidateInputField:BirthDate]
[BirthDate]
>
{Tab}


[lib.ValidateInputField:Occupation]
<[?:Occupation=nk][=:Occupation:]|[Occupation]>{del}
{Tab}

# Delete Mother's occupation
{tab}{del}
#--------------------------------------------------------
# Tab "Residence"
#03/07/2023#{Ctrl+Tab}
{Ctrl+2}

# Indivdual Residence check box
{Tab}

# Individual Residence Clear check box
{Tab}

# Individual Residence Place
<
[?:var.zResidence!=nk]
[var.zResidence]
>
{del}
{Tab}

# Individual Residence Address
{Tab}

#--------------------------------------------------------
# Move to tab "Further info"
#03/07/2023#{Ctrl+Tab}
{Ctrl+3}

# Cursor is positioned on field "Minister" so need to go back 2 tabs
#03/07/2023#{Shift+Tab*2}

# Ref ID
{Ctrl+A}{Del}
[var.zArchiveReference]
{tab}

# Other info
{Ctrl+A}{Del}
[=:z_Record ID:[Record ID:split:/:1]]
<[?:z_Record ID=SCOT]FMP Record ID: [Record ID]>
{Tab}

# Minister
{Ctrl+A}{del}
<[?:Minister=nk][=:Minister:]>
<[Minister]>
{Tab}



<[?:var.Debug=0]

## DO NOTHING
>

[=:End:Add_AS_Baptism]

Add_AS_Baptism_Templated_Source

[=:Start:Add_AS_Baptism_Templated_Source]
#
# Autotype 1 Add baptism into Ancestral Sources
# Usage: [lib.Add_AS_Baptism_Templated_Source]
# ORA will ask for...
#    [Occupation]
#    [Abode]
#    [Research Place]
#
# Author: Alan
# Version Date        Description Change
# 15/05/2023 07:00    Created
# 06/07/2023          Extra tabs put in due to Ancestral Sources 7.7.7 upgrade for notifications
# 14/09/2023          Extra {tab} and {Enter} after field [Collection] removed. This {tab} and 
#                     {Enter} is in [lib.SetRepositoryAS].
# 07/02/2024          Amended to output space for fields that have "nk" (not known).
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
# 17/07/2024 BETA8_11 Checked for register type Baptisms and set to PR
#

# Service       Collection
# Ancestry      Norfolk, England, Church of England Births and Baptisms, 1813-1919
# Ancestry      London, England, Church of England Births and Baptisms, 1813-1923
# Findmypast    Lancashire Baptisms 1877-1897
#
{target=ancestral sources}

[==:var.Debug:1]

# Click "Edit Templated Source" button.
{Ctrl+Shift+T}

# Execution speed
{fast}

# Fill in missing fileds in FH Source template - Transfer to "Edited Templated Source".

# This is not possible because there is no Control or Function keys to do this...

# NB. If cursosr is not placed on the first field then the nymber of {Tab} 
# needs to be increased by 2 - one for Template name and one for Template
# Editor button.
#

# Template name
{Tab}

# Template Editor button
{Tab}

# Register Type Auto Fill
{tab}

# Register Type - PR or BT or NC
<[?:Register Type]
<
[?:Register Type:substring:1:6=Bishop]BT|
[?:Register Type=Baptisms]PR
>
>
{tab}

{Tab*25}

# Page number
<
[?:Page]
<[?:Page=nk]{space}|[lib.ValidateInputField:Page][Page]>
>
{Tab}

# Entry no
{tab}
<
[?:Entry no]
<[?:Entry no=nk]{space}|[lib.ValidateInputField:Entry no][Entry no]>
>
{Tab}



# Record Office
{tab}
<
[?:Page.ServiceName=Ancestry][Source.Part1]|
[?:Page.ServiceName=Findmypast][Archive]
>
{Tab}

#Reference
{Tab*2}

# Collection
{tab}
<
[?:Page.ServiceName=Ancestry][Source.Title]|
[?:Page.ServiceName=Findmypast]<[Record Set]< [Register year range]>>|
[?:Page.ServiceName=FamilySearch][Source.Collection]
>
# 14/09/2023 {Tab*3}{Enter}
{tab*2}


# Repository
# This is a problem - it's not possible to determine the focus point on the repository screen.
# If field is preset with "<No Repository selected>" (first time through) the starting point on
# repository screen puts focus on radio button "No Repository". 
# If a repository is selected and process is cancelled Ancestral Sources holds the abandoned 
# repository in memory so when you go back in the field is prefilled.
# 
# Tab past notification icon

[lib.SetRepositoryAS]
# Repository drop down box
#{Tab}

# URL
{tab}<[URL]|[Page.URL]>{tab*4}

# Research Place
{tab}[Research Place]{tab}

# OK
{Enter}

#***********
<[?:var.Debug=0]
#***********

## Do Nothing
>


[=:End:Add_AS_Baptism_Templated_Source]

Add_AS_Burial

[=:Start:Add_AS_Burial]
#
# Description: Add burial to Ancestral Sources
# Usage: [lib.Add_AS_Burial]
#

#
# Author: Alan
# Version Date       Reason for change
# ------------       ----------------------------------------------------------------------------
# 08/07/2023         Created
# 03/07/2023         New AS7.7.7 uses Control keys to move to different tabs
# 11/09/2023         Added [lib.ValidateInputField:Input Field] to [Ground], [Plot]
# 26/11/2023         Problem with field [Abode] in source type "Burial" when changing value to
#                    "NK" with ALT key it as it still held the value of "***Enter". Caused by
#                    [lib.ValidatePlace:] which changed value to space and ORA ignores spaces and
#                    reverted back to the field's original value.
#                    Therefore need to remove the change value field to space and only validate
#                    field for parts in [lib.ValidatePlace].
# 03/02/2024         If any field = nk (not known) ensure field is blank.
# 06/05/2024         Added [var.zArchiveReference].
#


# Service       Collection
# Ancestry      England & Scotland, Select Cemetery Registers, 1800-2016
#
{Target=Ancestral Sources}


# Execution speed
{fast}


#-------------------------------------------------------
# Tab "Main info"...
#03/07/2023# Place focus on [Place] field can only be done by {Ctrl+2}{Ctrl+1}
{Ctrl+2}{Ctrl+1}

# Burial place
<[Cemetery], >[var.zBurialPlace]{Tab*3}

[var.zBurialDate]{Tab*3}

# Issue with ages in Ancestral Sources
<[?:var.zDeathAge][lib.Fix_AS_Age:var.zDeathAge]>

{Tab*5}

# Death place
#[lib.ValidateInputField:Residence]
#[lib.ValidatePlace:Residence]
#[var.zResidence]
{tab*5}

# Occupation
{Del}{tab*2}

# Death Date
{Ctrl+A}{Del}
[var.zDeathDate]


#--------------------------------------------------------
# Tab "Residence"
#03/07/2023#{Ctrl+Tab}
{Ctrl+2}

{tab*8}

# Individual Residence Place
# 26/11/2023  [lib.ValidatePlace:var.zResidence]
<[?:var.zResidence=nk]{Ctrl+A}{del}|[var.zResidence]{del}>

#--------------------------------------------------------
# Move to tab "Family"
#03/07/2023#{Ctrl+Tab}
{Ctrl+3}

#--------------------------------------------------------
# Move to tab "Further Info"
#03/07/2023#{Ctrl+Tab}
{Ctrl+4}

# Ref ID
{CtrL+A}{Del}
<[var.zRefID]|[var.zArchiveReference]>
{Tab}

# Other info
{CtrL+A}{Del}
[var.OtherInfo]{Tab}

# Minister
{CtrL+A}{Del}
<[?:Minister=nk]|[lib.ValidateInputField:Minister][Minister]>

{Tab}


[=:End:Add_AS_Burial]

Add_AS_Burial_Templated_Source

[=:Start:Add_AS_Burial_Templated_Source]
#
# Autotype 1 Add baptism into Ancestral Sources
# Usage: [lib.Add_AS_Baptism_Templated_Source]
#
# Author: Alan
# Version Date        Description Change
# 08/07/2023          Created
# 06/07/2023          Extra tabs put in due to Ancestral Sources 7.7.7 upgrade for notifications
# 13/09/2023          Removed {tab}{Enter} that was used for the Repository drop down box which
#                     means that the start position for [lib.SetRepository] is [Repository] field.
# 27/09/2023          Included [zRegisterType] which involded reducing {tab*27} to {tab*25}.
# 01/02/2024          Updated to use common variable fields.
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
#

# Service       Collection
# Ancestry      England & Scotland, Select Cemetery Registers, 1800-2016
#
{target=ancestral sources}


[==:var.zDebug:1]

# Click "Edit Templated Source" button.
{Ctrl+Shift+T}

# Execution speed
{fast}

# Fill in missing fileds in FH Source template - Transfer to "Edited Templated Source".

# This is not possible because there is no Control or Function keys to do this...

# NB. If cursosr is not placed on the first field then the nymber of {Tab} 
# needs to be increased by 2 - one for Template name and one for Template
# Editor button.
#

# Template name
{Tab}

# Template Editor button
{Tab}

# Register Type
{tab}
<[?:var.zRegisterType][var.zRegisterType]|PR>
{tab}

{Tab*25}

# Page number
[lib.ValidateInputField:var.zPage]
[var.zPage]
{Tab}

# Entry no
{tab}[lib.ValidateInputField:var.zEntryNo]
[var.zEntryNo]
{Tab}

# Record Office
{tab}
[var.zRecordOffice]
{Tab}

#Reference
{Tab*2}

# Collection
{tab}
[var.zCollection]
{Tab}


# Repository
# This is a problem - its not possible to determine the focus point on the reository screen.
# If field is preset with "<No Repository selected>" (first time through) the starting point on
# repository screen puts focus on radio button "No Repository". 
# If a repository is selected and process is cancelled Ancestral Sources holds the abandoned 
# repository in memory so when you go back in the field is prefilled.
# 
# Tab past notification icon
{Tab}
# Repository drop down box
# 13/09/2023 {tab}{Enter}

[lib.SetRepositoryAS]
# Repository drop down box
#{Tab}

# URL
{tab}<[URL]|Page.URL>{tab}

# URL dropdown box
{Tab}

# Resource Date
{Tab*2}

# Research Place
{tab}[Research Place]{tab}


# OK
{Enter}


<[?:var.zDebug=0]

## Do nothing
>

[=:End:Add_AS_Burial_Templated_Source]

Add_AS_Census

[=:Start:Add_AS_Census]
{target=ancestral sources}

#
#
# Author: Alan
# Description: 

# Change History     Reason for change
# --------------     -------------------------------------------------------------------------------
# 15/05/2023 07:00   Created for 1911 & 1921
# 09/06/2023 07:00   Created for 1841 & 1851
# 09/06/2023 12:15   Created for 1871
# 10/06/2023 06:15   Created for 1881
# 10/06/2023 06:15   Changed parameter1 to pick up year from [Record Set]
# 10/06/2023 07:15   Created for 1891
# 01/08/2023 23:40   Generic creation of Census details inconjuncyion with [lib.SetFieldName]
# 17/10/2023 1.0     Conversion of persistent variables into variances.

# Usage: [lib.Add_AS_Census:Census Year] - prior to 10/06/2023 06:15
# Usage: [lib.Add_AS_Census] - post 10/06/2023 06:15

# Execution speed
{fast}

# Set up common fields
# 17/10/2023 1.0 [lib.SetFieldName:Census]

# Focus on PLACE field
{Ctrl+t}{Shift+tab*7}
#Place
[var.zFullAddress]
{Tab}
# Address
{Tab}
# Ref ID
# Clear field REF ID in case this is not the first time through.
{Ctrl+A}{Del}

# 1841-----------------------------------------------------------
<
[?:var.zCensusYear=1841]
[var.zCensusClass]
/
[var.zPiece]
/
[var.zBook]
/
[var.zFolio]
/
[var.zPage]
|
# 1851-----------------------------------------------------------
[?:var.zCensusYear=1851]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1861-----------------------------------------------------------
[?:var.zCensusYear=1861]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1871-----------------------------------------------------------
[?:var.zCensusYear=1871]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1881-----------------------------------------------------------
[?:var.zCensusYear=1881]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1891-----------------------------------------------------------
[?:var.zCensusYear=1891]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1901-----------------------------------------------------------
[?:var.zCensusYear=1901]
[var.zCensusClass]/[var.zPiece]/[var.zFolio]/[var.zPage]/[var.zSchedule]
|
# 1911-----------------------------------------------------------
[?:var.zCensusYear=1911]
[var.zCensusClass]/[var.zPiece]/[var.zSchedule]
|
# 1921-----------------------------------------------------------
[?:var.zCensusYear=1921]
[var.zCensusClass]/[var.zPiece]/[var.zSchedule]
>

{Tab}
# Other Info
# Clear field OTHER INFO in case this is not the first time through.
{Ctrl+A}{Del}

RD: <[var.zRegistration district], >
SD: <[var.zSub district], >
ED: <[var.zEnumeration district:uppercase]>

[=:End:Add_AS_Census]

Add_AS_Census_Canada

#[=:Start:Add_AS_Census_Canada]
{target=ancestral sources}

#
#
# Author: Alan
# Description: 

# Change History      Reason for change
# --------------      ----------------------------------------------------------------------------
# 25/07/2024 BETA9_8  Add Canada Federal Census for 1851 - 1931, 1906, 1916.

# Usage: [lib.Add_AS_Census_Canada]

# Execution speed
{fast}

# Focus on PLACE field
{CTRL+T}{SHIFT+TAB*7}


# Validate Province
<
[?:Province:length=2]
[=:ProvinceName:[Province:full:ca_states]]
|
[=:ProvinceAbbr:[Province:abbr:ca_states]]
>


<
# -----------------------------------------------------------1851
[?:var.zCensusYear=1851]

# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[Town_City], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1861
|
[?:var.zCensusYear=1861]

# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[Town_City], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/[Post Office]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1871
|
[?:var.zCensusYear=1871]

# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[Town_City], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/[Post Office]{TAB}

# Other Info
{Ctrl+A}{DEL}
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1881
|
[?:var.zCensusYear=1881]


# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[House Number] [Street], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/SLC/11/[Source.Enumeration District]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1891
|
[?:var.zCensusYear=1891]


# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[House Number] [Street], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/SLC/11/[Source.Enumeration District]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1901
|
[?:var.zCensusYear=1901]


# Location
[=:Province_abbrev:[Province:abbr:ca_states]]
[House Number] [Street], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/SLC/11/[Source.Enumeration District]/[Sheet Number]/[Ward of City]{TAB}

# Other Info
[Number of Dwelling in Order of Visitation]/[Family Number]

# -----------------------------------------------------------1911
|
[?:var.zCensusYear=1911]

# Residence is made up of House number, Street, Town City (Municpality), Province and Country

[=:Province_abbrev:[Province:abbr:ca_states]]
[Full Address]{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]<[+:/][District Number]><[+:/][Sub-District Number]><[+:/][Source.Page]>{TAB}

# Other Info
{Ctrl+A}{DEL}
<[Dwelling House]><[+:/][Family Number]>

# -----------------------------------------------------------1921
|
[?:var.zCensusYear=1921]


# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
>
[=:Province_abbrev:[Province:abbr:ca_states]]
[House Number] [Street], [County], [Province], Canada{TAB*2}
{Ctrl+A}{DEL}
[Province_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]>/[Ward of City]{TAB}

# Other Info
[Number of Dwelling in Order of Visitation]/[Family Number]


# -----------------------------------------------------------1931
|
[?:var.zCensusYear=1931]


# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
>
[=:Province_abbrev:[Province:abbr:ca_states]]
[House Number] [Street Address], [County], [Province], Canada{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[Province_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]>/[Ward of City]{TAB}

# Other Info
[Dwelling Number]/[Family Number]


# -----------------------------------------------------------End of census years
|
[lib.ErrorMessage:Invalid Census Year]
>


#[=:End:Add_AS_Census_Canada]

Add_AS_Census_Templated_Source

[=:Start:Add_AS_Census_Templated_Source]
{target=ancestral sources}
# Author: Alan

# Description: Fills in the separate Templated Source screen
#              NB. When this template is used in a new project there is a new field that
#                  was entered in this source template - Other Info - and is in a different
#                  place in this script. In MEDOWS project first field - REPOSITORY - after
#                  15 tabs rather than 17 tabs.
 

# Version Date        Reason for change
# ------------        ---------------------------------------------------------------------
# Mar 2023            Initial creatin
# 12/09/2023 17:55    Number of fields being skipped was 1 too many. Focus was on wrong part
#                     of the [Repository]. Changed skip from 18 to 17.
# 17/10/2023 1.0      Conversion of persistent variables into variances.
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
# 24/07/2024 BETA9_7  New parameter to handle duplicate census templates in AS.
#                     Parameter [var.ASCensusSources] holds the number of censuses in Ancestral
#                     Sources. Currently, it is possible to have 2 - US and UK. US comes first and
#                     this means it is checked here and set up in [lib.SetWindowsUser].
# 25/07/2024 BETA9_8  New record type "Canada Frederal Census".
#                     Parameter [var.ASCensusSources] now has an additional count - 1 to 3.
#
# Usage: [lib.Add_AS_Census_Templated_Source]
# Parameter: E (Electoral Register)
#            space (Census)

[=:var.Debug:1]

# Click button "Edit Templated Source"
{Ctrl+Shift+t}
{500}

# Execution speed
{fast}

# If more than i census source exists in Ancestral Sources select UK. This is based on 3 
# censuses at the moment - Canada comes first, US comes second and then UK.
<
[var.ASCensusSources]
<[?:var.ASCensusSources=2]{Down}|[?:var.ASCensusSources=3]{Down*2}>
>


# Release 7.7.7 onwards uses "Carry-over" fields before actual and now needs more {tab}
{Tab*17}

# Repository
[lib.SetRepositoryAS]
{tab}

# Collection
<[Source.Title]|[Record set]>
{Tab*2}

# URL
<[URL]|[Page.URL]>
{Tab*5}

# Research Place
[Research Place]
{Tab}

# OK
{Enter}


# Debug lines
<[?:var.Debug=0]

# DO NOTHING
>

[=:End:Add_AS_Census_Templated_Source]

Add_AS_Census_Templated_Source_Canada

#[=:Start:Add_AS_Census_Templated_Source_Canada]
{target=ancestral sources}
# Author: Alan

# Description: Fills in the separate Templated Source screen
#              NB. When this template is used in a new project there is a new field that
#                  was entered in this source template - Other Info - and is in a different
#                  place in this script. In MEDOWS project first field - REPOSITORY - after
#                  15 tabs rather than 17 tabs.
 
# Canadage: [lib.Add_AS_Census_Templated_Source_Canada]

# Version Date        Reason for change
# ------------------  ---------------------------------------------------------------------
# 25/07/2024 BETA9_8  New record type "Canada Federal Census".


[=:var.Debug:1]

<
#----------------------------------------------------------------------1851
[?:var.zFactYear/1851|1861|1871|1881|1901|1906|1911|1916|1921|1931/]

# Click button "Edit Templated Source"
{CTRL+SHIFT+T}
{fast}
{TAB*9}

# District
[District]{TAB*2}

# District Number
<[District Number]>{TAB*2}

# Sub District
[Sub-District]{TAB*2} 

# Sub District Number
<[Sub-District Number]>{TAB*2}

# Enumeration District Number
<[Enumeration District Number]>{TAB*2}

# Page
[Source.Page]{TAB*2}

# Dwelling House
<[Dwelling House]>{TAB*2}


# Family Number
<[Family Number]>{TAB*2}

# Repository
[lib.SetRepositoryAS]{TAB}

# Ref
<[Dwelling House]></[Family Number]>{TAB*2}

# URL
<[URL]|Page.URL]>{TAB*3}

# Research Date
{TAB*2}

# Research Place
[Research Place]
{TAB}

# OK
{Enter}


# End of census checks
>

# Debug lines
<[?:var.Debug=0]

# DO NOTHING
>

#[=:End:Add_AS_Census_Templated_Source_Canada]

Add_AS_Census_Templated_Source_USA

#[=:Start:Add_AS_Census_Templated_Source_USA]
{target=ancestral sources}
# Author: Alan

# Description: Fills in the separate Templated Source screen
#              NB. When this template is used in a new project there is a new field that
#                  was entered in this source template - Other Info - and is in a different
#                  place in this script. In MEDOWS project first field - REPOSITORY - after
#                  15 tabs rather than 17 tabs.
 
# Usage: [lib.Add_AS_Census_Templated_Source_USA]

# Version Date        Reason for change
# ------------------  ---------------------------------------------------------------------
# 12/07/2024 BETA8_4  New record type "1910 US Census"
# 21/07/2024 BETA9_3  Add US Federal Census for 1850, 1860, 1870 & 1880


[=:var.Debug:1]

<
#----------------------------------------------------------------------1900
[?:var.zFactYear/1850|1860|1870|1880|1900|1910|1920|1930|1940|1950/]

# Click button "Edit Templated Source"
{CTRL+SHIFT+T}
{fast}
{TAB*9}
# Super District No
11{TAB*2}
# Remove leading zeros with RegEx of "replace:^0+"
<[Source.Enumeration District:replace:^0+]>{TAB*2}
<[Sheet Number]|[Source.Page]>{TAB*2}

<
[Ward of City]
|
# Residence is made up of Ward or Town City, County and State
<
[?:Residence:split:,:1/Ward/][==:Ward of City:[Residence:split:,:1:extract:\d+]]
>
>
{TAB*2}

<[Number of Dwelling in Order of Visitation]|[Number of Household in Order of Visitation]|[Dwelling Number]>{TAB*2}
<[Family Number]>{TAB*2}

# Civil Division
{TAB*2}

# Repository
[lib.SetRepositoryAS]{TAB}

# Ref
<[Dwelling Number]|[Number of Household in Order of Visitation]></[Family Number]>{TAB*2}

# URL
<[URL]|Page.URL]>{TAB*3}

# Research Date
{TAB*2}

# Research Place
[Research Place]
{TAB}

# OK
{Enter}

#----------------------------------------------------------------------1910
|
[?:var.zFactYear=1910]


#----------------------------------------------------------------------1920
|
[?:var.zFactYear=1920]


#----------------------------------------------------------------------1930
|
[?:var.zFactYear=1930]


#----------------------------------------------------------------------1940
|
[?:var.zFactYear=1940]


#----------------------------------------------------------------------1950
|
[?:var.zFactYear=1950]

# End of census checks
>

# Debug lines
<[?:var.Debug=0]

# DO NOTHING
>

#[=:End:Add_AS_Census_Templated_Source_USA]

Add_AS_Census_USA

#[=:Start:Add_AS_Census_USA]
{target=ancestral sources}

#
#
# Author: Alan
# Description: 

# Change History      Reason for change
# --------------      ----------------------------------------------------------------------------
# 12/07/2024 BETA8_4  New record type "1910 Census".
# 21/07/2024 BETA9_3  Add US Federal Census for 1850, 1860, 1870 & 1880.

# Usage: [lib.Add_AS_Census_USA]

# Execution speed
{fast}

# Focus on PLACE field
{CTRL+T}{SHIFT+TAB*7}


# Validate State
<
[?:State:length=2]
[=:StateName:[State:full:us_states]]
|
[=:StateAbbr:[State:abbr:us_states]]
>


<
# -----------------------------------------------------------1850
[?:var.zCensusYear=1850]

# Location
[=:State_abbrev:[State:abbr:us_states]]
[Town_City], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1860
|
[?:var.zCensusYear=1860]

# Location
[=:State_abbrev:[State:abbr:us_states]]
[Town_City], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/[Post Office]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1870
|
[?:var.zCensusYear=1870]

# Location
[=:State_abbrev:[State:abbr:us_states]]
[Town_City], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/[Post Office]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1880
|
[?:var.zCensusYear=1880]


# Location
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1900
|
[?:var.zCensusYear=1900]


# Location
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District]/[Sheet Number]/[Ward of City]{TAB}

# Other Info
[Number of Dwelling in Order of Visitation]/[Family Number]

# -----------------------------------------------------------1910
|
[?:var.zCensusYear=1910]

# Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
>
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/[Sheet Number]/[Ward of City]{TAB}

# Other Info
[Number of Dwelling in Order of Visitation]/[Family Number]

# -----------------------------------------------------------1920
|
[?:var.zCensusYear=1920]


# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
>
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street], [County], [State], USA{TAB*2}
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]>/[Ward of City]{TAB}

# Other Info
[Number of Dwelling in Order of Visitation]/[Family Number]


# -----------------------------------------------------------1930
|
[?:var.zCensusYear=1930]


# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
>
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street Address], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]>/[Ward of City]{TAB}

# Other Info
[Dwelling Number]/[Family Number]

# -----------------------------------------------------------1940
|
[?:var.zCensusYear=1940]


# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
|
[=:zTown_City:[zWard_Town]]
>
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street], [zTown_City], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]></[Ward of City]>{TAB}

# Other Info
[Number of Household in Order of Visitation]</[Family Number]>

# -----------------------------------------------------------1950
|
[?:var.zCensusYear=1950]

# Location - Residence is made up of Ward or Town City, County and State
[=:zWard_Town:[Residence:split:,:1]]
<
[?:zWard_Town/Ward/][==:Ward of City:[zWard_Town:extract:\d+]]
|
[=:zTown_City:[zWard_Town]]
>
[=:State_abbrev:[State:abbr:us_states]]
[House Number] [Street Name], [zTown_City], [County], [State], USA{TAB*2}

# Ref ID
{Ctrl+A}{DEL}
[State_abbrev]/SLC/11/[Source.Enumeration District:replace:^0+]/<[Sheet Number]|[Source.Page]></[Ward of City]>{TAB}

# Other Info
[Dwelling Number]</[Family Number]>


# -----------------------------------------------------------End of census years
|
[lib.ErrorMessage:Invalid Census Year]
>


#[=:End:Add_AS_Census_USA]

Add_AS_ElectoralRegister

[=:Start:Add_AS_ElectoralRegister]
{target=ancestral sources}

#
#
# Author: Alan
# Change History     Reason for change
# ----------------   -------------------------------------------------------------------------
# 02/08/2023 08:50   Created
# 22/09/2023         Added [Reference number] and [z_FullAddress] and [Parliamentary Division]
# 24/09/2023         Added [Ward or Division Constituency]
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#


# Usage: [lib.Add_AS_ElectoralRegister]

# Execution speed
{fast}

# Set up common fields
[=:zFactType:Electoral Register]

# Focus on PLACE field
{Ctrl+t}{Shift+tab*7}
#Place
[var.zFullAddress]
{Tab}
# Address
{Tab}
# Ref ID
# Clear field REF ID in case this is not the first time through.
{Ctrl+A}{Del}<[Source.Reference:uppercase]|[Reference number]>{tab}

# Other Info
# Clear field OTHER INFO in case this is not the first time through.
{Ctrl+A}{Del}
<Parliamentary Division: [Parliamentary Division], >
<Ward: [Ward or Division Constituency], >
<Ward: [Ward], >
<Electoral No: [Electoral No], >
<District: [Electoral District], >
<Polling District: [Polling District]>


[=:End:Add_AS_ElectoralRegister]

Add_AS_ElectoralRegister_Templated_Source

[=:Start:Add_AS_ElectoralRegister_Templated_Source]
{target=ancestral sources}
# Author: Alan
# Description: Fills in the separate Templated Source screen
#              NB. When this template is used in a new project there is a new field that
#                  was entered in this source template - Other Info - and is in a different
#                  place in this script. In MEDOWS project first field - REPOSITORY - after
#                  15 tabs rather than 17 tabs.
#

# Change History     Reason for change
# --------------     -----------------------------------------------------------------------
# 02/08/2023         Created
# 17/09/2023 11:30   Changed number of tabs before [Repository] to 17.
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
#

# Usage: [lib.Add_AS_ElectoralRegister_Templated_Source]
# Parameter: E (Electoral Register)
#            space (Census)

[=:z_FactType:Electoral Register]

# Click button "Edit Templated Source"
{Ctrl+Shift+t}
{250}

# Execution speed
{fast}

# Release 7.7.7 onwards uses "Carry-over" fields before actual and now needs more {tab}
{Tab*17}

# Repository
[lib.SetRepositoryAS]

# Step over AS "carry-over" for Collection
{Tab}

# Collection
#[=:CollectionType:{1}]
<[Source.Title]|[Record set]>
{Tab*2}


# URL
<[URL]|[Page.URL]>
{Tab*5}

# Research Place
[Research Place]{tab}

# OK
{Enter}

[=:End:Add_AS_ElectoralRegister_Templated_Source]

Add_AS_Image_v4

{target=ancestral sources}
[=:Start:Add_AS_Image_v4]
#
# Description: 
#
# Change History     Reason for change
# --------------     -------------------------------------------------------------------
# 23/09/2023         Introduced check for source type BANNS
# 26/09/2023         Added check for Register Type (PR=Parish Records, BT=Bishop Transcripts,
#                    NC=Non Conformist] as it is now impossible to rely on parameter {3}.
#                    Findmypast collection "Yorkshire Burials" contained BT and PR for the 
#                    same person (Mary Ann Doubtfire d 1865).
# 26/09/2023         Only BT and NC should be apended to fact type for media creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#                    Complete rewrite using [var.z_MediaSource] created by [lib.SetFieldName]
#                    which was called by [lib.SetFolderPathDisplay_v1].

#

# Usage: [lib.Add_AS_Image_v4]

# {1} - Event Folder --> Births, Deaths, Marriages, Census
# {2} - Fact Type --> Birth, Baptism, Marriage, Death, Burial, Census, 1939, Register
# {3} - Register Type --> Bishop's Transcripts (BT), Non-Conformist (NC), Parish Record (PR)
#       NB. {3} can't be used so best to use [var.z_RegisterType]
#
# Information needed...
# Folder to save in
# Fact Type
# Fact Year
# Full Name
#
[==:var.Debug:1]

# Execution speed
{slow}
{1250}

# Start media insert
{Ctrl+Shift+i}
{2000}
# Find image file
{Alt+f}
{2000}

# Execution speed
{slow}

[var.zMediaSource]

# Open file image.
{Enter}

# Execution speed
{1000}

# Save Image to Family Historian window.
{Alt+S}

# Accept suggested Family Historian folder. 28/7/2023 how does AS select the folder???
{Enter}

# Exit Image Viewer window
{1000}
{Esc}

#***********
<[?:var.Debug=0]
#***********
# Do nothing
>
[=:End:Add_AS_Image_v4]

Add_AS_Marriage

[=:Start:Add_AS_Marriage]
#
# Author: Alan
# Description: 
# Usage: [lib.Add_AS_Marriage]
#
# Flow of script was being affected depending on whether the baptism age or birth date 
# appears in the ORA Penel.
#
#
# Change History     Reason for change
# ----------------   -------------------------------------------------------------------------
# 28/05/2023 07:00   Created
# 10/09/2023         Reduced {tab*16} to {tab*15} for Spouse Father Occupation
# 16/09/2023         Number of skip fields reduced from 16 to 15 on the Parents section.
# 17/09/2023         Number of skip fields increased from 15 to 16 on the Parents section.
#                    Individual: Rex Munro Paterson
#                    Service: Ancestry; 
#                    Collection: Westminster, London, England, Church of England Marriages and
#                                 Banns, 1754-1935
# PROBLEM: LOOK OUT FOR NEXT CHANGE
# 18/09/2023         Number of skip fields decreased from 16 to 15 on the Parents section.
#                    Individual: Frederick John Colegate
#                    ervice: Ancestry; 
#                    Collection: London, England, Church of England Marriages and Banns, 1754-1938
# PROBLEM: LOOK OUT FOR NEXT CHANGE
#
# Solution: If a mother does not exist in Family Historian then {tab*15} else {tab*16}.
#           New field [Grooms Mother] introduced. If field = "n" {tab*15} else {tab*16}. 
# 20/09/2023         Added [Place] to the marriage place as this was identified in 
#                    collection Warwickshire Marriages in service Findmypast.
# 23/09/2023         New field [Marriage Banns Date] and [Marriage Banns Place] for source
#                    type "BANNS".
#                    NB. Need to convert field sto use [z_*] fields.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 19/02/2024         Checked for nk for Spouse Father, Individ Father Occ. and Minister.
#

# Service       Collection
# Ancestry      Surrey, England, Church of England Marriages and Banns, 1754-1937
#
{Target=Ancestral Sources}


[=:Debug:1]

# Execution speed
{fast}


#-------------------------------------------------------
# Tab "Main info"...
# Ensure cursor is on place field
{Ctrl+2}{Ctrl+1}
# Place
#<[Parish]|[Marriage Place]|[place]|[Marriage Banns Place]>
[var.zMarriagePlace]
{Tab}

# Address
{Tab}

# Church drop down
{Tab}

# Marriage Date
#<[Event Date]|[Marriage Date]|[Marriage Banns Date]>
[var.zFactDate]

# Bypass fields - Indivudal Name, Individual reset
{Tab*3}


<[?:Occupation=nk][=:Occupation:]>
[Occupation]
{Tab}

# Jump over other fields
{Tab*5}

# Marriage Type
[lib.SetMarriageType]


#--------------------------------------------------------
# Tab "Marriage Details"
{Ctrl+2}

# Move to first available field
#{Tab}

# ****** INDIVIDUAL
# Indivdual Marriage Status
<
[?:Individual Marriage Status=b][=:Individual Marriage Status:Bachelor]
|
[?:Individual Marriage Status=w][=:Individual Marriage Status:Widower]
>
[lib.ValidateInputField:Individual Marriage Status]
[Individual Marriage Status]
{Tab}

# Indvidual Religion
{Tab}

# Individual Age

# f = Full Age
[lib.ValidateInputField:Individual Age]
# Issue with ages in Ancestral Sources
<[?:Individual Age!=f][lib.Fix_AS_Age:Individual Age]>


{Tab}


# Jump over other fields
{Tab*4}

# Individual Residence
[Individual Residence]
[lib.ValidateInputField:Individual Residence]
{Tab}

# Individual Residence Clear check box
#{Tab}


# Jump over other fields
{Tab*5}

# ****** SPOUSE

# Spouse Marriage Status
<
[?:Spouse Marriage Status=s][=:Spouse Marriage Status:Spinster]
|
[?:Spouse Marriage Status=w][=:Spouse Marriage Status:Widow]
>
[Spouse Marriage Status]
[lib.ValidateInputField:Spouse Marriage Status]
{Tab}

# Spouse Religion
{Tab}

# Spouse Age
[lib.ValidateInputField:Spouse Age]
# Issue with ages in Ancestral Sources
<[?:Spouse Age!=f][lib.Fix_AS_Age:Spouse Age]>
{Tab}


# Jump over other fields
{Tab*4}

# Spouse Residence
[Spouse Residence]
[lib.ValidateInputField:Spouse Residence]
{Tab}

# Spouse Residence Clear check box
#{Tab}


# Jump over other fields
{Tab*2}



#--------------------------------------------------------
# Tab "Parents"
{Ctrl+3}
# Skip fields
{tab*3}
# Individual Father Deceased
<[?:Individual Father Deceased=y]{Space}>
{tab}

# Individual Father Occupation
<[?:Individual Father Occupation!=nk]
[lib.ValidateInputField:Individual Father Occupation]
[Individual Father Occupation]
>

# 18/09/2023 Skip fields
<[?:Grooms mother=n]{tab*15}|{tab*16}>

# Spouse Father Deceased
<[?:Spouse Father Deceased=y]{Space}>
{tab}

# Spouse Father Occupation
<
[?:Spouse Father Occupation]
<[?:Spouse Father Occupation!=nk]
[lib.ValidateInputField:Spouse Father Occupation]
[Spouse Father Occupation]
>
|
[?:Spouse's father's occupation]
<[?:Spouse's father's occupation!=nk]
[lib.ValidateInputField:Spouse's father's occupation]
[Spouse's father's occupation]
>
>




#--------------------------------------------------------
# Move to tab "Further info"
{Ctrl+4}

# Ref ID
{Ctrl+A}{Del}
<[var.zArchiveReference]|[Source.Reference Number:uppercase]|[Source.Reference:uppercase]|[Reference Number:uppercase]>{Tab}

# Other info
{Tab}

# Minister
{Ctrl+A}{Del}
[lib.ValidateInputField:Minister]
<[?:Minister!=nk][Minister]>
{Tab}



#*********
<[?:Debug=0]
#*********

## Do Nothing
>


[=:End:Add_AS_Marriage]

Add_AS_Marriage_Templated_Source

[=:Start:Add_AS_Marriage_Templated_Source]
#
# Usage: [lib.Add_AS_Marriage_Templated_Source]
#
# Author: Alan

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 15/05/2023 07:00     Created
# 10/09/2023 08:20     Had to change {Tab*40} to {Tab*39} as record office not put in
#                      Error occurred on collection for Howard Hodgson
#                      Nottinghamshire, England, Church of England Marriages and Banns, 1754-1937
# 10/09/2023 08:30     Added extra {Tab} before [SetRepoistortAS] for same as above collection.
# 16/09/2023           Removed the extra {tab}{Enter} that was in front of [lib.SetRepository] as
#                      the {tab}{Enter} was put in [lib.SetRepository].
#                      Added [Collection] for repository Ancestry.
# 27/09/2023           Changed Register Type to pick up field [z_RegisterType]
# 06/04/2024           Changed [lib.SetResearchPlace] to [Research Place].
# 13/07/2024 BETA8_6   Conditionlised [var.zRegisterType] in case field blank.
# 13/07/2024 BETA8_9   Add extra check for Records Office.

#

# Service       Collection
# Ancestry      Norfolk, England, Church of England Births and Baptisms, 1813-1919
# Ancestry      London, England, Church of England Births and Baptisms, 1813-1923
#
{Target=Ancestral Sources}

[=:Debug:1]

{Ctrl+Shift+t}

# Execution speed
{fast}

# Fill in missing fileds in FH Source template - Transfer to "Edited Templated Source".

# This is not possible because there is no Control or Function keys to do this...

# NB. If cursosr is not placed on the first field then the nymber of {Tab} 
# needs to be increased by 2 - one for Template name and one for Template
# Editor button.
#

# Template name
{Tab}

# Template Editor button
{Tab}

# Register Type
#{tab}<[?:Record set/Non-Conformist/]NC>
{tab}<[var.zRegisterType]>

# Skip fields
{Tab*14}

# Page number
<
[?:Page=nk][=:Page:]
|
[lib.ValidateInputField:Page]
>
[Page]
{Tab}

# Entry no
{tab}
<
[?:Entry no=nk][=:Entry no:]
|
[lib.ValidateInputField:Entry no]
>
[Entry no]
{Tab}

# Bypass fields
{Tab*39}

# Record Office
<
[?:Page.ServiceName=Ancestry]
[Source.Part1]
|
[?:Page.ServiceName=Findmypast]
[Archive]
>
{tab}

# Reference
{tab}{tab}

# Repository
{tab}
# 16/09/2023 {Tab}{Enter}
[lib.SetRepositoryAS]


# Collection
{tab}
<
[?:Page.ServiceName=Ancestry]
[Source.Title]
|
[?:Page.ServiceName=Findmypast]
[Record Set]< [Register year range]>
>
{tab}

# URL
{tab}<[URL]|[Page.URL]>{tab}

# URL dropdown box
{Tab}

# Resource Date
{tab}{tab}

# Research Place
{tab}[Research Place]
{tab}

# OK
{Enter}



#*************
<[?:Debug=0]
#*************

## Do nothing
>

[=:End:Add_AS_Marriage_Templated_Source]

Add_Banns

[=:Start:Add_Banns]
#
# Author: Alan
# Version Date        Reason for change
# -----------------   -------------------------------------------------------------------------------
# 21/05/2023 20:30    First attempt
# 30/04/2024 BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
#
# Collection : London, England, Church of England Marriages and Banns, 1754-1938
#
# Usage : [lib.Add_Banns]
#


# Create media folder name
#     Folder Path format = C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\
#Execute code at this speed
{fast}
[lib.SetWindowsUser]
[lib.SetFolderPath:Marriages]


#Execute code at this speed
{slow}


# Move focus to the Source pane.
{Ctrl+U}

# Add "New Source from Template" citation.
{Ctrl+I}{Down*2}{Enter}

# Select Source Template.
{Ctrl+D}Marriage Banns{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template.

[==:Principal2 Name]
[==:Gender]
# This only works if Male is selected. Its a problem if putting in Female.
<[?:Gender=m][=:WifesName:[Principal2 Name]]>
<[?:Gender=f][=:HusbandsName:[Principal2 Name]]>
<[?:Gender=m][=:HusbandsName:[Name]]>
<[?:Gender=f][=:WifesName:[Name]]>



# Principal 1 is the record being processed
# Husband's surname
[HusbandsName:nameSurname]{Tab}

# Husband's given name(s)
[HusbandsName:nameGiven]{Tab}

# Wife's surname
[WifesName:nameSurname]{Tab}

# Wife's given name(s)
[WifesName:nameGiven]{Tab}


# Marriage Banns Year
[Marriage Banns Date]{Tab}

# Marriage Banns Location
[Marriage Banns Place]
{Tab}


# Collection
[Source.Title]{Tab}

# 
# Repository - 1st line selects drop down box & 2nd selects the repository
{Space}{Down}{Enter}
{Ctrl+D}[Page.ServiceName]{F6}{Space}{Enter}{Tab}

# URL Husband
<[?:Gender=m][Page.URL]]>{Tab}

# URL Wife
<[?:Gender=f][Page.URL]]>{Tab}

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]
{Tab}

# Data Quality Assessment --> P = Primary
[=:Assessment_U_Q_S_P:P]]
P{Down*5}
{Tab}


# Move to Media tab.
{Ctrl+Tab}
{Ctrl+Tab}
{Ctrl+Tab}

# Insert from File for Husband
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]Marriage Banns, [Marriage Banns Date:dateYear], [HusbandsName:nameSurname] [HusbandsName:nameGiven] & [WifesName:nameSurname] [WifesName:nameGiven].jpg{Enter}

# Add file to FH folder
Marriages
{Enter}


# Insert from File for Wife
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]Marriage Banns, [Marriage Banns Date:dateYear], [WifesName:nameSurname] [WifesName:nameGiven] & [HusbandsName:nameSurname] [HusbandsName:nameGiven].jpg{Enter}


# Add file to FH folder
Marriages
{Enter}


[=:End:Add_Banns]

Add_Burial_cite_Cemetery

[=:Start:Add_Burial_cite_Cemetery]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Version Date        Reason for change
# ------------------- ---------------------------------------------------------------------------
# 12/09/2023 09:50    Created
# 30/04/2024 BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].

#
# Usage: [lib.Add_Burial_cite_Cemetery]
#
# Parameters...
#      None
# Variables...
#      None
#

# Execution Speed
{slow}

# If no source type provided ORA still puts a value of /{1}/ into parameter.
#[==:RecordType:{1}]

# Add fact==========================================================================
[lib.Add_FH_Fact:Burial:zBurialDate:zBurialPlace]

# Validate Burial Place
[lib.ValidatePlace:zBurialPlace]

# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# 

# Move focus to the Source pane.
{Ctrl+U}

# Add "Cite existing source..." citation.
{Ctrl+I}{Down}{Enter}
{Ctrl+D}

# Save citation in order to reposition to correct tab --> FH fault
[lib.SetSourceCitation]
[zSourceCitation] 
{F6}{Space}{Enter}


[lib.Add_FH_Citation:PR Burial]


#Execute code at this speed
{fast}


# Fill in source template.---------------------------------

# Record Type
{tab}

# Burial Place --> Church or Cemetery
[Burial Place]{tab}

# Parish
{tab}

# Place --> Location
[Burial Place]{tab}

# Given name(s)
[zGivenName]{tab}

# Surname
[zSurname]{tab}

# Occupation
{tab}

# Spouse or parent
{tab}

# Abode
{tab}

# Burial date
<[?:zBurialDate][zBurialDate]
|[?:zBurialYear][zBurialYear]>{tab}

# Death date
<[?:zDeathDate][zDeathDate]
|[?:zDeathYear][zDeathYear]>{tab}

# Age at Death
{tab}

# Birth date
{tab}

# Page
<[Page]|[Page Number]>{tab}

# Entry Number
{tab}

# Record office
{tab}

# Reference
{tab}

# Collection
[zCollection]{tab}

# Repository
[lib.SetRepository]{tab}

# URL
<[URL]|[Page.URL]>{tab}

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]{TAB}


# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:P]


# Move to Media tab.
{Ctrl+Tab}
{Ctrl+Tab}
{Ctrl+Tab}

# Insert from File
#####[lib.GetMedia]


#***********
<[?:Debug=0]
#***********

## Do nothing
>




[=:End:Add_Burial_cite_Cemetery]

Add_Death_cite_Probate

[=:Start:Add_Death_cite_Probate]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Change History     Reason for change
# ----------------   ---------------------------------------------------------------------
# 19/05/2023 09:50   Created
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#
# Usage: [lib.Add_Death_cite_Probate]
#
# Parameters...
#      None
# Variables...
#      None
#

# Execution Speed
{slow}

# If no source type provided ORA still puts a value of /{1}/ into parameter.
#[==:SourceType:{1}]

# Add fact==========================================================================

# Death Place
<[?:var.zDeathPlace=nk]|[lib.ValidatePlace:var.zDeathPlace]>
[lib.Add_FH_Fact:Death:var.zDeathDate:var.zDeathPlace]


# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# 

# Move focus to the Source pane.
{Ctrl+U}

# Add "Cite existing source..." citation.
{Ctrl+I}{Down}{Enter}
{Ctrl+D}

[lib.SetSourceCitation]
[var.zSourceCitation] 
{F6}{Space}{Enter}




[=:End:Add_Death_cite_Probate]

Add_FH_Citation


#
# Title: Add citation template typically from custom FH7 Custom Sources.
# Description: The routine can be called from a fact but can be called from menu if entering
#              a source before the fact.
#
# Author: Alan
# Version Date           Description Change
# 31/05/2023 08:15       Initial creation
# 
# Usage : [lib.Add_FH_Citation:citation template name:EXISTing source:Menu]

# Parameters:
#  {1} is the citation template. ie GRO Birth, SCI Death, PR Baptism, etc
#  {2} EXIST = use existing source. Default is always to add new source citation
#  {3} Set to "Menu" then add citation is called from the menu rather from a fact
#
# Input Variables: 
# Output Variables: 
#

[=:var.Debug:1]


#Execute code at this speed
{slow}

# Set up parameters
[=:Param1:{1}]
[=:Param2:{2}]
[=:Param3:{3}]
#1--------------------------------------------------------------------------
<
# Starting point from the menu (source driven fact)
[?:Param3=Menu]
{Alt+a}uu{right}

<
# Add existing citation
[?:Param2=Exist]{down*2}{Enter}
|
# Add new citation
{Enter}

>

|
#-----------------------------------------------------------------------------------
# Starting point is a fact in the Facts tab in the Property box.

# Move focus to the Source pane.
{Ctrl+U}

# Add citation
{Ctrl+I}

#2------------------------------------------------------------------------
<
# Add existing citation
[?:Param2=Exist]{down}

|
# Add generic source
[?:Param1=None]{Down*3}


|
# Add "New Source from Template" citation.
{Down*2}
#E2e
>
{Enter}

>

# Use existing source citation
<
[?:Param2=Exist]
[lib.SetSourceCitation]
{Ctrl+D}[var.zSourceCitation]{F6}{Space}{Enter}
|
[?:Param1!=None]
# Select Citation Template.
{Ctrl+D}{1}{F6}{Space}{Enter}
>


#***********
<[?:var.Debug=0]
#***********
## Do Nothing
>


Add_FH_Fact

# Add_FH_Fact
#
#
# Author: Alan
# Description: Generic add a fact.  Starting focus point on Individuals Main Property page in
#              Facts tab.

# Change History          Reason for change
# --------------          -----------------------------------------------------------------------
# 28/09/2023              Change the method of checking for [EventTypeTest] from an exact match
#                         to a string search

# template usage parameters : ie 
# usage : [lib.Add_FH_Fact:fact name:fact date:Place]
#  {1} is the fact type, ie Occupation, Residence, etc
#  {2} is the fact Date field
#  {3} is the Place field

# Execution speed
{slow}

# search and insert the Fact Type from the list
{Ctrl+I}{1}{enter}

# Event Type Test
[=:EventTypeTest:{1}]

# If a marriage then assume that only 1 spouse involved and both husband and wife already entered.
<
[?:EventTypeTest/Marriage/]{tab}{Enter}
>


# complete the fact field entries...
{tab}
# Fact Date
<
[?:{2}/-/][{2}:prepend:Between ]
|
<[{2}]>
>
{tab}
# NB. Sometimes an AGE field is included so need to hard code to bypass
# NNB. Need to analyse currents facts to see sequence of fields.
#Age - not on burial
<
[?:EventTypeTest!=Burial]{Tab}
>

# Place

<[?:{3}=nk]|[{3}]>
{tab}


#Ctrl+U as part of the add citation routine does not work if in a NOTE field so do not use {tab}
# on last field - ADDRESS


Add_Residence_cite_Probate

[=:Start:Add_Residence_cite_Probate]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Change History     Reason for change
# ----------------   ----------------------------------------------------------------------
# 19/05/2023 09:50   Created
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#
# Usage: [lib.Residence_cite_Probate]
#
# Parameters...
#      None
# Variables...
#      None
#

# Execution Speed
{slow}

# If no source type provided ORA still puts a value of /{1}/ into parameter.
#[==:SourceType:{1}]

# Add fact==========================================================================


# Residence Place
<[?:var.zResidencePlace=nk]|[lib.ValidatePlace:var.zResidencePlace]>
[lib.Add_FH_Fact:Residence:var.zDeathDate:var.zResidencePlace]


# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# 

# Move focus to the Source pane.
{Ctrl+U}

# Add "Cite existing source..." citation.
{Ctrl+I}{Down}{Enter}
{Ctrl+D}

[lib.SetSourceCitation]
[var.zSourceCitation] 
{F6}{Space}{Enter}


[=:End:Residence_cite_Probate]

AddBaptism

#
# Author: 
# Description: 
# Usage: [lib.Baptism:Fact]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 25/01/2024 14:00   First attempt



#[==:var.debug:1]


# ===============Add Fact=============================================================

# Add Baptism fact.
{Ctrl+I}[var.zFactType]{Enter}
<
[?:var.zFactType=Baptism]
>
{Tab}

#Execute code at this speed
{fast}

# Birth
c. [var.zBirth] 
{Tab*2}

#Baptism
[var.zBaptismDate]

# Baptism Place
[var.zBaptismPlace]




# ===============Add Citation=============================================================

# Select Source Template.
[lib.Add_FH_Citation:None]

#Execute code at this speed
{fast}


# Fill in source template "Baptism".
[lib.WriteBaptism]



#<[?:var.Debug=0]

## Do nothing
#>

AddImageLinktoTFS

[=:start:AddImageLinktoTFS]
# AddImageLinktoTFS
# Author : Paul Tanner-Tremaine
# www.fhora.tantrem.com
# v 1.01 last updated 5 Aug 2023
#
# usage [lib.AddImageLinktoTFS:url:linkdesc]

{fast}
# move and select the web link
{SHIFT+F10}{250}{UP*2}{RIGHT}{DOWN}{ENTER}{250}
#write the URL
[{1}]
#write the hyperlink wording
{tab}
[{2}]

[=:end:AddImageLinktoTFS]

AddRecordLinktoTFS

[=:start:AddRecordLinktoTFS]
# AddrecordLinktoTFS
# Author : Paul Tanner-Tremaine
# www.fhora.tantrem.com
# v1.01 last updated 5 Aug 2023
#
# usage [lib.AddRecordLinktoTFS:url:zURLhrefdesc]

{fast}
# move and select the web link
{SHIFT+F10}{250}{UP*2}{RIGHT}{DOWN}{ENTER}{250}
#write the URL
[{1}]
#wite the hyperlink wording
{tab}
[{2}]

{enter}

[=:end:AddRecordLinktoTFS]

AS_Reset

#{target=ancestral sources}

# Change history   Reason for change
# --------------   --------------------------------------------------------------------
# 26/02/2024       Change {down*16} to {down*22} because the reset was not working.
# 27/02/2024       Change the method of resetting as it was inconsistent.

# Usage: [lib.AS_Reset]

{fast}
#{Alt+E}{down*23}{Enter}{tab}{Enter}
{Alt+E}ss{Enter}{tab}{Enter}

AS-Age

# Usage: [lib.AS-Age:field-name]
# Description: Converts an age value to Auto Type keystrokes valid in Ancestral Sources Age-type cells. Converts digit characters and "y", "m", and "d" in the value to "{c}" to avoid an issue where Ancestral Sources ignores characters typed by ORA into Age-type fields. Other characters are ignored. For example, "14 MOS" becomes "{1}{4}{m}". Special case: zero must be sent as {NUMPAD0}.

# Version: 0.5.0

[=:asa.age:[{1}:replace:[^0-9ymd]::gi]]
[asa.age:lowercase:replace:([1-9ymd]):{$1}:g:replace:0:{NUMPAD0}:g]

AS-Census-Canada

{target=ancestral sources}

# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# CANADAge:[lib.AS-Census-CANADA]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".


{fast}

<
[?:var.zFactYear=1851][lib.AS-Census-CANADA_1851]
|
[?:var.zFactYear=1861][lib.AS-Census-CANADA_1861]
|
[?:var.zFactYear=1871][lib.AS-Census-CANADA_1871]
|
[?:var.zFactYear=1881][lib.AS-Census-CANADA_1881]
|
[?:var.zFactYear=1901][lib.AS-Census-CANADA_1901]
|
[?:var.zFactYear=1901][lib.AS-Census-CANADA_1906]
|
[?:var.zFactYear=1911][lib.AS-Census-CANADA_1911]
|
[?:var.zFactYear=1911][lib.AS-Census-CANADA_1916]
|
[?:var.zFactYear=1911][lib.AS-Census-CANADA_1921]
|
[?:var.zFactYear=1911][lib.AS-Census-CANADA_1931]
#----------------------------------------------------------------------Invalid census year
|
[lib.ErrorMessage: No valid census year]
>

AS-Census-Canada_1851


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1851]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1851

AS-Census-Canada_1861


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1861]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1861

AS-Census-Canada_1871


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1871]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1871

AS-Census-Canada_1881


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1881]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1881

AS-Census-Canada_1891


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1891]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1891

AS-Census-Canada_1901


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1901]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1901

AS-Census-Canada_1906


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1906]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1906

AS-Census-Canada_1911


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1911]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1911

# Name --> Place FOCUS on name
{TAB}

# Place of habitation
[Town_City], [Province]
{TAB}

# Sex
[Gender:substring:1:1]

# Relationship
<[Relationship]>{TAB}

# Marital Status
<[Marital Status]>{TAB}

# Month & Year of birth
<
[?:Update birth date!=N]
<[Birth Date]>
>
{TAB}

# Age
<[Age]>{TAB}

# Birth place
<
[?:Update birth place!=N]
<[Birth Place]>
>
{TAB}

# Immigration Year
<[Immigration Year]>{TAB}

# Naturalization Year
<[Naturalization Year]>{TAB}

# Origin
<[Race or Tribe]>{TAB}

# Nationality
<[Nationality]>{TAB}

# Religion
<[Religion]>{TAB}

# Occupation
<[Occupation]>{TAB}

# Second Occupation
{TAB}

# Employment Status
{TAB}

# Place of work
<[Works at]>{TAB}

# Weeks at chief occupation
<[Weeks Employed]>{TAB}

# Weeks at other occupation
{TAB}

# Hours per week chief occupation
<[Hours Week]>{TAB}

# Hours per week other occupation
{TAB}

# Total earnings chief occupation
<[Earnings]>{TAB}

# Total earnings other occupation
{TAB}

# Earnings/hour
{TAB}

# Life Insurance
{TAB}

# Accident/sick insurance
{TAB}

# Insurance cost
{TAB}

# School months 1910
{TAB}

# Can read
<[Can read]>{TAB}

# Can write
<[Can write]>{TAB}

# Language
<[Language]>{TAB}

# Education Cost
{TAB}

# Infirmities
{TAB}

AS-Census-Canada_1916


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1916]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1916

AS-Census-Canada_1921


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1921]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1921

AS-Census-Canada_1931


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-Canada_1931]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 24/07/2024 BETA9_8   New record type "Canada Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1931

AS-Census-England

{target=ancestral sources}

# Usage: [lib.AS-Census-England]
# Collections: England & Wales from 1841 to 1921.
#              May possibly work on Scottish census as well.

# Version: 0.6.0 inherited from John Cardinal's ORA Extension v1.80 release.
# Description: Pick up census line detail from Census 1841 - 1932 from either Ancestry
#              or Findmypast. 
#              With census selected from ANC or FMP select person to be added to AS.
#              In AS put cursor in first column after name which should be relation.
#   1841 - Sex, Age, Occupation, Where born
#   1851 - Relation, Condition, Sex, Age, Occupation, Where born, Infirmity
#   1861 - Relation, Condition, Sex, Age, Occupation, Where born, Infirmity
#   1871 - Relation, Condition, Sex, Age, Occupation, Where born, Infirmity
#   1881 - Relation, Condition, Sex, Age, Occupation, Where born, Infirmity
#   1891 - Relation, Condition, Sex, Age, Occupation, Employ Status, Where born, Infirmity
#   1901 - Relation, Condition, Sex, Age, Occupation, Employ Status, At home, Where born, Infirmity
#   1911 - Relation, Sex, Age, Condition, Years, Child born, Child living, Chile died, Occupation, Industry, Employ ststus, At home, Where born, Nationality, Infirmity
#   1921 - Relation, Age, Sex, Condition, Where born, Nationality, Education, Occupation, Employment, Place of work, Child < 16, Children Ages

{fast}

<
[?:Page.ServiceName=Ancestry][=:var.zFactYear:[Source.Year]]
|
[?:Page.ServiceName=Findmypast][=:var.zFactYear:[Record set:split: :1]]
>

<
#----------------------------------------------------------------------1841
[?:var.zFactYear=1841]
<[Sex:substring:1:1]|[Gender:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|<[Birth Town], [Birth County], [Birth county as transcribed:capitalize]>|[Birth place as transcribed]|[Birth place]|{DELETE}>
|
#----------------------------------------------------------------------1851, 1861, 1871, 1881
[?:var.zFactYear/^(1851|1861|1871|1881)]
{CTRL+A}<[Relationship to head]|[Relationship]|[Relation to Head]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|<[Birth town as transcribed:capitalize], [Birth county as transcribed:capitalize], [Birth place other]>|[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>


|
#----------------------------------------------------------------------1891
[?:var.zFactYear=1891]
{CTRL+A}<[Relationship to head]|[Relationship]|[Relation to Head]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[Where Born]|<[Birth Town], [Birth County], [Birth county as transcribed:capitalize]>|[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

|

#----------------------------------------------------------------------1901
[?:var.zFactYear=1901]
{CTRL+A}<[Relationship to head]|[Relationship]|[Relation to Head]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[At home]|{DELETE}>
{TAB}<[Where Born]|<[Birth Town], [Birth County], [Birth county as transcribed:capitalize]>|[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

|

#----------------------------------------------------------------------1911
[?:var.zFactYear=1911]
{CTRL+A}<[Relationship to head]|[Relationship]|[Relation to Head]|{DELETE}>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[lib.AS-Number:Years married]|{DELETE}>
{TAB}<[lib.AS-Number:Total children born]|{DELETE}>
{TAB}<[lib.AS-Number:Children still living]|{DELETE}>
{TAB}<[lib.AS-Number:Children who have died]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Industry]|{DELETE}>
{TAB}<[Employment status]|[Employ status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Nationality as transcribed]|[Nationality]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
|
#----------------------------------------------------------------------1921
[?:var.zFactYear=1921]
{CTRL+A}<[Relationship to head]|[Relationship]|[Relation to Head]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Where Born]|<[Birth Town], [Birth County], [Birth county as transcribed:capitalize]>|[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Nationality]|{DELETE}>
{TAB}<[Education]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employment]|{DELETE}>
{TAB}<[Pace of work]|{DELETE}>


>

AS-Census-USA

{target=ancestral sources}

# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".
# 21/07/2024 BETA9_3   Added US Federal Census for 1850, 1860, 1870 & 1880.


{fast}

<
[?:var.zFactYear=1850][lib.AS-Census-USA_1850]
|
[?:var.zFactYear=1860][lib.AS-Census-USA_1860]
|
[?:var.zFactYear=1870][lib.AS-Census-USA_1870]
|
[?:var.zFactYear=1880][lib.AS-Census-USA_1880]
|
[?:var.zFactYear=1900][lib.AS-Census-USA_1900]
|
[?:var.zFactYear=1910][lib.AS-Census-USA_1910]
|
[?:var.zFactYear=1920][lib.AS-Census-USA_1920]
|
[?:var.zFactYear=1930][lib.AS-Census-USA_1930]
|
[?:var.zFactYear=1940][lib.AS-Census-USA_1940]
|
[?:var.zFactYear=1950][lib.AS-Census-USA_1950]

#----------------------------------------------------------------------Invalid census year
|
[lib.ErrorMessage: No valid census year]
>

AS-Census-USA_1850


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1850]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 21/07/2024 BETA9_3   New record type "US Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1850

[Name:nameSurname], [Name:nameGiven]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Occupation
<[Occupation]|{DEL}>{TAB}

# Real estate value
<[Real Estate Value]>{TAB}

# Birth place
<[?:Update birth place/^N/]|[Birth Place]>
{TAB}

# Married this year
<[Married Within Year]>{TAB}

# Attended school this year
<[Attended School]>{TAB}

# Can't read & write
{TAB}

# Disability
<[Disability Condition]>{TAB}

AS-Census-USA_1860


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1860]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 21/07/2024 BETA9_3   New record type "US Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name

Can't read & write 
Disability

#----------------------------------------------------------------------1860

[Name:nameSurname], [Name:nameGiven]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Occupation
<[Occupation]|{DEL}>{TAB}

# Real estate value
<[Real Estate Value]>{TAB}

# Personal estate value
<[Personal Estate Value]>{TAB}

# Birth place
<[?:Update birth place/^N/]|[Birth Place]>
{TAB}

# Married this year
<[Married Within Year]>{TAB}

# Attended school this year
<[Attended School]>{TAB}

# Can't read & write
{TAB}

# Disability
<[Disability Condition]>{TAB}

AS-Census-USA_1870


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1870]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 21/07/2024 BETA9_3   New record type "US Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name

#----------------------------------------------------------------------1870

[Name:nameSurname], [Name:nameGiven]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Occupation
<[Occupation]>{TAB}

# Real estate value
{TAB}

# Personal estate value
{TAB}

# Birth place
<[?:Update birth place/^N/]|[Birth Place]>
{TAB}

# Father foreign
<[Father of Foreign Birth]>{TAB}

# Mother foreign
<[Mother of Foreign Birth]>{TAB}

# Born within year 
{TAB}

# Married this year
{TAB}

# Attended school this year
<[Attended School]>{TAB}

# Cannot read
{TAB}

# Cannot write
{TAB}

# Disability
{TAB}

# Male citizen over 21
<[Male Citizen Over 21]>{TAB}

# Male denied rights to vote
{TAB}

AS-Census-USA_1880

{target=ancestral sources}

# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1880]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 21/07/2024 BETA9_3   New record type "US Federal Census".



{fast}


# In Ancestral Sources, put focus on person's name

#----------------------------------------------------------------------1880

[Name:nameSurname], [Name:nameGiven]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Born within year 
{TAB}

# Relationship 
[Relationship]{TAB}

# Civil Condition
<[Marital Status]>{TAB}

# Married this year
<[Married this year]>{TAB}

# Occupation
<[Occupation]>{TAB}

# Months unemployed 
{TAB}

# Health
{TAB}

# Attended school this year
<[Attended school]>{TAB}

# Cannot read  
<[Cannot read]>{TAB}

# Cannot write
<[Cannot write]>{TAB}

# Birth place
<[?:Update birth place/^N/]|[Birth Place]>
{TAB}

# Father Birthplace 
<[Father's Birth Place]>{TAB}

# Mother Birthplace 
<[Mother's Birth Place]>{TAB}

AS-Census-USA_1900


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1900]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1900

<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>
# Colour
[Race:substring:1:1]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Birth month & year
<
[?:Relationship=Servant]
[=:Update Servant's birth date - yes or no]
<[?:Update Servant's birth date - yes or no/^y/][Birth Date]>
|
<[?:Update birth date/^N/]|[Birth Date]>
>
{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Years married
<[Years Married]>{TAB}

# Children born
<[Mother  How many children]>{TAB}

# Children living
<[Mother  number of living children]>{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

# Father birth place
[Father's Birth Place]{TAB}

# Mother birth place
[Mother's Birth Place]{TAB}

# Year of immigration
<[Immigration Year]>{TAB}

# Years in US
<[Years in US]>{TAB}

# Naturalization
<[Naturalization:capitalize]>{TAB}

# Occupation
<[Occupation]>{TAB}

# Months unemployed
<[Months Not Employed]>{TAB}

# Attended school
[Attended school]{TAB}

# Can read
<[Can Read]>{TAB}

# Can write
<[Can Write]>{TAB}

# Speak English
<[Can Speak English]>{TAB}

# Ownership of home
<[House Owned or Rented]| >{TAB}

AS-Census-USA_1910


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1910]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}


# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1910

<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Years married
<[Years Married]>{TAB}

# Children born
<[Number of Children Born]>{TAB}

# Children living
<[Number of Children Living]>{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

# Father birth place
[Father's Birth Place]{TAB}

# Mother birth place
[Mother's Birth Place]{TAB}

# Year of immigration
<[Immigration Year]>{TAB}

# Naturalization
<[Naturalization Status:capitalize]>{TAB}

# Speak English
<[?:Native Tongue=English]Y|N>{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Emplaoy Status
<[Employer, Employee or Other]>{TAB}

# Unemployed
<[Out of Work]>{TAB}

# Weeks unemployed
<[Number of Weeks Out of Work]>{TAB}

# Can read
<[Able to read]>{TAB}

# Can write
<[Able to Write]>{TAB}

# Attended school
<[?:Attended school=y]Y| >{TAB}

# Ownership of home
<[Home Owned or Rented]>{TAB}

# Military survivor
{TAB}

# Disability
{TAB}

AS-Census-USA_1920


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1920]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}



# In Ancestral Sources, put focus on person's name


#----------------------------------------------------------------------1920



<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>


# Ownership of home
<[Home Owned or Rented]>{TAB}

# Mortgage
{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Year of immigration
<[Immigration Year]>{TAB}

# Naturalization
<[Naturalization Status:capitalize]>{TAB}

# Naturalization Year
<[Naturalized Year]>{TAB}

# Attended school
<[Attended school]>{TAB}

# Can read
<[Able to read]>{TAB}

# Can write
<[Able to Write]>{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

# Speak English
<[?:Native Tongue=English]Y|N>{TAB}

# Father birth place
[Father's Birth Place]{TAB}

# Father mother tongue
{TAB}

# Mother birth place
[Mother's Birth Place]{TAB}

# Mother mother tongue
{TAB}

# Speak English
<[?:Native Tongue=English]Y|N>{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Emplaoy Status
<[Employer, Employee or Other]>{TAB}



AS-Census-USA_1930


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1930]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}



# In Ancestral Sources, put focus on person's name



#----------------------------------------------------------------------1930


<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>

# Ownership of home
<[Home Owned or Rented]>{TAB}

# Home value
{TAB}

# Radio Set
<[Radio Set]>{TAB}

# Farm
<[Lives on Farm]>{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Marital Age
[Age at First Marriage]{TAB}

# Attended school
<[Attended school]>{TAB}

# Able to read / write
[Able to Read and Write]{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

# Father birth place
[Father's Birth Place]{TAB}

# Mother birth place
[Mother's Birth Place]{TAB}

# Mother tongue
<[Language Spoken]>{TAB}

# Year of immigration
<[Immigration Year]>{TAB}

# Naturalization
<[Naturalization Status:capitalize]>{TAB}

# Speak English
<[Language Spoken]>{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Worker class
<[Class of Worker]>{TAB}

# Working
<[Employment]>{TAB}

# Vateran
<[Veteran:capitalize]>{TAB}

# War
<[War]>{TAB}



AS-Census-USA_1940


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1940]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}



# In Ancestral Sources, put focus on person's name



#----------------------------------------------------------------------1940


<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>

# Ownership of home
<[House Owned or Rented]>{TAB}

# Home value
<[Value of Home]>{TAB}

# Farm
<[Farm]>{TAB}

#Code
{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Attended school
<[Attended School or College]>{TAB}

# Highest grade
<[Highest Grade Completed]>{TAB}

#Code
{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

#Code
{TAB}

# Citzenship of the foreign born / Naturalised -> Na
<[?:Citzenship=nk]|[Citzenship]>{TAB}

# 1935 City
{TAB}

# 1935 County
{TAB}

# 1935 State
{TAB}

# 1935 Farm
{TAB}

#Code
{TAB}

# Pay work
{TAB}

# Emergency work
{TAB}

# Seeking work
{TAB}

# Job?
{TAB}

# Home, sch?
{TAB}

# Code
{TAB}

# Hours worked
<[Hours worked]>{TAB}

# Unemployed length
{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Worker class
<[Class of Worker]>{TAB}

# Code
{TAB}

# Code
{TAB}

# Code
{TAB}

# Weeks 1939
<[Weeks Worked in 1939]>{TAB}

# Salary 1939
<[Income]>{TAB}

# >$50
{TAB}

# Farm sched
{TAB}

# Father birth place
<[Father's Birth Place]>{TAB}

# Mother birth place
<[Mother's Birth Place]>{TAB}

# Code
{TAB}

# Childhood language
{TAB}

# Code
{TAB}

# Vateran
<[Veteran:capitalize]>{TAB}

# Vet dead?
{TAB}

# Service
{TAB}

# Code
{TAB}

# SSN?
{TAB}

# Deductions old age
{TAB}

# Deductions
{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Usual class
{TAB}

# Code
{TAB}

# Code
{TAB}

# Code
{TAB}

# Marr > 1
{TAB}

# Marr age
{TAB}

# Child born
<[Number of Children Born]>{TAB}

AS-Census-USA_1950


# Description: Using Ancestry, for each person selected, the census grid in Ancestral Sources
#              is updated.

# Usage:[lib.AS-Census-USA_1950]

# Version Date         Reason for change
# ----------------     --------------------------------------------------------------------------
# 10/07/2024 BETA8_4   New record type "US Federal Census".

{target=ancestral sources}


{fast}



# In Ancestral Sources, put focus on person's name



#----------------------------------------------------------------------1950



<
[?:Relationship=Servant]
[Name:nameSurname], [Name:nameGiven]{TAB}
[Relationship]{TAB}
|
{TAB*2}
>

# Farm?
<[Farm]>{TAB}

# Home of 3 or mor acres
<[Acres]>{TAB}

# Agriculture #
{TAB}

# Code
{TAB}

# Colour
[Race:substring:1:1]{TAB}

# Sex
[Gender:substring:1:1]{TAB}

# Age
[lib.Fix_AS_Age:Age]{TAB}

# Marital Condition
[Marital Status:substring:1:1]{TAB}

# Birth place
<
[?:Relationship=Servant]
[=:Update Servant's birth place - yes or no]
<[?:Update Servant's birth place - yes or no/^y/][Birth Place]>
|
<[?:Update birth place/^N/]|[Birth Place]>
>
{TAB}

#Code
{TAB}

# Naturalised
{TAB}

# Doing last week?
{TAB}

# Work last week?
{TAB}

# Looking for week?
{TAB}

# Have a job?
{TAB}

# How many hrs?
{TAB}

# Occupation
<[Occupation]>{TAB}

# Industry, business or establishment
<[Industry]>{TAB}

# Worker class
<[Class of Worker]>{TAB}

# Code
{TAB}

# Code
{TAB}

# Code
{TAB}

# Same house last yr?
<[Same House]>{TAB}

# Farm last yr?
<[Previously on Farm]>{TAB}

# Same county last yr?
<[Same County]>{TAB}

# County last yr?
{TAB}

# State or country last yr
{TAB}

# Code
{TAB}

# Father birth place
<[Father's Birth Place]>{TAB}

# Mother birth place
<[Mother's Birth Place]>{TAB}

#Code
{TAB}

# Highest grade
<[School Completed]>{TAB}

# Finish this grade
<[Grade Completed]>{TAB}

# Attended school
<[School Attendance]>{TAB}

# Seeking work
<[Seeking Work]>{TAB}

# Weeks 1949
<[Weeks Worked]>{TAB}

# Salary 1949
<[Income]>{TAB}

# Own Business income in 1949
{TAB}

# Invest income in 1949
<[Supplemental Income]>{TAB}

# Code
{TAB}

# Others (Family relative) Salary 1949
<[Relative Income]>{TAB}

# Others (Family relative) Own bus income 1949
<[Relative Other Income]>{TAB}

# Others (Family relative) Inv income 1949
<[Relative Supplemental Income]>{TAB}

# Code
{TAB}

# Male WW 2 vet?
{TAB}

# Male WW 1 vet?
{TAB}

# Male vet other conflict
{TAB}

# Code
{TAB}

# Work wk or more 1949
{TAB}

# Occupation last yr
<[Occupation]>{TAB}

# Industry last year
<[Industry]>{TAB}

# Class of worker last yr
{TAB}

# Married more than once
{TAB}

# Yrs since mar, wd, d or sep?
{TAB}

# Children borne alive
{TAB}

AS-Number

# Usage: [lib.AS-Number:field-name]
# Description: Converts digits in a value to "{d}" to avoid an issue where Ancestral Sources ignores digits typed by ORA into numeric-only fields. For example, "65" becomes "{6}{5}". Special case: zero must be sent as {NUMPAD0}.

# Version: 0.5.0

[{1}:replace:([1-9]):{$1}:g:replace:0:{NUMPAD0}:g]

AS-YesNo

# Usage: [lib.AS-YesNo:field-name]
# Description: Emits "Yes" or "No" depending on the value of the given field.

# Version: 0.5.0

<
[?:{1}/^Y/]Yes
|
[?:{1}/^N/]No
|
{1}
>

Banns

#
# Author: Alan
# Description: 
# Usage: [lib.Banns:Fact]

# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 12/07/2024         BETA8_4 Swap Marriage Banns from AS to FH and add parishes

[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================

<[?:Param1=Fact]


# Add fact.
{Ctrl+I}[var.zFact]{ENTER}


<
[?:var.zFact=Marriage Banns]
<
[?:Wife number=1]|
[?:Wife number=2]{DOWN}|
[?:Wife number=3]{DOWN*2}|
[?:Wife number=4]{DOWN*3}|
[?:Wife number=5]{DOWN*4}
>
{ENTER}
>
{TAB}

#Execute code at this speed
#{FAST}

# Marriage Banns Date
<[Marriage Banns Date]|[Marriage Banns Year]>
{TAB*2}

# Place
<[Place]>



>


# ===============Add Citation=============================================================

<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Generic source
[?:var.ConfigSourceType=Generic]

# Select Source Template.
[lib.Add_FH_Citation:None]

#Execute code at this speed
#{FAST}


# Fill in source template "Banns".
[lib.WriteMarriage]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Templated source

# Select Source Template.
[lib.Add_FH_Citation:PR Banns]


#Execute code at this speed
{SLOW}

# Reg Type --> PR
{DOWN*4}{TAB}

# Event Type --> Banns
{DOWN*3}{TAB}

# Event Date --> Marriage Banns Date which should be the last of the 3 consecutive dates.
[var.zEventDate]{TAB}

# Marriage Date, if known
<[Marriage Date]|[Marriage Year]>{TAB}

# Principle 1 Name
[var.zFullname]{TAB}

# Principle 2 Name
[var.zSpouseFullname]{TAB}

# Church of Principle 1
{TAB}

# Marriage Banns Place --> Principle 1
[var.zLocation]{TAB}

# Records Office or the Family History Society who performed transcription.
[var.zRecordsOffice]{TAB} 

# Reference
[var.zArchiveReference]{TAB}

# Collection Name
[Collection Name]{TAB} 

# Repository 
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research place]{TAB}

# If image is available (Ancestry only) then Data Quality Assessment = P (Primary).
<
[?:Image Page]

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]
{TAB}

# Move to Media tab.
{CTRL+TAB*3}


{SLOW}
# Insert from File for Principle 1
{CTRL+I}{DOWN}{ENTER}{ENTER}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource1]
{ENTER}

# Add file to FH folder
[var.zFactFolder]
{ENTER}
{TAB}

|

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]
{TAB}
No images available.

# End of Image Page condition.
>

# End of Generic or Tempated source condition.
>


#######################################################################################
<[?:var.Debug=0]
#######################################################################################

## Do nothing
>

Burial

[=:Start:Burial]
#
# Author: Alan
# Version Date           Description Change
# -----------------      ---------------------------------------------------------------------
# 07/09/2023 xx:xx       First attempt to create a non-Ancestral Sources burial.
# 30/04/2024 BETA2_13    Changed [lib.SetResearchPlace] to [Research Place].

#
# Collections: 
#
# Usage: [lib.Burial]
#
# Parameters : none
#
# Input variable : None
#
# Called by: 
#
# Calls: 

[==:Debug:1]

[lib.Add_FH_Citation:PR Burial]


#Execute code at this speed
{fast}


# Fill in source template.---------------------------------

# Record Type
{tab}

# Burial Place --> Church or Cemetery
[Burial Place]{tab}

# Parish
{tab}

# Place --> Location
[Burial Place]{tab}

# Given name(s)
[zGivenName]{tab}

# Surname
[zSurname]{tab}

# Occupation
{tab}

# Spouse or parent
{tab}

# Abode
{tab}

# Burial date
<[?:zBurialDate][zBurialDate]
|[?:zBurialYear][zBurialYear]>{tab}

# Death date
<[?:zDeathDate][zDeathDate]
|[?:zDeathYear][zDeathYear]>{tab}

# Age at Death
{tab}

# Birth date
{tab}

# Page
<[Page]|[Page Number]>{tab}

# Entry Number
{tab}

# Record office
{tab}

# Reference
{tab}

# Collection
[zCollection]{tab}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{tab}

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]{TAB}


# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:P]


# Move to Media tab.
{Ctrl+Tab}
{Ctrl+Tab}
{Ctrl+Tab}

# Insert from File
#####[lib.GetMedia]


#***********
<[?:Debug=0]
#***********

## Do nothing
>


[=:End:Burial]

Burial_with_citation

[=:Start:Burial_with_citation]
#
# Author: Alan
#
# Description:
#
# Version Date           Description Change
# -----------------      ---------------------------------------------------------
# 12/09/2023 07:45       First attempt
#
# Collection: Hampshire, Portsmouth Burials
#
# Usage: [lib.Burial_with_citation]
#
# Input variable : None
#
# Parameters : {1) - Fact = Add burial fact.
#

[==:Debug:1]

[=:Param1:{1}]

#Execute code at fastest speed
{fast}

<
[?:Param1=Fact]
[lib.ValidatePlace:Burial Place]

[lib.Add_FH_Fact:Burial:Burial Date:Burial Place]
>

# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv


# SOURCE TEMPLATE - CEMETERY------------------------------------------------------


[lib.Add_FH_Citation:Cemetery Record]

#Execute code at this speed
{fast}

# Fill in source template.

[lib.SourceTemplate_Cemetery]

# Fix/workround due to problem with FH not returning back to correct tab when adding citation.
[lib.SetSourceCitation]


# Move to Text from Source tab from Citation tab.
{Ctrl+Tab}

# Insert Text from Source template.
[lib.InsertTextfromSource:Cemetery]

# These couple of lines required to re-insert Assessment due to FH problem.
# Go back Citation tab (tab*19 for Cemetery citation)
{Shift+Ctrl+Tab}
{tab*20}
[lib.SetAssessment:P]
{Ctrl+Tab}

# Move to Notes tab from Text from Source tab.
{Ctrl+Tab}
# Move to Media tab from Notes tab.
{Ctrl+Tab}


# Insert media, if any...
[lib.GetMedia]


#***********
<[?:Debug=0]
#***********

## Do nothing
>

[=:End:Burial_with_citation]

CheckORA

# [lib.CheckORA]
Hostname=[Page.HostName]\<BR\>
Service name=[Page.ServiceName]\<BR\>
Collection ID=[Collection ID]\<BR\>
Collection Name=[Collection Name]\<BR\>
URL=[URL]\<BR\>
Page URL=[Page.URL]\<BR\>
Page Title=[Page.Title]\<BR\>
Source Title=[Source.Title]\<BR\>
Record ID=[Record ID]\<BR\>

CleanStreet

# Tidy street/road, etc Replaces St., Ave. or Rd with full name; adds period if missing

# Usage: [lib.cleanStreet:street_fieldname]

# [{1}:replace:\bstreet:St.:i:replace:\bst$:St.:i:replace:avenue:Ave.:i
:replace:\bave$:Ave.:i:replace:road:Rd.:i:replace:\brd$:Rd.:i]

[{1}:replace:\bSt.:Street:i:replace:\bst$:St.:i:replace:Ave.:Avenue:i
:replace:\bave$:Avenue:i:replace:Rd.:Road:i:replace:\brd$:Road:i]

deleteme_SetCitingWebSites

[=:Start:SetCitingWebSites]

# Author: Alan
# Description: Cites webpages based on the templates set up in Famiy Historian.
#              Services Ancestry and Findmypast can basically use the same fields.
#              See [lib.TestcitingWebSites] for details and test results.

# Usage: [lib.SetCitingWebSites]

# Change History       Reason for change
# -----------------    ----------------------------------------------------------------------
# 23/10/2023           Initial creation.


# Script
#=======
# Coll ID=[Collection ID]\<BR\>
# Coll Name=[Collection Name]\<BR\>
# Page Title=[Page.Title]\<BR\>
# Source Title=[Source.Title]\<BR\>
# Coll from=[Collections from]\<BR\>
# Cat=[Category]\<BR\>
# Sub cat=[Subcategory]\<BR\>
# Rec ID=[Record ID]\<BR\>
# Rec no=[Record Number]\<BR\>
# URL=[URL]\<BR\>
# Page URL=[Page.URL]


# Results
#========
# Ancestry------------------------------------------------------------------------------
# Coll ID=7579
# Coll Name=England & Wales, Civil Registration Death Index, 1916-2007
# Page Title=England & Wales, Civil Registration Death Index, 1916-2007 - Ancestry.co.uk
# Source Title=England & Wales, Civil Registration Death Index, 1916-2007
# Coll from=
# Cat=
# Sub cat=
# Rec ID=7579::33391588
# Rec no=33391588

# FamilySearch-----------------------------------------------------------------------------
# Coll ID=1473014
# Coll Name=England Births and Christenings, 1538-1975
# Page Title=FamilySearch.org
# Source Title=
# Coll from=
# Cat=
# Sub cat=
# Rec ID=ark:/61903/1:1:N22F-KBR
# Rec no=
# URL=https://www.familysearch.org/ark:/61903/1:1:N22F-KBR
# Page URL=https://www.familysearch.org/ark:/61903/1:1:N22F-KBR

# Findmypast-----------------------------------------------------------------------------
# Coll ID=EnglandWalesDeaths1837-2007
# Coll Name=England & Wales Deaths 1837-2007
# Page Title=Record Transcription: England & Wales Deaths 1837-2007 | findmypast.co.uk
# Source Title=
# Coll from=Great Britain, England
# Cat=Birth, Marriage, Death & Parish Records
# Sub cat=Civil Deaths & Burials
# Rec ID=BMD/D/1874/2/AZ/000023/046
# Rec no=

# GRO------------------------------------------------------------------------------------
# Coll ID=birth
# Coll Name=Birth
# Page Title=General Register Office - Online Indexes - Search the GRO Online Indexes
# Source Title=
# Coll from=
# Cat=
# Sub cat=
# Rec ID=1857.5T6E7381A7IC72SP8CE01I4UDNHR55RE.1857.True
# Rec no=
# URL=
# Page URL=https://www.gro.gov.uk/gro/content/certificates/indexes_search.asp#Results


# Coll ID=death
# Coll Name=Death
# Page Title=General Register Office - Online Indexes - Search the GRO Online Indexes
# Source Title=
# Coll from=
# Cat=
# Sub cat=
# Rec ID=1874.5T6E7381A7IP0P5A9CC32IZUF7YNB75E.1874
# Rec no=
# URL=
# Page URL=https://www.gro.gov.uk/gro/content/certificates/indexes_search.asp#Results


# Find a Grave---------------------------------------------------------------------------
# Coll ID=0
# Coll Name=Memorials
# Page Title=William Henry Doubtfire (1904-1983) - Find a Grave Memorial
# Source Title=Find a Grave
# Coll from=
# Cat=
# Sub cat=
# Rec ID=126097168
# Rec no=
# URL=https://www.findagrave.com/memorial/126097168
# Page URL=https://www.findagrave.com/memorial/126097168/william-henry-doubtfire






# Conclusion - Ancestry & Findmypast & FamilySearch
#===========
# ORA Template Label      ORA Template Field      Customised ORA Field      FH Label
# ------------------      ------------------      --------------------      -------------
# Collection              [Collection Name]       [var.z_Collection]        Collection
# Collection ID           [Collection ID]         [var.z_CollectionID]      Collection ID
# Record number           [Record ID]             [var.z_RecordNo]          Record number



<
[?:Page.ServiceName=Ancestry][=:z_Ancestry_Findmypast:1]
|[?:Page.ServiceName=Findmypast][=:z_Ancestry_Findmypast:1]
|[?:Page.ServiceName=FamilySearch][=:z_Ancestry_Findmypast:1]
>

<
[?:z_Ancestry_Findmypast=1]
[==:var.z_Collection:[Collection Name]]
[==:var.z_CollectionID:[Collection ID]]
[==:var.z_RecordNo:[Record ID]]
>

[=:End:SetCitingWebSites]

deleteme_TestCitingWebSites

[=:Start:TestCitingWebSites]

# Author: Alan
# Description: 
# Usage: [lib.TestCitingWebSites]
# Change History       Reason for change
# -----------------    ----------------------------------------------------------------------
# 23/10/2023           Initial creation.


# Script
#=======
Coll ID=[Collection ID]\<BR\>
Coll Name=[Collection Name]\<BR\>
Page Title=[Page.Title]\<BR\>
Source Title=[Source.Title]\<BR\>
Coll from=[Collections from]\<BR\>
Cat=[Category]\<BR\>
Sub cat=[Subcategory]\<BR\>
Rec ID=[Record ID]\<BR\>
Rec no=[Record Number]\<BR\>
URL=[URL]\<BR\>
Page URL=[Page.URL]\<BR\>
Record Set=[Record Set]\<BR\>


# Results
#========
# Ancestry------------------------------------------------------------------------------
# Coll ID=7579
# Coll Name=England & Wales, Civil Registration Death Index, 1916-2007
# Page Title=England & Wales, Civil Registration Death Index, 1916-2007 - Ancestry.co.uk
# Source Title=England & Wales, Civil Registration Death Index, 1916-2007
# Coll from=
# Cat=
# Sub cat=
# Rec ID=7579::33391588
# Rec no=33391588

# Findmypast-----------------------------------------------------------------------------
# Coll ID=EnglandWalesDeaths1837-2007
# Coll Name=England & Wales Deaths 1837-2007
# Page Title=Record Transcription: England & Wales Deaths 1837-2007 | findmypast.co.uk
# Source Title=
# Coll from=Great Britain, England
# Cat=Birth, Marriage, Death & Parish Records
# Sub cat=Civil Deaths & Burials
# Rec ID=BMD/D/1874/2/AZ/000023/046
# Rec no=

# GRO------------------------------------------------------------------------------------
# Coll ID=birth
# Coll Name=Birth
# Page Title=General Register Office - Online Indexes - Search the GRO Online Indexes
# Source Title=
# Coll from=
# Cat=
# Sub cat=
# Rec ID=1857.5T6E7381A7IC72SP8CE01I4UDNHR55RE.1857.True
# Rec no=
# URL=
# Page URL=https://www.gro.gov.uk/gro/content/certificates/indexes_search.asp#Results


# Coll ID=death
# Coll Name=Death
# Page Title=General Register Office - Online Indexes - Search the GRO Online Indexes
# Source Title=
# Coll from=
# Cat=
# Sub cat=
# Rec ID=1874.5T6E7381A7IP0P5A9CC32IZUF7YNB75E.1874
# Rec no=
# URL=
# Page URL=https://www.gro.gov.uk/gro/content/certificates/indexes_search.asp#Results


# Find a Grave---------------------------------------------------------------------------
# Coll ID=0
# Coll Name=Memorials
# Page Title=William Henry Doubtfire (1904-1983) - Find a Grave Memorial
# Source Title=Find a Grave
# Coll from=
# Cat=
# Sub cat=
# Rec ID=126097168
# Rec no=
# URL=https://www.findagrave.com/memorial/126097168
# Page URL=https://www.findagrave.com/memorial/126097168/william-henry-doubtfire






# Conclusion - Ancestry & Findmypast
#===========
# ORA Template Label      ORA Template Field      Customised ORA Field      FH Label
# ------------------      ------------------      --------------------      -------------
# Collection              [Collection Name]       [var.z_Collection]        Collection
# Collection ID           [Collection ID]         [var.z_CollectionID]      Collection ID
# Record number           [Record ID]             [var.z_RecordNo]          Record number




[=:End:TestCitingWebSites]

Divider

[=:Start:Divider]

# creates a divider bar in the Control Panel

# Call as: [lib.divider:Text to display]
# {1} Text to display in heading divider

# Use in the first or last Text Template, and enter only an equal sign in the Header field of the Template

\<div style="background:Red; color:White; text-align:center; font-size:13px;"\>{1}\<\div\>

#\<hr style='border: 3px solid Red; border-radius: 2px; margin:4px 15px 4px 15px'\>

[=:End:Divider]

DNA Match

#[=:Start:DNA Match]

# Usage: [lib.DNA Match]
#
# Author: Alan
# Version Date           Description Change
# ------------------     -------------------------------------------------------------------
# 22/06/2024 BETA7       First attempt - add citation only.     
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Field names to be added below

>

# ===============Add Citation=============================================================

#Execute code at this speed
{FAST}

# Templated Source against a Fact
#[lib.Add_FH_Citation:DNA Match]

# Templated source from the menu
{ALT+AUU}{RIGHT}{ENTER}{CTRL+D}DNA Match{F6}{SPACE}{ENTER}


# Fill in source template...

#Execute code at this speed
{FAST}

# Fill in source template.

# MRCA
{TAB}

# Match Name
[Match Name]{TAB}

# Actual Match Name
<[?:Actual Match Name=nk]|[Actual Match Name]>{TAB}

# Linked Tree
[Has Linked Tree]{TAB}

# Matched Name's Tree
[Matched Name's Tree]{TAB}

# Estimated Relationship
[Estimated Relationship]{TAB}

# Date Matched
[Page.Access Date]{TAB}

# Side - Both, Unassigned
[Side]{TAB}

# Test Name
<[?:Test Name=You]Alan Charles Medows|[Test Name]>{TAB}

# Tested with
[Page.ServiceName]{TAB}

# Test Date
{TAB}

# Shared DNA as a percentage
[Shared DNA]{TAB}

# centiMorgans
[centiMorgans]{TAB}

# Segments
[Segments]{TAB}

# Paternal Ancestor
<[Paternal Ancestor]>{TAB}

# Maternal Ancestor
<[Maternal Ancestor]>{TAB}

# Repository
[lib.SetRepository]{TAB}

# Collection
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Name
[Research Name]{TAB}

# Data Quality
[lib.SetAssessment:P]{TAB}


<[?:var.Debug=0]
## DO NOTHING
>


#[=:End:DNA Match]

Enter

# Usage: [lib.Enter]
# Description: Use in a Text Template to create a Field with the value "ENTER". The name of the Field is the Text Template's name. Use Alt-Click to edit the value in the OraPanel.

# Version: 1.1.0

<[{1:^o.template name}]|ENTER>

Enter Value

# Usage: [lib.Enter Value]
# Description: Use in a Text Template to create a Field with the value "ENTER". The name of the Field is the Text Template's name. Use Alt-Click to edit the value in the OraPanel.

# Change History   Reason for change
# --------------   ---------------------------------------------------------------------
# 25/02/2024       Initial creation based on John Cardinal's [lib.Enter]

<[{1:^o.template name}]|***Enter***>

EnterClear

# Usage: [lib.EnterClear:field-1:field-2:field-3:field-4]
# Description: If a Field's value is "ENTER", sets the Field to empty. The assignment is not persistent, so the Field is cleared only for the duration of the current template. You may provide from one to four Field names.

# UseIn: EnterClear is intended for use primarily in Auto Type Templates.
# Example: [lib.EnterClear:Maiden Surname]\n\n[Name]<; Maiden Surname: [Maiden Surname]>
# Version: 1.1.0

{{1:<[?:{1}!=ENTER]|[=:{1}:]>}}
{{2:<[?:{2}!=ENTER]|[=:{2}:]>}}
{{3:<[?:{3}!=ENTER]|[=:{3}:]>}}
{{4:<[?:{4}!=ENTER]|[=:{4}:]>}}

EnterIgnore

# Usage: <[lib.EnterIgnore:fieldName]|value when not ENTER>
# Description: If a Field's value is "ENTER", returns true. Use in a conditional expression to ignore a Field with the value set to "ENTER".

# UseIn: EnterIgnore is intended for use primarily in Auto Type Templates.
# Example: [Name]; Maiden Surname: <[lib.EnterIgnore](unknown)|[Maiden Surname]>;
# Version: 1.1.0

[?:{1}=ENTER]

EnterPrompt

# Usage: [lib.EnterPrompt:fieldName]
# Description: Use EnterPrompt in Auto Type Templates where you want to prompt for the value of a Field only if the Field has the value "ENTER". The assignment prompt is persistent, so the Field value will be set to whatever text you key in response to the prompt and will retain that value until the page is refreshed or you navigate away from it.

# UseIn: EnterPrompt is intended for use in Auto Type Templates. Typically, you do not want to use an assignment prompt in a Text Template because you will be prompted as soon as you visit a record in the collection.
# Example: [lib.EnterPrompt:Volume]\n\n[Name]<; Volume: [Volume]>
# Version: 1.1.0

<[?:{1}!=ENTER]|[==:{1}]>

ErrorMessage

# Description: This assembles all error messages before being displayed using [lib.ErrorMessageDisplay].
# Usage: [lib.ErrorMessage:{1}]
# Parameters: {1} = Error message
#             (2) = variable in error

# Change History       Reason for change
# -------------------  ----------------------------------------------------------------------
# 06/02/2024           Initial Creation
# 02/03/2024           Introduced 2nd parameter to hold name of field in error.
# 04/03/2024           Introduced error message counting.

[=:p1:{1}]
[=:p2:{2}]

[==:var.zErrorMessageCount:[var.zErrorMessageCount:mathAdd:1]]

[=:EC:[var.zErrorMessageCount]]
<
[?:var.zErrorMessage]
<
[?:p2/^\{/]
[==:var.zErrorMessage:[var.zErrorMessage:append:!BR!:append:Err#:append:[EC]:append: :append:{1}]]
|
[==:var.zErrorMessage:[var.zErrorMessage:append:!BR!:append:Err#:append:[EC]:append: :append:{1}:append: - :append:[{2}]]]
>

|
<
[?:p2/^\{/]
[==:var.zErrorMessage:[EC:prepend:Err#:append: :append:{1}]]
|
[==:var.zErrorMessage:[EC:prepend:Err#:append: :append:[p1]:append: - :append:[{2}]]]
>
>

ErrorMessageDisplay

# Description: Display error messages into instructions screen.
# Usage: [lib.ErrorMessageDisplay]
# Parameters: {1} = None
# Change History   Reason for change
# --------------   ----------------------------------------------------------------------
# 06/02/2024       Initial Creation
# 13/05/2024 BETA4 Added conditional brackets around [var.zErrorMessage].


#\<ul style=“list-style-type:square”\>
\<span style="color:Blue;font-size: 80%;font-weight: bold"\>
<[var.zErrorMessage:replace:!BR!:\<BR\>]>
\</span\>

Find_AS_ID

[=:Start:Find_AS_ID]
{target=ancestral sources}

#
# Title: Select Editor (Fact Type) and Find Head of Household.
# Editors (Fact Type) - Census, Birth, Baptism, Marriage, Death, Burial
#
# Author: Alan
# Change History      Reason for change
# ----------------    --------------------------------------------------------------------  
# 07/07/2023 08:15    Initial creation
# 20/07/2023 17:45    Updated for v7.7.8 to remove excess TABS on Census
# 28/07/2023 17:45    Updated for v7.7.9. Problem with Census as AS does not select
#                     type, region, year or date so need "dirty" fix.
# 12/09/2023 17:50    New [lib.SetCensusCountry] to distinguish between census
#                     for (E)ngland, (S)cotland, (W)ales.
# 21/09/2023          Added [Debug].
# 17/10/2023 1.0      Conversion of persistent variables into variances.
#                     Introduced [Wife] in case of multiple marriages.
# 28/02/2024          1. Changed method of selecting fact view.
#                     2. Removed workround for Census when selecting Burial view then Census due to fact
#                        AS did not position itself at the approriate year. May have been fixed by 
#                        [lib.AS_Reset].
# 22/03/2024          Marriage collections should contain a Text Template of Wife set to 1 but if
#                     there is no template it should be set to 1.
# 15/05/2024 BETA4    R (Register) added to force C (Census) to clear the existing list of census years.
# 16/06/2024 BETA6.6  Re-instated {Alt+Vu} because AS was greying out fields
# 22/07/2024 BETA9_3  Check US Federal Census year due to 1890 missing.
# 25/07/2024 BETA9_8  New record type "Canada Federal Census".

#
# template usage parameters : ie 
# usage : [lib.Find_AS_ID:fact type]
#  {1} is the Ancestral Sources Editor template.


[=:var.Debug:1]

[lib.AS_Reset]
{500}

# Execution speed
{fast}

[==:var.zFactType:{1}]


# Temporary field to capture parameter
[=:Parameter1:{1}]
# Select Editor - Down ? 
# - Census(0), Birth(1), Baptism(2), Marriage(3), Death(4), Burial(5)


# 1 Start--------------------------------------------------------------------------1939 Register
<
[?:Parameter1=1939 Register]
# 28/02/2024 (2) Following is a dirty fix by finding "Burial Editor" and then finding "Census Editor"
# 28/02/2024 (2) {Alt+V}{Down*5}{Enter}
# 28/02/2024 (1) {Alt+V}{Enter}
{Alt+V}u
{Alt+V}c
# Select Census Type
# 17/10/2023 1.0 [lib.SetFieldName:1939 Register]
# NB. When trying to start census Ctrl+T takes to box where type, region, year and date ibut if previous
# record was 1939 Register the year field is greyed out so Shift+Tab*3 goes back to field prior to
# type which is Other info and places E in that field.

{Ctrl+T}{Shift+Tab*3}E{Down}

# 1 Else---------------------------------------------------------------------------Census
|
[?:Parameter1=Census]
# 28/02/2024 (2) Following is a dirty fix by finding "Burial Editor" and then finding "Census Editor"
# 28/02/2024 (2) {Alt+V}{Down*5}{Enter}
# 28/02/2024 (1) {Alt+V}{Enter}
{Alt+V}u
{Alt+V}c
# Select Census Type
# 17/10/2023 1.0 [lib.SetFieldName:Census]
# R (Register) added to force C (Census) to clear the existing list of census years.
{Ctrl+T}{Shift+Tab*3}RC{tab}[lib.SetCensusCountry]{tab}
# 2 Start
<
# England Census
[?:var.zCensusCountry=E]
<
[?:var.zFactYear=1841]{down}|
[?:var.zFactYear=1851]{down*2}|
[?:var.zFactYear=1861]{down*3}|
[?:var.zFactYear=1871]{down*4}|
[?:var.zFactYear=1881]{down*5}|
[?:var.zFactYear=1891]{down*6}|
[?:var.zFactYear=1901]{down*7}|
[?:var.zFactYear=1911]{down*8}|
[?:var.zFactYear=1921]{down*9}
>
|
# Canada Census
[?:var.zCensusCountry=C]
# Canada Census starts at 1851 and currently finishes at 1931. There are 2 additional census in
# 1906 and 1916.

# Determine how many {Down} key depressionss required
[=:cd:[var.zFactYear:mathSubtract:1851:mathDivide:10:mathAdd:1]]
<[?:var.zFactYear>1905][=:cd:[cd:mathAdd:1]]>
<[?:var.zFactYear>1915][=:cd:[cd:mathAdd:1]]>
{DOWN*[cd]}

|
# US Census
[?:var.zCensusCountry=U]
# US Census starts at 1790 and currently finishes at 1950 but 1890 destroyed.
<
[?:var.zFactYear<1900]
[=:cd:[var.zFactYear:mathSubtract:1790:mathDivide:10:mathAdd:1]]
{DOWN*[cd]}
|
[=:cd:[var.zFactYear:mathSubtract:1790:mathDivide:10]]
{DOWN*[cd]}
>
# 2 End
>
# 1 Else---------------------------------------------------------------------------Electoral Register
|
[?:Parameter1=Electoral Register]
# 28/02/2024 (1) {Alt+V}{Enter}
{Alt+V}u
{Alt+V}c
# Select Census Type
# 17/10/2023 1.0 [lib.SetFieldName:Electoral Register]
{Ctrl+T}{Shift+Tab*3}E{tab*2}
# 1832-1917; 1918-1927; 1928-1944; 1945-; 
{slow}
<
[?:var.zFactYear>=1945]1{Shift+Tab}1{Shift+Tab}1{Shift+Tab}1|
[?:var.zFactYear>=1928]1{Shift+Tab}1{Shift+Tab}1|
[?:var.zFactYear>=1918]1{Shift+Tab}1|
[?:var.zFactYear>=1832]1
>
{fast}
[var.zFactYear]
[=:var.zFactType:Electoral Register]
# 1 Else---------------------------------------------------------------------------Birth
|
[?:Parameter1=Birth]
# 28/02/2024 (1) {Alt+V}{Down}{Enter}
{Alt+V}b
# 1 Else---------------------------------------------------------------------------Baptism
|
[?:Parameter1=Baptism]
# 28/02/2024 (1) {Alt+V}{Down*2}{Enter}
{Alt+V}a
# 1 Else---------------------------------------------------------------------------Marriage
|
[?:Parameter1=Marriage]
# 28/02/2024 (1) {Alt+V}{Down*3}{Enter}
{Alt+V}m
# 1 Else---------------------------------------------------------------------------Death
|
[?:Parameter1=Death]
# 28/02/2024 (1) {Alt+V}{Down*4}{Enter}
{Alt+V}d
# 1 Else---------------------------------------------------------------------------Burial
|
[?:Parameter1=Burial]
# 28/02/2024 (1) {Alt+V}{Down*5}{Enter}
{Alt+V}u
# 1 Else---------------------------------------------------------------------------Error
|
[=:Invalid Ancestral Sources Editor type - click CANCEL]
# 1 End----------------------------------------------------------------------------End of checks
>


# Temporary variable to use Census Head of Household or Individual ID from other fact types.
<
[?:HoH ID][lib.ValidateInputField:HoH ID][=:var.zID:[HoH ID]]
|
[lib.ValidateInputField:Individual ID][=:var.zID:[Individual ID]]
>


# Census problem because Census fields not selected - Type, Region, Year, Date --> see v7.7.8
# Put focus on field "Find ID" 
{250}
{Ctrl+F}{tab}
# Ancestral Sources does not clear the field so need to BACKSPACE


# Execution speed
{fast}

# Individual ID
# ...Clear the field first
{Ctrl+A}{Del}

[var.zID]

<
[?:Parameter1=Baptism]{tab*3}{Enter}{Down}{Enter}
|
[?:Parameter1=Burial]{tab*3}{Enter}{Down}{Enter}{Alt+O}
|
[?:Parameter1=Census]{tab*4}{Enter}
|
[?:Parameter1=1939 Register]{tab*4}{Enter}
|
[?:Parameter1=Electoral Register]{tab*3}{Enter}
|
[?:Parameter1=Marriage]{tab*3}{Enter}
<[?:Wife=1]{down}
|[?:Wife=2]{down*2}
|[?:Wife=3]{down*3}
|[?:Wife=4]{down*4}
|[?:Wife=5]{down*5}
|{down}>
{tab}{enter}{Ctrl+2}{Ctrl+1}
>


#***********
<[?:var.Debug=0]
#***********
### Do Nothing
>


[=:End:Find_AS_ID]

Find-a-Grave

[=:Start:Find-a-Grave]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Version Date          Description Change
# -------------------   ---------------------------------------------------------------
# 19/05/2023 09:50      Created
# 30/09/2023            Additional fields introduced but some unnecessary...
#                       [Geocode], [What 3 Word], [Page], [Entry Number], 
# 22/05/2024 BETA6      Convert [z_*] to [var.z*]
# 22/06/2024 BETA6_11   Remove extra {TAB} before [lib.SetAssessment]

#
# Usage: [lib.Find-a-Grave:Fact]
#
# Parameters...
#      {1} = Source Type - if present then the fact will be created as well as the citation
# Variables...
#      None
#

# Execution Speed
{slow}

# If parameter 1 = FACT then insert fact. If blank ORA still puts a value of /{1}/ into parameter.

[=:Param1:{1}]


# Add fact==========================================================================
<
[?:Param1=Fact]
[lib.Add_FH_Fact:Burial:var.zBurialDate:var.zBurialPlace]
>

# Add citation======================================================================
[lib.Add_FH_Citation:Gravestone/Memorial/Monumental Inscription]
[lib.SetGraveType:G]

[var.zFullName]{TAB}

# Death date
[var.zDeathDate]{TAB}

[var.zCemeteryName]{TAB}
[var.zBurialPlace]{TAB}
[var.zPlot]{TAB}
[var.zGeocode]{TAB}
[var.zW3W]{TAB}
[var.zPage]{TAB}
[var.zEntry]{TAB}
[Collection Name]{TAB}
[var.zRecordsOffice]{TAB}
[var.zArchiveReference]{TAB}
[lib.SetRepository]{TAB}
<[URL]|[Page.URL]>{TAB}
[Page.Access Date]{TAB}
[Research Place]{TAB}

# Data quality has to be entered manually because of FH error.
[lib.SetAssessment:S]{TAB}

# Move to media tab
{Ctrl+Tab*3}

# Insert media, if any...
[lib.GetMedia]

# Move to Text from Source (TfS)
{Shift+Ctrl+Tab*2}

# Insert Text from Source template.
[lib.InsertTextfromSource:Grave]


[=:End:Find-a-Grave]

Fix_AS_Age

[=:Start:Fix_AS_Age]
# Author: Alan
#
# Description:
# Age can only be entered in a specific way in Ancestral Sources.
# John Cardinal Reguar Expression (REGEX) solution: [age:replace:(\d):{$1}]
# Age set to FULL can only be entered in the Templated Source screen.
# However, this solution failed when ever the age contained a zero "0" so an additional
# replace was required to change "0" to "NUMPAD0".
#
# 01/02/2024
# Converts an age value to Auto Type keystrokes valid in Ancestral Sources Age-type cells. Converts digit characters and "y", "m", and "d" in the value to "{c}" to avoid an issue where Ancestral Sources ignores characters typed by ORA into Age-type fields. Other characters are ignored. For example, "14 MOS" becomes "{1}{4}{m}". Special case: zero must be sent as {NUMPAD0}.

# Change History     Reason for change
# --------------     -------------------------------------------------------------------
# 10/06/2023         Initial creation.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 01/02/2024         Replaced my age code with John Cardinal's who uses RegEx.
# 02/02/2024         Fix to allow 2 time periods being added and separating with a space. eg 14m 11d

#
# Usage: [lib.Fix_AS_Age:Age Field]
# {1} - Age field to be converted
#
# Called by: [lib.Add_AS_Marriage], [lib.Add_AS_Burial]


<
[?:{1}!=f]
# 01/02/2024 [{1}:replace:(\d):{$1}::replace:0:NUMPAD0]

[=:asa.age:[{1}:replace:[^0-9ymd ]::gi]]
# 02/02/2024 [asa.age:lowercase:replace:([1-9ymd]):{$1}:g:replace:0:{NUMPAD0}:g]
[asa.age:lowercase:replace:([1-9ymd]):{$1}:g:replace:0:{NUMPAD0}:g:replace:[ ]:{space}:g]

>


[=:End:Fix_AS_Age]

FMP-AS-Census-1841

# Usage: [lib.FMP-AS-Census-1841]

# Collection: 1841 England, Wales & Scotland Census
# Type: Census
# Region: England, Wales, or Scotland
# Year: 1841
# StartField: Sex
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1841]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1841]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1841]
>

FMP-AS-Census-1851

# Usage: [lib.FMP-AS-Census-1851]
# Version: 0.5.0

# Collection: 1851 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1851
# StartField: Relation
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1851]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1851]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1851]
>

FMP-AS-Census-1861

# Usage: [lib.FMP-AS-Census-1861]

# Collection: 1861 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1861
# StartField: Relation
# ManualFields: Number of Children, Number of Rooms
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1861]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1861]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1861]
>

FMP-AS-Census-1871

# Usage: [lib.FMP-AS-Census-1871]
# Description: Number of Children and Number of Rooms are used for Scotland only.

# Collection: 1871 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1871
# StartField: Relation
# ManualFields: Number of Children, Number of Rooms
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1871]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1871]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1871]
>

FMP-AS-Census-1881

# Usage: [lib.FMP-AS-Census-1881]
# Description: Number of Rooms is used for Scotland only.

# Collection: 1881 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1881
# StartField: Relation
# ManualFields: Number of Rooms
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1881]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1881]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1881]
>

FMP-AS-Census-1891

# Usage: [lib.FMP-AS-Census-1891]
# Description: Language Spoken is used for Wales and Scotland only. Number of Rooms is used for Scotland only. 

# Collection: 1891 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1891
# StartField: Relation
# ManualFields: Employ Status; Language Spoken; Number of Rooms
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1891]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1891]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1891]
>

FMP-AS-Census-1901

# Usage: [lib.FMP-AS-Census-1901]
# Description: Language Spoken is used for Wales only. Number of Rooms is used for Scotland only. 

# Collection: 1901 England, Wales & Scotland Census
# Region: England, Wales, or Scotland
# Type: Census
# Year: 1901
# StartField: Relation
# ManualFields: Employ Status; At Home; Language Spoken; Number of Rooms
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1901]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1901]
|
[?:Country=Scotland]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Scotland-1901]
>

FMP-AS-Census-1911

# Usage: [lib.FMP-AS-Census-1911]

# Collection: 1911 Census For England & Wales
# Region: England or Wales
# Type: Census
# Year: 1911
# StartField: Relation
# ManualFields: At Home
# Version: 0.5.0

<
[?:Country=England]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-England-1911]
|
[?:Country=Wales]
{target=ancestral sources}{FAST}
[lib.FMP-AS-Census-Wales-1911]
>

FMP-AS-Census-England-1841

# Usage: [lib.FMP-AS-Census-England-1841]

# Collection: 1841 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1841
# StartField: Sex
# Prefer: FMP-AS-Census-1841
# Version: 0.6.0

{CTRL+A}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>

FMP-AS-Census-England-1851

# Usage: [lib.FMP-AS-Census-England-1851]

# Collection: 1851 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1851
# StartField: Relation
# Prefer: FMP-AS-Census-1851
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1861

# Usage: [lib.FMP-AS-Census-England-1861]

# Collection: 1861 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1861
# StartField: Relation
# Prefer: FMP-AS-Census-1861
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1871

# Usage: [lib.FMP-AS-Census-England-1871]

# Collection: 1871 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1871
# StartField: Relation
# Prefer: FMP-AS-Census-1871
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1881

# Usage: [lib.FMP-AS-Census-England-1881]

# Collection: 1881 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1881
# StartField: Relation
# Prefer: FMP-AS-Census-1881
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1891

# Usage: [lib.FMP-AS-Census-England-1891]

# Collection: 1891 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1891
# StartField: Relation
# ManualFields: Employ Status
# Prefer: FMP-AS-Census-1891
# Version: 0.6.0

[lib.EnterClear:Employ Status]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1901

# Usage: [lib.FMP-AS-Census-England-1901]

# Collection: 1901 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1901
# StartField: Relation
# ManualFields: Employ Status; At Home
# Prefer: FMP-AS-Census-1901
# Version: 0.6.0

[lib.EnterClear:Employ Status:At Home]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]M
|
[?:Marital status/^S/]S
|
[?:Marital status/^U/]S
|
[?:Marital status/^W/]W
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-England-1911

# Usage: [lib.FMP-AS-Census-England-1911]

# Collection: 1911 Census For England & Wales
# Type: Census
# Region: England
# Year: 1911
# StartField: Relation
# ManualFields: At Home
# Prefer: FMP-AS-Census-1911
# Version: 0.5.0

[lib.EnterClear:At Home]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Marital status:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Number:Years married]|{DELETE}>
{TAB}<[lib.AS-Number:Total children born]|{DELETE}>
{TAB}<[lib.AS-Number:Children still living]|{DELETE}>
{TAB}<[lib.AS-Number:Children who have died]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Industry]|{DELETE}>
{TAB}<[Employment status]|[Employ status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Nationality as transcribed]|[Nationality]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Scotland-1841

# Usage: [lib.FMP-AS-Census-Scotland-1841]

# Collection: 1841 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1841
# StartField: Sex
# Prefer: FMP-AS-Census-1841
# Version: 0.6.0

{CTRL+A}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>

FMP-AS-Census-Scotland-1851

# Usage: [lib.FMP-AS-Census-Scotland-1851]

# Collection: 1851 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1851
# StartField: Relation
# Prefer: FMP-AS-Census-1851
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Scotland-1861

# Usage: [lib.FMP-AS-Census-Scotland-1861]

# Collection: 1861 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1861
# StartField: Relation
# ManualFields: Number of Children, Number of Rooms
# Prefer: FMP-AS-Census-1861
# Version: 0.6.0

[lib.EnterClear:Number of Children:Number of Rooms]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Number of Children]|{DELETE}>
{TAB}<[Number of Rooms]|{DELETE}>

FMP-AS-Census-Scotland-1871

# Usage: [lib.FMP-AS-Census-Scotland-1871]

# Collection: 1871 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1871
# StartField: Relation
# ManualFields: Number of Children, Number of Rooms
# Prefer: FMP-AS-Census-1871
# Version: 0.6.0

[lib.EnterClear:Number of Children:Number of Rooms]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Number of Children]|{DELETE}>
{TAB}<[Number of Rooms]|{DELETE}>

FMP-AS-Census-Scotland-1881

# Usage: [lib.FMP-AS-Census-Scotland-1881]

# Collection: 1881 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1881
# StartField: Relation
# ManualFields: Number of Rooms
# Prefer: FMP-AS-Census-1881
# Version: 0.6.0

[lib.EnterClear:Number of Rooms]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Number of Rooms]|{DELETE}>

FMP-AS-Census-Scotland-1891

# Usage: [lib.FMP-AS-Census-Scotland-1891]

# Collection: 1891 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1891
# StartField: Relation
# ManualFields: Language Spoken; Number of Rooms
# Prefer: FMP-AS-Census-1891
# Version: 0.6.0

[lib.EnterClear:Language Spoken:Number of Rooms]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Language]|[Language spoken]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Number of Rooms]|{DELETE}>

FMP-AS-Census-Scotland-1901

# Usage: [lib.FMP-AS-Census-Scotland-1901]

# Collection: 1901 England, Wales & Scotland Census
# Type: Census
# Region: Scotland
# Year: 1901
# StartField: Relation
# ManualFields: Employ Status; At Home; Number of Rooms
# Prefer: FMP-AS-Census-1901
# Version: 0.6.0

[lib.EnterClear:Employ Status:At Home:Number of Rooms]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]M
|
[?:Marital status/^S/]S
|
[?:Marital status/^U/]S
|
[?:Marital status/^W/]W
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Language]|[Language spoken]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Number of Rooms]|{DELETE}>

FMP-AS-Census-Wales-1841

# Usage: [lib.FMP-AS-Census-Wales-1841]

# Collection: 1841 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1841
# StartField: Sex
# Prefer: FMP-AS-Census-1841
# Version: 0.6.0

{CTRL+A}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>

FMP-AS-Census-Wales-1851

# Usage: [lib.FMP-AS-Census-Wales-1851]

# Collection: 1851 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1851
# StartField: Relation
# Prefer: FMP-AS-Census-1851
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Wales-1861

# Usage: [lib.FMP-AS-Census-Wales-1861]

# Collection: 1861 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1861
# StartField: Relation
# Prefer: FMP-AS-Census-1861
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Wales-1871

# Usage: [lib.FMP-AS-Census-Wales-1871]

# Collection: 1871 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1871
# StartField: Relation
# Prefer: FMP-AS-Census-1871
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Wales-1881

# Usage: [lib.FMP-AS-Census-Wales-1881]

# Collection: 1881 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1881
# StartField: Relation
# Prefer: FMP-AS-Census-1881
# Version: 0.6.0

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>

FMP-AS-Census-Wales-1891

# Usage: [lib.FMP-AS-Census-Wales-1891]

# Collection: 1891 England, Wales & Scotland Census
# Type: Census
# Region: Wales
# Year: 1891
# StartField: Relation
# ManualFields: Employ Status; Language Spoken
# Prefer: FMP-AS-Census-1891
# Version: 0.6.0

[lib.EnterClear:Employ Status:Language Spoken]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]Mar
|
[?:Marital status/^S/]Unm
|
[?:Marital status/^U/]Unm
|
[?:Marital status/^W/]Wid
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Language]|[Language spoken]|{DELETE}>

FMP-AS-Census-Wales-1901

# Usage: [lib.FMP-AS-Census-Wales-1901]

# Collection: 1901 England, Wales & Scotland Census
# Type: Census
# Region: England
# Year: 1901
# StartField: Relation
# ManualFields: Employ Status; At Home; Language Spoken
# Prefer: FMP-AS-Census-1901
# Version: 0.6.0

[lib.EnterClear:Employ Status:At Home:Language Spoken]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}
<
[?:Marital status/^M/]M
|
[?:Marital status/^S/]S
|
[?:Marital status/^U/]S
|
[?:Marital status/^W/]W
|
{DELETE}
>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Employ Status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Where Born]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Language]|[Language Spoken]|{DELETE}>

FMP-AS-Census-Wales-1911

# Usage: [lib.FMP-AS-Census-Wales-1911]

# Collection: 1911 Census For England & Wales
# Type: Census
# Region: Wales
# Year: 1911
# StartField: Relation
# ManualFields: At Home
# Prefer: FMP-AS-Census-1911
# Version: 0.5.0

[lib.EnterClear:At Home]

{CTRL+A}<[Relationship to head]|[Relationship]|{DELETE}>
{TAB}<[Sex:substring:1:1]|{DELETE}>
{TAB}<[lib.AS-Age:Age as transcribed]|[lib.AS-Age:Age]|{DELETE}>
{TAB}

# Marital status is in Welsh, but AS template expects English
<
[?:Marital status]
<
[?:Marital status=Priod]M
|
[?:Marital status=Sengl]S
|
[?:Marital status=Gweddw]W
|
[Marital status:substring:1:1]
>
|
{DELETE}
>
{TAB}<[lib.AS-Number:Years married]|{DELETE}>
{TAB}<[lib.AS-Number:Total children born]|{DELETE}>
{TAB}<[lib.AS-Number:Children still living]|{DELETE}>
{TAB}<[lib.AS-Number:Children who have died]|{DELETE}>
{TAB}<[Occupation]|{DELETE}>
{TAB}<[Industry]|{DELETE}>
{TAB}<[Employment status]|[Employ status]|{DELETE}>
{TAB}<[At Home]|{DELETE}>
{TAB}<[Birth place as transcribed]|[Birth place]|{DELETE}>
{TAB}<[Nationality as transcribed]|[Nationality]|{DELETE}>
{TAB}<[Disability]|[Infirmity]|{DELETE}>
{TAB}<[Language as spoken]|[Language]|{DELETE}>

FMP-AS-UK-Census-Address

# Usage: [lib.FMP-AS-UK-Census-Address]
# Description: Emits a value intended for the "Address" field in Census-type templates for the UK.

# Used: FMP-AS-UK-Census-Source
# Version: 0.5.0

<
[Address]
|
<[+:, ][Home]>
<[+:, ][House name]>
<[+:, ][House Number]>
<[+:, ][Street]>
>

FMP-AS-UK-Census-Place

# Usage: [lib.FMP-AS-UK-Census-Place]
# Description: Emits a value intended for the "Place" field in Census-type templates for the UK.

# Used: FMP-AS-UK-Census-Source
# Version: 0.5.0

<[?:Parish]|[=:Parish:[Parish or township]]>
<[?:Parish!=[Registration District]][=:rd:[Registration District]]>

<
<[+:, ][Town]>
<[+:, ][Parish]>
<[+:, ][rd]>
<[+:, ][County:replace:, : & ]>
<[+:, ][Country]>
>

FMP-AS-UK-Census-Ref-ID

# Usage: [lib.FMP-AS-UK-Census-Ref-ID]
# Description: Emits a value intended for the "Ref ID" field in Census-type templates for the UK.

# Used: FMP-AS-UK-Census-Source
# Version: 0.5.0

<
<[+:/][Archive reference]|[+:/][Archive series]>
<[+:/][Piece number]>
<[+:/][Book number]|[+:/][Book]>
<[+:/][Page number]|[+:/][Page]>
>

FMP-AS-UK-Census-Source

# Usage: [lib.FMP-AS-UK-Census-Source]
# Description: Use this from an Auto Type Template to set the Place, Address, and Ref ID values in an Ancestral Sources Census template. 

# Collection: 1841 through 1911 UK Census Collections
# Type: Census
# Region: England, Wales, or Scotland
# Year: 1841 - 1911
# StartField: Place
# Version: 0.5.0

{target=ancestral sources}{FAST}
{CTRL+A}<[lib.FMP-AS-UK-Census-Place]|{DELETE}>
{TAB}{CTRL+A}<[lib.FMP-AS-UK-Census-Address]|{DELETE}>
{TAB}{CTRL+A}<[lib.FMP-AS-UK-Census-Ref-ID]|{DELETE}>

FMP-AS-UK-Census-Where-Born

# Usage: [lib.FMP-AS-UK-Census-Where-Born]
# Description: Emits a value intended for the "Where Born" cell in Census-type templates for the UK. Assembles a value by concatenating town, county, and country, then uses that value or the "Birth place" Field value depending on which has more parts. Used by Text Templates for UK census collections.

# Version: 0.5.0

# Get full (?) place
[=:wb.bp:[Birth place as transcribed]]
<[?:wb.bp]|[=:wb.bp:[Birth place other as transcribed]]>
<[?:wb.bp]|[=:wb.bp:[Birth place]]>
<[?:wb.bp]|[=:wb.bp:[Birth place other]]>

# Get place parts
[=:wb.bt:[Birth town as transcribed]]
<[?:wb.bt]|[=:wb.bt:[Birth town]]>

[=:wb.bc:[Birth county as transcribed]]
<[?:wb.bc]|[=:wb.bc:[Birth county]]>

[=:wb.bcn:[Birth country as transcribed]]
<[?:wb.bcn]|[=:wb.bcn:[Birth country]]>

# Build wb.pl from parts
[=:wb.pl:,]
[=:wb.pl:[wb.bt:capitalize:append:,]]
[=:wb.pl:[wb.pl:append:[wb.bc:capitalize:append:,]]]
[=:wb.pl:[wb.pl:append:[wb.bcn:capitalize:append:,]]]
[=:wb.pl:[wb.pl:replace:(^,+|,+$)::g:replace:[,]{2,}:,]]
[=:wb.pl:[wb.pl:replace:, :,:g:replace:,:, ]]

# Which has more parts?
[=:wp.bpc:[wb.bp:splitCount:,]]
[=:wp.plc:[wb.pl:splitCount:,]]

<
[?:wp.bpc>[wp.plc]]
[wb.bp:capitalize]
|
[wb.pl]
>

FreeBMD_Birth

#
# Author: Alan
# Description: 
# Usage: [lib.FreeBMD_Birth:Fact]

# Change History       Reason for change 
# ----------------     -----------------------------------------------------------------------------
# 16/06/2024 BETA7     Initial creation.
# 25/06/2024 BETA7_5   Field [var.zRecordNo] did not exist, Surround with <>.
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add birth fact.
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{TAB*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFactType=Death]{TAB*3}|{TAB*2}>


# Add reference to Notes field and tab across to Source box
[lib.SetGRORefNote]
{tab}

>

# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:SCI Birth]


#Execute code at this speed
{FAST}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Mother's maiden name
<[var.zMothersMaidenName]>{TAB}

# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Quarter
[var.zCivilRegQtr]{TAB}

# Registration Month
<[var.zCivilRegMonth]>{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
[var.zVolume]{TAB}

# Page
[var.zPage]{TAB}

# Register Number
<[var.zCivilRegisterNumber]>{TAB}

# Registration Entry Number
<[var.zCivilRegEntryNumber]>{TAB}

# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No. - Only applies to sites like Ancestry, Findmypast, FamilySearch, etc.
<[var.zRecordNo]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Research Qtr/Month
{TAB}

# No images for civil reg from 1984 as system was online.
[lib.FreeBMD_Media]


<[?:var.Debug=0]

## Do nothing
>

FreeBMD_Death

##
# Author: Alan
# Description: 
# Usage: [lib.FreeBMD_Death:Fact]

# Change History       Reason for change 
# ----------------     -----------------------------------------------------------------------------
# 16/06/2024 BETA7     Initial creation.
# 25/06/2024 BETA7_5   Field [var.zRecordNo] did not exist, Surround with <>.


[==:var.debug:1]


[=:p1.Fact:{1}]

# ===============Add Fact=============================================================

<
[?:p1.Fact=Fact]
# Add birth fact.
{Ctrl+I}[var.zFact]{Enter}
{Tab}

#Execute code at this speed
#{fast}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{Tab*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFact=Death]{tab*3}|{tab*2}>


# Add reference to Notes field and tab across to Source box
#[lib.SetGRORefNote]
{tab}

# End of Death fact insertion
>

# ===============Add Citation=============================================================

# Fill in generic source template "FreeBMD Death".
<[?:var.ConfigSourceType=generic][lib.Add_FH_Citation:None][lib.WriteDeath]>

# Select Source Template.
[lib.Add_FH_Citation:SCI Death]


#Execute code at this speed
#{fast}



#Execute code at this speed
{fast}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Age at Death
<[var.zAgeAtDeath]>{TAB}

# Birth Date (introduced in 2nd Qtr of 1969)
<[var.zBirthDate]>{TAB}

# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Quarter
[var.zCivilRegQtr]{TAB}

# Registration Month (from 1984)
<[var.zCivilRegMonth]>{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
<[var.zVolume]>{TAB}
# Page
<[var.zPage]>{TAB}

# Register number and entry number introduced in 1984 to replace volume and page
<[var.zCivilRegisterNumber]>{TAB}
<[var.zCivilRegEntryNumber]>{TAB}


# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No.
<[var.zRecordNo]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}


# No images for civil reg from 1984 as system was online.
[lib.FreeBMD_Media]


<[?:var.Debug=0]
## Do nothing
>

FreeBMD_Marriage

#
# Author: Alan
# Description: 
# Usage: [lib.FreeBMD_Birth:Fact]

# Change History       Reason for change 
# ----------------     -----------------------------------------------------------------------------
# 16/06/2024 BETA7     Initial creation.
[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================

<[?:Param1=Fact]


# Add birth fact.
{Ctrl+I}[var.zFact]{ENTER}


<
[?:var.zFact=Marriage]
<
[?:Wife number=1]|
[?:Wife number=2]{DOWN}|
[?:Wife number=3]{DOWN*2}|
[?:Wife number=4]{DOWN*3}|
[?:Wife number=5]{DOWN*4}
>
{ENTER}
>
{TAB}

#Execute code at this speed
#{FAST}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{TAB*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFactType=Death]{TAB*3}|{TAB*2}>


# Add reference to Notes field and tab across to Source box
[lib.SetGRORefNote]
{TAB}

>


# ===============Add Citation=============================================================

<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Generic source
[?:var.ConfigSourceType=Generic]

# Select Source Template.
[lib.Add_FH_Citation:None]

#Execute code at this speed
#{FAST}


# Fill in source template "FreeBMD Marriage".
[lib.WriteMarriage]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Templated source

# Select Source Template.
[lib.Add_FH_Citation:SCI Marriage]


#Execute code at this speed
{SLOW}




# Fill in source template "SCI Marriage".

# This only works if Male is selected. Its a problem if putting in Female.
<
[?:var.zGender=m]
[=:HusbandsName:[var.zFullName]]
[=:WifesName:[var.zSpouseFullname]]
|
[?:var.zGender=f]
[=:HusbandsName:[var.zSpouseFullname]]
[=:WifesName:[var.zFullName]]
>




# Principal 1 is the record being processed
# Husband's surname
[HusbandsName:nameSurname]{TAB}

# Husband's given name(s)
[HusbandsName:nameGiven]{TAB}

# Wife's surname
[WifesName:nameSurname]{TAB}

# Wife's given name(s)
[WifesName:nameGiven]{TAB}


# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Qtr
[var.zCivilRegQtr]{TAB}

# Registration Month
<[var.zCivilRegMonth]>{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
[var.zVolume]{TAB}

# Page
[var.zPage]{TAB}

# Registration Register Number
<[var.zCivilRegisterNumber]>{TAB}

# Registration Entry Number
<[var.zCivilRegEntryNumber]>{TAB}

# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL Husband
<[?:var.zGender=m]<[URL]|[Page.URL]>>{TAB}

# URL Wife
<[?:var.zGender=f]<[URL]|[Page.URL]>>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No.
<[var.zRecordNo]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}




# No images for civil reg from 1984 as system was online.
[lib.FreeBMD_Media]





#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++End of source type checks

>


#######################################################################################
<[?:var.Debug=0]
#######################################################################################

## Do nothing
>

FreeBMD_Media

#
# Author: Alan
# Description: 
# Usage: [lib.FreeBMD_Media]

# Change History       Reason for change 
# ----------------     -----------------------------------------------------------------------------
# 16/06/2024 BETA7     Called by FreeBMD Birth and Death and Marriage

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{TAB}

# Move to Media tab.
{CTRL+TAB*3}

{SLOW}
# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

# Slight pause so path can be entered correctly.
{1000}

# Windows Folder where media is opened from.
[var.zMediaSource]
{ENTER}

# Add to FH folder
[var.zFactFolder]
{ENTER}

FTP_Add_BirthDeath

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the birth and deaths details of the selected person on the Ancestry profile
#              to the person focused in Family Historian. The cursor must be on the birth date
#              field of the main tab in th property box.
# Usage: [lib.FTP_Add_BirthDeath]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Child

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a child to the person
#              who has the focus in Family Historian.
# Usage: [lib.FTP_Add_Child]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add child's name (NB. {TAB} is to select first family in the list - may need a WIFE parameter)
{Alt+A}c{TAB}{ENTER}
[Name:nameGiven]

# Go to sex
{TAB*2}
[lib.GetGender:Name]

# Ancestry has a GENDER field but use result of [lib.GetGender:Name].
<
[?:Gender=M]{down*2}
|
[?:Gender=F]{down*3}
>

# Go to birth details (skip over occupation)
{TAB*2}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Father

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a father to the person
#              who has the focus in Family Historian.
# Usage: [lib.FTP_Add_Father]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add father's first names
{Alt+A}p{ENTER}m
[Name:nameGiven]

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Father_mother_exists

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a father to the person
#              who has the focus in Family Historian.
#              When the first parent is created a family record is created. When the other parent is 
#              added FH asks which family does this parent belong to.
#               

# Usage: [lib.FTP_Add_Father_mother_exists]


# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add father's first names
{Alt+A}p{ENTER}m
[Name:nameGiven]

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Mother_father_exists

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a mother to the person
#              who has the focus in Family Historian.
# Usage: [lib.FTP_Add_Mother_father_exists]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add mother's first names
{Alt+A}p{TAB}{ENTER}{ENTER}f
[Name]

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Mother_no_Parents

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a mother to the person
#              who has the focus in Family Historian.
# Usage: [lib.FTP_Add_Mother_no_Parents]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add mother's first names
{Alt+A}p{ENTER}f
[Name]

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Parent

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a father to the person
#              who has the focus in Family Historian.
#              When the first parent is created a family record is created. When the other parent is 
#              added FH asks which family does this parent belong to.
#               

# Parameters:
#             {1} = Mother or Father (which parent is being added)
#             {2} = Exists (if other parent exists)

# Usage: [lib.FTP_Add_Parent]

[=:zParent:{1}]
[=:zExists:{2}]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 03/07/2024 BETA7_21  Initial creation.

# Execution speed
{fast}

<
[?:zParent/^m/]
|
[?:zParent/^f/]
|
[=:Error - father or mother not selected]
>


# Add Parent
{Alt+A}p

<
[?:zExists/^e/]
{TAB}{ENTER}
>

# Create new parent
{ENTER}

# Sex of parent
<[?:zParent/^f/]M|F>

# Enter given name(s)
<[?:zParent/^f/][Name:nameGiven]|[Name]>

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

FTP_Add_Spouse

#
# Author: Alan (inspired by Paul Tanner-Tremaine)
# Description: Add the selected person on the Ancestry profile as a spouse to the person
#              who has the focus in Family Historian.
# Usage: [lib.FTP_Add_Spouse]

# Change History       Reason for change
# -------------------  ----------------------------------------------------
# 06/02/2023           Initial creation.
# 28/06/2024 BETA7_13  Convert collection template to library template.
# 03/07/2024 BETA7_20  Remove [lib.SetAncestryImportFlag].

# Execution speed
{fast}

# Add spouse's name
{Alt+A}s{ENTER}
[Name]

# Go to birth details (skip over more..., sex, occupation)
{TAB*4}

# Add birth date and place.
<[Birth Date]>{TAB}
<[Birth Place]>{TAB}

# Skip over baptism details
{TAB*2}

# Add death date and place.
<[Death Date]>{TAB}
<[Death Place]>

Funeral Notice

#
# Author: Alan
# Description: 
# Usage: [lib.Funeral Notice:Fact]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 03/04/2023 11:00   First attempt
# 26/06/2024 BETA8   Converted from collection to library template.
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add event fact - burial or cremation
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Event Date
[Event Date]
{TAB}

# Event Place
[Event Location]{TAB}

# Address
{TAB}

# Note
{TAB}

>


# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:Funeral Notice]


#Execute code at this speed
{FAST}

# Fill in source template.

[var.zFullName]{Tab}

<[Death Date]>{TAB}

[Date Published]{TAB}

<[Newspaper][lib.ValidateInputField:Newspaper]>{TAB}

[var.zEvent]{TAB}

<[Event Date]>{TAB}

<[Event Location][lib.ValidatePlace:Event Location]>{TAB}

[Obituary Text]{TAB}

<[URL]|Page.URL]>{TAB}

# Repository
[lib.SetRepository]{TAB}

# Research date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:S]{TAB}


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactFolder]
{ENTER}



# Move to Text from Source tab from Media tab.
{Shift+Ctrl+Tab*2}

# Insert Text from Source template.
[lib.InsertTextfromSource:Funeral Notice]





<[?:var.Debug=0]
## Do nothing
>

Funeral Notice_DeathUpdate

#
# Author: Alan
# Description: Using Funeral Notice source update existing death date or add death fact 
# Usage: [lib.Funeral Notice_DeathUpdate]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 26/06/2024 BETA8   New functionality for Funeral Notice.
#


[==:var.debug:1]



# ===============Add Fact=============================================================
<
[?:var.zUpdateDeath=A]

# Add death fact
{Ctrl+I}Death{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Death Date
[Death Date]
{TAB}

>


# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:Funeral Notice:EXIST]

#Execute code at this speed
{FAST}

{TAB*12}
[lib.SetAssessment:S]{TAB}

<[?:var.Debug=0]
## Do nothing
>

GertServices

#[=:Start:GetServices]

#
# Author : Alan
#
# Description: Categorise services records into service and create record type to be used for
#              saving source
#
# Usage: [lib.GetServices]
#
# Change History      Reason for change
# ----------------    ----------------------------------------------------------------------------
# 08/07/2024 BETA8    Initial creation.


<
#A

#B
 	

#C

 	
#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O


#P

#Q

#R
 	
#S

#T

#U

# Web: UK, Royal Naval Seamen Index, 1853 -1872
[?:Collection ID=70684]
[==:var.zService:Royal Navy]
[==:var.zServiceMedia:Navy Index]
|

# UK, Royal Navy Registers of Seamen's Services, 1848-1939
[?:Collection ID=60522]
[==:var.zService:Royal Navy]
[==:var.zServiceMedia:Navy Register]

#V
	
#W
	
#Y


# Error
|

[lib.ErrorMessage:Update library template GetServices]

>

 	
#[=:End:GetServices]

Get_GRO_DistrictCounty

# [=:Start:Get_GRO_DistrictCounty]
#
# Author : Inspired by Paul Tanner-Tremaine
#
# Description: Get the full registration district address.
#
# an attempt to add the county and country to the GRO Registration District
# if value of District has a match, then output updated data.  No match, just add , England
# building up this list as I trawl through the GRO records, adding the result to the birth place field
# with the county.  We still have the Registered district in the citation where within.
# surprised me as to how quick ORA reads this file and responds!




# Variables    Input variable: [District]
#              Output variable(s): [DistrictCounty], [var.DistrictCounty]
#
# Usage: [lib.Get_GRO_DistrictCounty]
#
# Called by: 
#
# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 15/09/2023 14:40   Only validate [DistrictCounty] when field [z_Surname] is not empty.
# 31/10/2023         Added Longtown RegDist, Cumberland, England.
# 02/02/2024         Added St Saviour Southwark London; Mile End Old Town; Farnham; Kingston upon Thames;
# 04/02/2024         Removed the prompt for missing GRO Reg District and replaced with [var.zError].
# 07/02/2024         Added Newington.
# 10/02/2024         Added Thanet RegDist, Kent, England
# 10/02/2024         Added Surrey North Western RegDist, Surrey, England
# 11/02/2024         Added Luton RegDist, Bedfordshire, England
# 15/02/2024         Added Portsmouth RegDist, Hampshire, England
# 15/02/2024         Added Poole RegDist, Dorset, England
# 15/02/2024         Added Devon Central RegDist, Devon, England
# 15/02/2024         Added Eton RegDist, Buckinghamshire, England
# 15/02/2024         Added Faversham RegDist, Kent, England
# 17/02/2024         Added Willesden RegDist, Middlesex, England
# 17/02/2024         Added Bridgwater RegDist, Somerset, England
# 19/02/2024         Added Taunton Deane RegDist, Somerset, England
# 19/02/2024         Added Somerset RegDist, Somerset, England
# 19/02/2024         Added Kent RegDist, Kent, England
# 19/02/2024         Added Maidstone RegDist, Kent, England
# 19/02/2024         Added Ashford RegDist, Kent, England
# 22/02/2024         Added Dover RegDist, Kent, England
# 26/02/2024         Added Easthampstead RegDist, Berkshire, England
# 26/02/2024         Added Surrey North-Western RegDist, Surrey, England
# 27/02/2024         Added Chichester RegDist, Sussex, England.
# 27/02/2024         Added "," (comma) missing from field [DistrictCounty].
# 28/02/2024         Added Hastings and Rother RegDist, Sussex, England.
# 28/02/2024         Added Yarmouth RegDist, Norfolk, England.
# 28/02/2024         Added Surrey South Western RegDist, Surrey, England.
# 02/03/2024         Added Heywood RegDist, Lancashire, England
# 02/03/2024         Added Littleborough RegDist, Lancashire, England
# 03/03/2024         Added Denbighshire North RegDist, Denbighshire, Wales.
# 03/03/2024         Added Denbigh North RegDist, Denbighshire, Wales.
# 03/03/2024         Added Surrey Northern RegDist, Surrey, Wales.
# 03/03/2024         Added Hitchin & Stevenage RegDist, Hertfordshire, England.
# 03/03/2024         Added Hitchin And Stevenage RegDist, Hertfordshire, England.
# 04/03/2024         Speeded up search process using 1st letter.
# 04/03/2024         Added Brighthelmston RegDist, Sussex, England.
# 04/03/2024         Added St Martin RegDist, Middlesex, England.
# 04/03/2024         Added St. Martin RegDist, Middlesex, England.
# 04/03/2024         Added St Martin in the Fields RegDist, Middlesex, England.
# 04/03/2024         Added St. Martin in the Fields RegDist, Middlesex, England.
# 04/03/2024         Added St. Martin In The Fields Middlesex RegDist, Middlesex, England.
# 04/03/2024         Added Richmond RegDist, Surrey, England.
# 04/03/2024         Added Richmond (Surrey) RegDist, Surrey, England.
# 04/03/2024         Added Wycombe RegDist, Buckinghamshire and Oxfordshire, England.
# 05/03/2024         Added Torbay Regdist, Devon, England.
# 05/03/2024         Added Bridge RegDist, Kent, England.
# 05/03/2024         Added Faringdon Regdist, Berkshire, England.
# 06/03/2024         Added Grimsby RegDist, Lincolnshire, England.
# 06/03/2024         Added Doncaster RegDist, Yorkshire, England.
# 06/03/2024         Added Oxford RegDist, Oxfordshire, England.
# 06/03/2024         Added Truro RegDist, Cornwall, England.
# 06/03/2024         Added Amersham RegDist, Buckinghamshire, England.
# 06/03/2024         Added York RegDist, Yorkshire, England.
# 06/03/2024         Added Andover RegDist, Hampshire, England.
# 06/03/2024         Added Wantage RegDist, Berkshire, England.
# 07/03/2024         Added Wallingford RegDist, Berkshire, England.
# 07/03/2024         Added Witney RegDist, Oxfordshire, England.
# 08/03/2024         Added Chelsea RegDist, Middlesex, England.
# 08/03/2024         Added Fulham RegDist, Middlesex, England.
# 08/03/2024         Added St George Hanover Square RegDist, London, England.
# 08/03/2024         Added St. George Hanover Square RegDist, London, England.
# 08/03/2024         Added Rochford RegDist, Essex, England.
# 08/03/2024         Added Scunthorpe RegDist, Lincolnshire, England.
# 10/03/2024         Added Romford RegDist, Essex, England.
# 12/03/2024         Added Reading RegDist, Berkshire, England.
# 12/03/2024         Added Bridport RegDist, Dorset, England.
# 12/03/2024         Added Weymouth RegDist, Dorset, England.
# 12/03/2024         Added Beaminster RegDist, Dorset, England.
# 12/03/2024         Added Wandsworth RegDist, Surrey, England.
# 12/03/2024         Added Bermondsey RegDist, London, England.
# 12/03/2024         Added Canterbury RegDist, Kent, England.
# 12/03/2024         Added Colchester RegDist, Essex, England.
# 12/03/2024         Added Edmonton RegDist, Middlesex, England.
# 12/03/2024         Added Enfield RegDist, Middlesex, England.
# 12/03/2024         Added Hounslow RegDist, Middlesex, England.
# 12/03/2024         Added Hungerford RegDist, Berkshire, England.
# 12/03/2024         Added Kingston upon Thames RegDist, Surrey, England.
# 12/03/2024         Added London City RegDist, London, England.
# 12/03/2024         Added Milton City RegDist, London, England.
# 12/03/2024         Added Paddington RegDist, London, England.
# 12/03/2024         Added Richmond upon Thames RegDist, Surrey, England.
# 12/03/2024         Added St Saviour Southwark RegDist, London, England.
# 14/03/2024         Added Richmond upon Thames RegDist, Surrey, England.
# 23/03/2024         Added Shardlow RegDist, Derbyshire, England.
# 23/03/2024         Added Uttoxeter RegDist, Staffordshire, England.
# 23/05/2024 BETA6   New project parameter - [var.PlaceParts]

<
[?:District]

<
[?:District:substring:1:1=A]

#A
<
[?:District=Abingdon][=:DistrictCounty:Abingdon RegDist, Oxfordshire/Berkshire, England]|
[?:District=Acle][=:DistrictCounty:Acle RegDist, Norfolk, England]|
[?:District=Alcester][=:DistrictCounty:Alcester RegDist, Warwickshire, England]|
[?:District=Alcester Union In The Counties Of Warwick And Worc][=:DistrictCounty:Alcester Union RegDist, Warwick And Worcestershire, England]|
[?:District=Alderbury][=:DistrictCounty:Alderbury RegDist, Wiltshire, England]|
[?:District=Aldershot][=:DistrictCounty:Aldershot RegDist, Hampshire, England]|
[?:District=Aldridge & Brownhills][=:DistrictCounty:Aldridge & Brownhills RegDist, Staffordshire, England]|
[?:District=Alnwick][=:DistrictCounty:Alnwick RegDist, Northumberland, England]|
[?:District=Alresford][=:DistrictCounty:Alresford RegDist, Hampshire, England]|
[?:District=Alston][=:DistrictCounty:Alston RegDist, Cumberland, England]|
[?:District=Alton][=:DistrictCounty:Alton RegDist, Hampshire, England]|
[?:District=Altrincham Union][=:DistrictCounty:Altrincham RegDist, Cheshire, England]|
[?:District=Altrincham][=:DistrictCounty:Altrincham RegDist, Cheshire, England]|
[?:District=Alverstoke][=:DistrictCounty:Alverstoke RegDist, Hampshire, England]|
[?:District=Amber Valley][=:DistrictCounty:Amber Valley RegDist, Derbyshire, England]|
[?:District=Amersham][=:DistrictCounty:Amersham RegDist, Buckinghamshire, England]|
[?:District=Amesbury][=:DistrictCounty:Amesbury RegDist, Wiltshire, England]|
[?:District=Amounderness][=:DistrictCounty:Amounderness RegDist, Lancashire, England]|
[?:District=Ampthill][=:DistrictCounty:Ampthill RegDist, Bedfordshire, England]|
[?:District=Andover][=:DistrictCounty:Andover RegDist, Hampshire, England]|
[?:District=Appleby][=:DistrictCounty:Appleby RegDist, Cumbria, England]|
[?:District=Ashbourne][=:DistrictCounty:Ashbourne RegDist, Derbyshire, England]|
[?:District=Ashby de la Zouch][=:DistrictCounty:Ashby de la Zouch RegDist, Leicestershire, England]|
[?:District=Ashford with Shepway][=:DistrictCounty:Ashford with Shepway RegDist, Kent, England]|
[?:District=Ashford][=:DistrictCounty:Ashford RegDist, Kent, England]|
[?:District=Ashton And Oldham][=:DistrictCounty:Ashton And Oldham RegDist, Lancashire, England]|
[?:District=Ashton Under Lyne][=:DistrictCounty:Ashton Under Lyne RegDist, Lancashire and Cheshire, England]|
[?:District=Ashtonunderlyne][=:DistrictCounty:Ashton Under Lyne RegDist, Lancashire and Cheshire, England]|
[?:District=Ashton][=:DistrictCounty:Ashton RegDist, Lancashire, England]|
[?:District=Ashton & Oldham][=:DistrictCounty:Ashton & Oldham RegDist, Lancashire, England]|
[?:District=Ashton under Lyne][=:DistrictCounty:Ashton under Lyne RegDist, Lancashire, England]|
[?:District=Askrigg][=:DistrictCounty:Askrigg RegDist, Yorkshire North Riding, England]|
[?:District=Aston Union][=:DistrictCounty:Aston RegDist, Warwickshire, England]|
[?:District=Aston][=:DistrictCounty:Aston RegDist, Warwickshire, England]|
[?:District=Atcham][=:DistrictCounty:Atcham RegDist, Shropshire, England]|
[?:District=Atherstone][=:DistrictCounty:Atherstone RegDist, Warwickshire and Leicestershire, England]|
[?:District=Auckland][=:DistrictCounty:Auckland RegDist, Co. Durham, England]|
[?:District=Axbridge Union][=:DistrictCounty:Axbridge RegDist, Somerset, England]|
[?:District=Axbridge][=:DistrictCounty:Axbridge RegDist, Somerset, England]|
[?:District=Axminster][=:DistrictCounty:Axminster RegDist, Devon, England]|
[?:District=Aylesbury][=:DistrictCounty:Aylesbury RegDist, Buckinghamshire, England]|
[?:District=Aylesbury Vale][=:DistrictCounty:Aylesbury Vale RegDist, Buckinghamshire, England]|
[?:District=Aylsham][=:DistrictCounty:Aylsham RegDist, Norfolk, England]|
[?:District=Aysgarth][=:DistrictCounty:Aysgarth RegDist, Yorkshire North Riding, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#B
|
[?:District:substring:1:1=B]

<
[?:District=Barking][=:DistrictCounty:Barking RegDist, Greater London, England]|
[?:District=Barkston Ash][=:DistrictCounty:Barkston Ash RegDist, Yorkshire West Riding, England]|
[?:District=Barnet][=:DistrictCounty:Barnet RegDist, Hertfordshire and Middlesex, England]|
[?:District=Barnsley][=:DistrictCounty:Barnsley RegDist, Yorkshire, England]|
[?:District=Barnstaple Union][=:DistrictCounty:Barnstaple RegDist, Devonshire, England]|
[?:District=Barnstaple][=:DistrictCounty:Barnstaple RegDist, Devonshire, England]|
[?:District=Barrow in Furness][=:DistrictCounty:Barrow in Furness RegDist, Cumbria/Lancashire, England]|
[?:District=Barrow upon Soar][=:DistrictCounty:Barrow upon Soar RegDist, Leicestershire, England]|
[?:District=Barton Regis][=:DistrictCounty:Barton Regis RegDist, Gloucestershire, England]|
[?:District=Barton upon Irwell][=:DistrictCounty:Barton upon Irwell RegDist, Lancashire, England]|
[?:District=Barton Upon Irwell][=:DistrictCounty:Barton Upon Irwell RegDist, Lancashire, England]|
[?:District=Barton][=:DistrictCounty:Barton Upon Irwell RegDist, Lancashire, England]|
[?:District=Barton, Worsley & Flixton][=:DistrictCounty:Barton, Worsley & Flixton RegDist, Lancashire, England]|
[?:District=Basford][=:DistrictCounty:Basford RegDist, Nottinghamshire, England]|
[?:District=Basingstoke][=:DistrictCounty:Basingstoke RegDist, Hampshire, England]|
[?:District=Bassetlaw][=:DistrictCounty:Bassetlaw RegDist, Nottinghamshire, England]|
[?:District=Bath][=:DistrictCounty:Bath RegDist, Somerset, England]|
[?:District=Bathavon][=:DistrictCounty:Bathavon RegDist, Somerset, England]|
[?:District=Battersea][=:DistrictCounty:Battersea RegDist, London, England]|
[?:District=Battle][=:DistrictCounty:Battle RegDist, East Sussex/Sussex, England]|
[?:District=Beaminster][=:DistrictCounty:Beaminster RegDist, Dorset, England]|
[?:District=Belper][=:DistrictCounty:Belper RegDist, Derbyshire, England]|
[?:District=Bermondsey][=:DistrictCounty:Bermondsey RegDist, London, England]|
[?:District=Bedale][=:DistrictCounty:Bedale RegDist, Yorkshire North Riding, England]|
[?:District=Bedford][=:DistrictCounty:Bedford RegDist, Bedfordshire, England]|
[?:District=Bedfordshire][=:DistrictCounty:Bedfordshire RegDist, Bedfordshire, England]|
[?:District=Bedminster][=:DistrictCounty:Bedminster RegDist, Gloucestershire, England]|
[?:District=Belford][=:DistrictCounty:Belford RegDist, Northumberland, England]|
[?:District=Bellingham][=:DistrictCounty:Bellingham RegDist, Northumberland, England]|
[?:District=Bethnal Green][=:DistrictCounty:Bethnal Green RegDist, Middlesex, England]|
[?:District=Berkhampstead][=:DistrictCounty:Berkhampstead RegDist, Hertfordshire, England]|
[?:District=Berkhamsted][=:DistrictCounty:Berkhamsted RegDist, Hertfordshire, England]|
[?:District=Berwick][=:DistrictCounty:Berwick RegDist, Northumberland, England]|
[?:District=Bicester][=:DistrictCounty:Bicester RegDist, Oxfordshire, England]|
[?:District=Biggleswade][=:DistrictCounty:Biggleswade RegDist, Bedfordshire, England]|
[?:District=Billesdon][=:DistrictCounty:Billesdon RegDist, Leicestershire, England]|
[?:District=Bilston][=:DistrictCounty:Bilston RegDist, Staffordshire, England]|
[?:District=Bingham][=:DistrictCounty:Bingham RegDist, Nottinghamshire, England]|
[?:District=Beverley][=:DistrictCounty:Beverley RegDist, Yorkshire, England]|
[?:District=Bideford][=:DistrictCounty:Bideford RegDist, Devonshire, England]|
[?:District=Birkenhead][=:DistrictCounty:Birkenhead RegDist, Cheshire, England]|
[?:District=Birmingham][=:DistrictCounty:Birmingham RegDist, Warwickshire, England]|
[?:District=Birmingham North][=:DistrictCounty:Birmingham North RegDist, Warwickshire, England]|
[?:District=Birmingham South][=:DistrictCounty:Birmingham South RegDist, Warwickshire, England]|
[?:District=Bishopsgate][=:DistrictCounty:Bishopsgate RegDist, London, England]|
[?:District=Blaby][=:DistrictCounty:Blaby RegDist, Leicestershire, England]|
[?:District=Blackpool & Fylde][=:DistrictCounty:Blackpool & Fylde RegDist, Lancashire, England]|
[?:District=Blackburn][=:DistrictCounty:Blackburn RegDist, Lancashire, England]|
[?:District=Blackpool][=:DistrictCounty:Blackpool RegDist, Lancashire, England]|
[?:District=Blandford][=:DistrictCounty:Blandford RegDist, Dorset, England]|
[?:District=Blean][=:DistrictCounty:Blean RegDist, Kent, England]|
[?:District=Blofield][=:DistrictCounty:Blofield RegDist, Norfolk, England]|
[?:District=Bloomsbury][=:DistrictCounty:Bloomsbury RegDist, London, England]|
[?:District=Blyth][=:DistrictCounty:Blyth RegDist, Suffolk, England]|
[?:District=Blything][=:DistrictCounty:Blything RegDist, Suffolk, England]|
[?:District=Bodmin][=:DistrictCounty:Bodmin RegDist, Cornwall, England]|
[?:District=Bolton Union, County Of Lancaster][=:DistrictCounty:Bolton RegDist, Lancashire, England]|
[?:District=Bolton Union][=:DistrictCounty:Bolton Union RegDist, Lancashire, England]|
[?:District=Bolton][=:DistrictCounty:Bolton RegDist, Lancashire, England]|
[?:District=Bootle][=:DistrictCounty:Bootle RegDist, Merseyside/Lancashire, England]|
[?:District=Border][=:DistrictCounty:Border RegDist, Cumberland, England]|
[?:District=Bosmere][=:DistrictCounty:Bosmere RegDist, Suffolk, England]|
[?:District=Boston][=:DistrictCounty:Boston RegDist, Lincolnshire, England]|
[?:District=Bourne][=:DistrictCounty:Bourne RegDist, Lincolnshire, England]|
[?:District=Bourne & South Kesteven][=:DistrictCounty:Bourne & South Kesteven RegDist, Lincolnshire, England]|
[?:District=Bournemouth][=:DistrictCounty:Bournemouth RegDist, Dorset/Hampshire, England]|
[?:District=Bournemouth & Christchurch][=:DistrictCounty:Bournemouth & Christchurch RegDist, Hampshire, England]|
[?:District=Bow Common][=:DistrictCounty:Bow Common RegDist, Middlesex, England]|
[?:District=Brackley][=:DistrictCounty:Brackley RegDist, Northamptonshire, England]|
[?:District=Bracknell][=:DistrictCounty:Bracknell RegDist, Berkshire, England]|
[?:District=Bradfield][=:DistrictCounty:Bradfield RegDist, Berkshire, England]|
[?:District=Bradford][=:DistrictCounty:Bradford RegDist, Yorkshire West Riding/West Yorkshire, England]|
[?:District=Bradford on Avon][=:DistrictCounty:Bradford on Avon RegDist, Wiltshire, England]|
[?:District=Bradford Union West Riding Of Yorkshire][=:DistrictCounty:Bradford RegDist, West Riding Of Yorkshire, England]|
[?:District=Bradford Yorkshire][=:DistrictCounty:Bradford Yorkshire RegDist, Yorkshire, England]|
[?:District=Bradford And North Bierley Yorkshire][=:DistrictCounty:Bradford And North Bierley Yorkshire RegDist, Yorkshire, England]|
[?:District=Bramham][=:DistrictCounty:Bramham RegDist, Yorkshire West Riding, England]|
[?:District=Bramley & Holbeck][=:DistrictCounty:Bramley & Holbeck RegDist, Yorkshire West Riding, England]|
[?:District=Bramley Union][=:DistrictCounty:Bramley RegDist, West Riding of Yorkshire, England]|
[?:District=Bramley][=:DistrictCounty:Bramley RegDist, West Riding of Yorkshire, England]|
[?:District=Brampton][=:DistrictCounty:Brampton RegDist, Cumberland, England]|
[?:District=Brentford][=:DistrictCounty:Brentford RegDist, Middlesex, England]|
[?:District=Bridge][=:DistrictCounty:Bridge RegDist, Kent, England]|
[?:District=Bridgnorth][=:DistrictCounty:Bridgnorth RegDist, Shropshire, England]|
[?:District=Bridgwater][=:DistrictCounty:Bridgwater RegDist, Somerset, England]|
[?:District=Bridlington][=:DistrictCounty:Bridlington RegDist, East Riding of Yorkshire/Humberside, England]|
[?:District=Bridport][=:DistrictCounty:Bridport RegDist, Dorset, England]|
[?:District=Brighton][=:DistrictCounty:Brighton RegDist, East Sussex, England]|
[?:District=Brighthelmston][=:DistrictCounty:Brighthelmston RegDist, East Sussex, England]|
[?:District=Bristol][=:DistrictCounty:Bristol RegDist, Gloucestershire, England]|
[?:District=Brixworth][=:DistrictCounty:Brixworth RegDist, Northamptonshire, England]|
[?:District=Bromley][=:DistrictCounty:Bromley RegDist, Kent, England]|
[?:District=Burnley][=:DistrictCounty:Burnley RegDist, Lancashire and West Riding of Yorkshire, England]| 
[?:District=Bromsgrove][=:DistrictCounty:Bromsgrove RegDist, Worcestershire/Hereford & Worcester, England]|
[?:District=Bromyard][=:DistrictCounty:Bromyard RegDist, Herefordshire/Hereford & Worcester, England]|
[?:District=Buckingham][=:DistrictCounty:Buckingham RegDist, Buckinghamshire, England]|
[?:District=Bucklow][=:DistrictCounty:Bucklow RegDist, Cheshire, England]|
[?:District=Buckrose][=:DistrictCounty:Buckrose RegDist, Yorkshire East Riding, England]|
[?:District=Bullingdon][=:DistrictCounty:Bullingdon RegDist, Oxfordshire, England]|
[?:District=Bulmer][=:DistrictCounty:Bulmer RegDist, Yorkshire North Riding, England]|
[?:District=Burnley & Pendle][=:DistrictCounty:Burnley & Pendle RegDist, Lancashire, England]|
[?:District=Burton upon Trent][=:DistrictCounty:Burton upon Trent RegDist, Staffordshire, England]|
[?:District=Burton on Trent][=:DistrictCounty:Burton on Trent RegDist, Staffordshire, England]|
[?:District=Bury Lancashire][=:DistrictCounty:Bury RegDist, Lancashire, England]|
[?:District=Bury Lancaster][=:DistrictCounty:Bury RegDist, Lancashire, England]|
[?:District=Bury St. Edmunds][=:DistrictCounty:Bury St. Edmunds RegDist, Suffolk, England]|
[?:District=Bury Union Lancashire][=:DistrictCounty:Bury RegDist, Lancashire, England]|
[?:District=Bury Union][=:DistrictCounty:Bury RegDist, Lancashire, England]|
[?:District=Bury][=:DistrictCounty:Bury RegDist, Lancashire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#C
|
[?:District:substring:1:1=C]

<
[?:District=Caistor][=:DistrictCounty:Caistor RegDist, Lincolnshire, England]|
[?:District=Calder][=:DistrictCounty:Calder RegDist, Yorkshire West Riding, England]|
[?:District=Calne][=:DistrictCounty:Calne RegDist, Wiltshire, England]|
[?:District=Camberwell][=:DistrictCounty:Camberwell RegDist, Surrey/Greater London, England]|
[?:District=Camborne Redruth][=:DistrictCounty:Camborne Redruth RegDist, Cornwall, England]|
[?:District=Cambridge][=:DistrictCounty:Cambridge RegDist, Cambridgeshire, England]|
[?:District=Camelford][=:DistrictCounty:Camelford RegDist, Cornwall, England]|
[?:District=Cannock][=:DistrictCounty:Cannock RegDist, Staffordshire, England]|
[?:District=Cannock Chase][=:DistrictCounty:Cannock Chase RegDist, Staffordshire, England]|
[?:District=Canterbury][=:DistrictCounty:Canterbury RegDist, Kent, England]|
[?:District=Canterbury with Swale][=:DistrictCounty:Canterbury with Swale RegDist, Kent, England]|
[?:District=Cardiff][=:DistrictCounty:Cardiff RegDist, Glamorgan, Wales]|
[?:District=Carlisle][=:DistrictCounty:Carlisle RegDist, Cumberland/Cumbria, England]|
[?:District=Carnarvon Union][=:DistrictCounty:Carnarvon Union RegDist, Anglesey and Carnarvonshire, Wales]|
[?:District=Castle Ward][=:DistrictCounty:Castle Ward RegDist, Northumberland, England]|
[?:District=Castleford][=:DistrictCounty:Castleford RegDist, Yorkshire West Riding, England]|
[?:District=Catherington][=:DistrictCounty:Catherington RegDist, Hampshire, England]|
[?:District=Caxton][=:DistrictCounty:Caxton RegDist, Cambridgeshire, England]|
[?:District=Central Cleveland][=:DistrictCounty:Central Cleveland RegDist, Cleveland, England]|
[?:District=Central Durham][=:DistrictCounty:Central Durham RegDist, Co. Durham, England]|
[?:District=Cerne][=:DistrictCounty:Cerne RegDist, Dorset, England]|
[?:District=Chailey][=:DistrictCounty:Chailey RegDist, Sussex, England]|
[?:District=Chanctonbury][=:DistrictCounty:Chanctonbury RegDist, Sussex, England]|
[?:District=Chapel en le Frith][=:DistrictCounty:Chapel en le Frith RegDist, Derbyshire, England]|
[?:District=Chard][=:DistrictCounty:Chard RegDist, Somerset, England]|
[?:District=Chatham][=:DistrictCounty:Chatham RegDist, Kent, England]|
[?:District=Cheadle][=:DistrictCounty:Cheadle RegDist, Staffordshire, England]|
[?:District=Chelsea][=:DistrictCounty:Chelsea RegDist, Middlesex/Greater London, England]|
[?:District=Cheltenham][=:DistrictCounty:Cheltenham RegDist, Gloucestershire, England]|
[?:District=Chertsey][=:DistrictCounty:Chertsey RegDist, Surrey, England]|
[?:District=Cheshire][=:DistrictCounty:Cheshire RegDist, Cheshire, England]|
[?:District=Cheshire Central][=:DistrictCounty:Cheshire Central RegDist, Cheshire, England]|
[?:District=Cheshire East][=:DistrictCounty:Cheshire East RegDist, Cheshire, England]|
[?:District=Cheshire West][=:DistrictCounty:Cheshire West RegDist, Cheshire, England]|
[?:District=Chester][=:DistrictCounty:Chester RegDist, Cheshire, England]|
[?:District=Chester & Ellesmere Port][=:DistrictCounty:Chester & Ellesmere Port RegDist, Cheshire, England]|
[?:District=Chester East][=:DistrictCounty:Chester East RegDist, Cheshire, England]|
[?:District=Chester Le Street][=:DistrictCounty:Chester le Street RegDist, Co. Durham, England]|
[?:District=Chester le Street][=:DistrictCounty:Chester le Street RegDist, Co. Durham, England]|
[?:District=Chesterfield][=:DistrictCounty:Chesterfield RegDist, Derbyshire, England]|
[?:District=Chesterfield In The County Of Derby][=:DistrictCounty:Chesterfield RegDist, Derbyshire, England]|
[?:District=Chesterfield Union In The County Of Derby][=:DistrictCounty:Chesterfield RegDist, Derbyshire, England]|
[?:District=Chesterton][=:DistrictCounty:Chesterton RegDist, Cambridgeshire, England]|
[?:District=Chichester][=:DistrictCounty:Chichester RegDist, Sussex, England]|
[?:District=Chiltern & Beaconsfield][=:DistrictCounty:Chiltern & Beaconsfield RegDist, Buckinghamshire, England]|
[?:District=Chiltern & South Bucks][=:DistrictCounty:Chiltern & South Bucks RegDist, Buckinghamshire, England]|
[?:District=Chiltern Hills][=:DistrictCounty:Chiltern Hills RegDist, Buckinghamshire, England]|
[?:District=Chippenham][=:DistrictCounty:Chippenham RegDist, Wiltshire, England]|
[?:District=Chipping Norton][=:DistrictCounty:Chipping Norton RegDist, Oxfordshire, England]|
[?:District=Chipping Sodbury][=:DistrictCounty:Chipping Sodbury RegDist, Gloucestershire, England]|
[?:District=Chorley][=:DistrictCounty:Chorley RegDist, Lancashire, England]|
[?:District=Chorlton][=:DistrictCounty:Chorlton RegDist, Lancashire, England]|
[?:District=Christchurch][=:DistrictCounty:Christchurch RegDist, Hampshire, England]|
[?:District=Church Stretton][=:DistrictCounty:Church Stretton RegDist, Shropshire, England]|
[?:District=Cirencester][=:DistrictCounty:Cirencester RegDist, Gloucestershire, England]|
[?:District=City Of London][=:DistrictCounty:City of London RegDist, London, England]|
[?:District=Claro][=:DistrictCounty:Claro RegDist, North Yorkshire/Yorkshire West Riding, England]|
[?:District=Cleethorpes][=:DistrictCounty:Cleethorpes RegDist, Lincolnshire, England]|
[?:District=Cleobury Mortimer][=:DistrictCounty:Cleobury Mortimer RegDist, Shropshire, England]|
[?:District=Clerkenwell][=:DistrictCounty:Clerkenwell RegDist, London, England]|
[?:District=Cleveland][=:DistrictCounty:Cleveland RegDist, Yorkshire North Riding, England]|
[?:District=Clifton][=:DistrictCounty:Clifton RegDist, Gloucestershire, England]|
[?:District=Clitheroe][=:DistrictCounty:Clitheroe RegDist, West Riding of Yorkshire, England]|
[?:District=Clitheroe Union][=:DistrictCounty:Clitheroe RegDist, West Riding of Yorkshire, England]|
[?:District=Clun][=:DistrictCounty:Clun RegDist, Shropshire, England]|
[?:District=Clutton][=:DistrictCounty:Clutton RegDist, Somerset, England]|
[?:District=Coalville][=:DistrictCounty:Coalville RegDist, Leicestershire, England]|
[?:District=Cockermouth][=:DistrictCounty:Cockermouth RegDist, Cumbria/Cumberland, England]|
[?:District=Colchester][=:DistrictCounty:Colchester RegDist, Essex, England]|
[?:District=Congleton][=:DistrictCounty:Congleton RegDist, Cheshire, England]|
[?:District=Congleton & Crewe][=:DistrictCounty:Congleton & Crewe RegDist, Cheshire, England]|
[?:District=Cookham][=:DistrictCounty:Cookham RegDist, Berkshire, England]|
[?:District=Corby][=:DistrictCounty:Corby RegDist, Northamptonshire, England]|
[?:District=Cosford][=:DistrictCounty:Cosford RegDist, Suffolk, England]|
[?:District=Cranbrook][=:DistrictCounty:Cranbrook RegDist, Kent, England]|
[?:District=Crawley][=:DistrictCounty:Crawley RegDist, West Sussex, England]|
[?:District=Crediton][=:DistrictCounty:Crediton RegDist, Devonshire, England]|
[?:District=Crediton Union][=:DistrictCounty:Crediton RegDist, Devonshire, England]|
[?:District=Crewe][=:DistrictCounty:Crewe RegDist, Cheshire, England]|
[?:District=Cricklade][=:DistrictCounty:Cricklade RegDist, Wiltshire, England]|
[?:District=Crosby][=:DistrictCounty:Crosby RegDist, Merseyside/Lancashire, England]|
[?:District=Crowborough][=:DistrictCounty:Crowborough RegDist, East Sussex, England]|
[?:District=Croydon][=:DistrictCounty:Croydon RegDist, Surrey, England]|
[?:District=Cuckfield][=:DistrictCounty:Cuckfield RegDist, West Sussex/Sussex, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#D
|
[?:District:substring:1:1=D]

<
[?:District=Dartford][=:DistrictCounty:Dartford RegDist, Kent, England]|
[?:District=Darwen][=:DistrictCounty:Darwen RegDist, Lancashire, England]|
[?:District=Daventry][=:DistrictCounty:Daventry RegDist, Northamptonshire, England]|
[?:District=Deben][=:DistrictCounty:Deben RegDist, Suffolk, England]|
[?:District=Denbigh North][=:DistrictCounty:Denbigh North RegDist, Denbighshire, Wales]|
[?:District=Denbighshire North][=:DistrictCounty:Denbighshire North RegDist, Denbighshire, Wales]|
[?:District=Deptford][=:DistrictCounty:Deptford RegDist, Greater London, England]|
[?:District=Depwade][=:DistrictCounty:Depwade RegDist, Norfolk, England]|
[?:District=Derby][=:DistrictCounty:Derby RegDist, Derbyshire, England]|
[?:District=Devizes][=:DistrictCounty:Devizes RegDist, Wiltshire, England]|
[?:District=Devizes & Marlborough][=:DistrictCounty:Devizes & Marlborough RegDist, Wiltshire, England]|
[?:District=Devon Central][=:DistrictCounty:Devon Central RegDist, Devon, England]|
[?:District=Devonport][=:DistrictCounty:Devonport RegDist, Devon, England]|
[?:District=Dewsbury][=:DistrictCounty:Dewsbury RegDist, West Yorkshire, England]|
[?:District=Docking][=:DistrictCounty:Docking RegDist, Norfolk, England]|
[?:District=Don Valley][=:DistrictCounty:Don Valley RegDist, Yorkshire West Riding, England]|
[?:District=Doncaster][=:DistrictCounty:Doncaster RegDist, Yorkshire, England]|
[?:District=Dorchester][=:DistrictCounty:Dorchester RegDist, Dorset, England]|
[?:District=Dore][=:DistrictCounty:Dore RegDist, Herefordshire, England]|
[?:District=Dorking][=:DistrictCounty:Dorking RegDist, Surrey, England]|
[?:District=Dover][=:DistrictCounty:Dover RegDist, Kent, England]|
[?:District=Downham][=:DistrictCounty:Downham RegDist, Norfolk, England]|
[?:District=Driffield][=:DistrictCounty:Driffield RegDist, Yorkshire East Riding, England]|
[?:District=Droitwich][=:DistrictCounty:Droitwich RegDist, Worcestershire, England]|
[?:District=Droitwich Union][=:DistrictCounty:Droitwich RegDist, Worcestershire, England]|
[?:District=Droxford][=:DistrictCounty:Droxford RegDist, Hampshire, England]|
[?:District=Dudley Union][=:DistrictCounty:Dudley RegDist, Worcestershire and Staffordshire, England]|
[?:District=Dulverton][=:DistrictCounty:Dulverton RegDist, Somerset, England]|
[?:District=Dunstable][=:DistrictCounty:Dunstable RegDist, Bedfordshire, England]|
[?:District=Durham][=:DistrictCounty:Durham RegDist, Co. Durham, England]|
[?:District=Durham Central][=:DistrictCounty:Durham Central RegDist, Co. Durham, England]|
[?:District=Durham Central & South Eastern][=:DistrictCounty:Durham Central & South Eastern RegDist, Co. Durham, England]|
[?:District=Durham Eastern][=:DistrictCounty:Durham Eastern RegDist, Co. Durham, England]|
[?:District=Durham North Eastern][=:DistrictCounty:Durham North Eastern RegDist, Co. Durham, England]|
[?:District=Durham North Western][=:DistrictCounty:Durham North Western RegDist, Co. Durham, England]|
[?:District=Durham Northern][=:DistrictCounty:Durham Northern RegDist, Co. Durham, England]|
[?:District=Durham South Eastern][=:DistrictCounty:Durham South Eastern RegDist, Co. Durham, England]|
[?:District=Durham S W][=:DistrictCounty:Durham South Western RegDist, Co. Durham, England]|
[?:District=Durham South Western][=:DistrictCounty:Durham South Western RegDist, Co. Durham, England]|
[?:District=Durham Western][=:DistrictCounty:Durham Western RegDist, Co. Durham, England]|
[?:District=Dursley][=:DistrictCounty:Dursley RegDist, Gloucestershire, England]|
[?:District=Dury Lancashire][=:DistrictCounty:Dury RegDist, Lancashire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#E
|
[?:District:substring:1:1=E]

<
[?:District=Easington][=:DistrictCounty:Easington RegDist, Co. Durham, England]|
[?:District=Easingwold][=:DistrictCounty:Easingwold RegDist, Yorkshire North Riding, England]|
[?:District=East Ashford][=:DistrictCounty:East Ashford RegDist, Kent, England]|
[?:District=East Cleveland][=:DistrictCounty:East Cleveland RegDist, Cleveland, England]|
[?:District=East Dereham][=:DistrictCounty:East Dereham RegDist, Norfolk, England]|
[?:District=East Devon][=:DistrictCounty:East Devon RegDist, Devon, England]|
[?:District=East Dorset][=:DistrictCounty:East Dorset RegDist, Dorset, England]|
[?:District=East Elloe][=:DistrictCounty:East Elloe RegDist, Lincolnshire, England]|
[?:District=East Grinstead][=:DistrictCounty:East Grinstead RegDist, Sussex, England]|
[?:District=East Ham][=:DistrictCounty:East Ham RegDist, Greater London, England]|
[?:District=East London][=:DistrictCounty:East London RegDist, London, England]|
[?:District=East London Union][=:DistrictCounty:East London Union RegDist, Middlesex, England]|
[?:District=East Preston][=:DistrictCounty:East Preston RegDist, Sussex, England]|
[?:District=East Retford][=:DistrictCounty:East Retford RegDist, Nottinghamshire, England]|
[?:District=East Staffordshire][=:DistrictCounty:East Staffordshire RegDist, Staffordshire, England]|
[?:District=East Stonehouse][=:DistrictCounty:East Stonehouse RegDist, Devon, England]|
[?:District=East Surrey][=:DistrictCounty:East Surrey RegDist, Surrey, England]|
[?:District=East Ward][=:DistrictCounty:East Ward RegDist, Westmorland, England]|
[?:District=Eastbourne][=:DistrictCounty:Eastbourne RegDist, East Sussex/Sussex, England]|
[?:District=Easthampstead][=:DistrictCounty:Easthampstead RegDist, Berkshire, England]|
[?:District=Eastleigh][=:DistrictCounty:Eastleigh RegDist, Hampshire, England]|
[?:District=Eastry][=:DistrictCounty:Eastry RegDist, Kent, England]|
[?:District=Ecclesall Bierlow][=:DistrictCounty:Ecclesall Bierlow RegDist, Yorkshire West Riding, England]|
[?:District=Ecclesfield][=:DistrictCounty:Ecclesfield RegDist, Yorkshire West Riding, England]|
[?:District=Edmonton][=:DistrictCounty:Edmonton RegDist, Middlesex, England]|
[?:District=Elham][=:DistrictCounty:Elham RegDist, Kent, England]|
[?:District=Ellesmere][=:DistrictCounty:Ellesmere RegDist, Shropshire, England]|
[?:District=Ely][=:DistrictCounty:Ely RegDist, Cambridgeshire, England]|
[?:District=Enfield][=:DistrictCounty:Enfield RegDist, Middlesex, England]|
[?:District=Epping][=:DistrictCounty:Epping RegDist, Essex, England]|
[?:District=Epping Forest][=:DistrictCounty:Epping Forest RegDist, Essex, England]|
[?:District=Epsom][=:DistrictCounty:Epsom RegDist, Surrey, England]|
[?:District=Erewash][=:DistrictCounty:Erewash RegDist, Derbyshire, England]|
[?:District=Erpingham][=:DistrictCounty:Erpingham RegDist, Norfolk, England]|
[?:District=Eton][=:DistrictCounty:Eton RegDist, Buckinghamshire, England]|
[?:District=Evesham][=:DistrictCounty:Evesham RegDist, Worcestershire/Hereford & Worcester, England]|
[?:District=Ewecross][=:DistrictCounty:Ewecross RegDist, North Yorkshire/Yorkshire West Riding, England]|
[?:District=Exeter][=:DistrictCounty:Exeter RegDist, Devon, England]|
[?:District=Exmoor][=:DistrictCounty:Exmoor RegDist, Somerset, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#F
|
[?:District:substring:1:1=F]

<
[?:District=Fakenham][=:DistrictCounty:Fakenham RegDist, Norfolk, England]|
[?:District=Falmouth][=:DistrictCounty:Falmouth RegDist, Cornwall, England]|
[?:District=Fareham][=:DistrictCounty:Fareham RegDist, Hampshire, England]|
[?:District=Faringdon][=:DistrictCounty:Faringdon RegDist, Berkshire, England]|
[?:District=Faringdon (Berkshire)][=:DistrictCounty:Faringdon RegDist, Berkshire, England]|
[?:District=Farnborough][=:DistrictCounty:Farnborough RegDist, Hampshire, England]|
[?:District=Farnham][=:DistrictCounty:Farnham RegDist, Surrey, England]|
[?:District=Farnworth][=:DistrictCounty:Farnworth RegDist, Lancashire, England]|
[?:District=Farringdon][=:DistrictCounty:Farringdon RegDist, London, England]|
[?:District=Faversham][=:DistrictCounty:Faversham RegDist, Kent, England]|
[?:District=Fenland][=:DistrictCounty:Fenland RegDist, Cambridgeshire, England]|
[?:District=Finsbury][=:DistrictCounty:Finsbury RegDist, London, England]|
[?:District=Fleetwood][=:DistrictCounty:Fleetwood RegDist, Lancashire, England]|
[?:District=Fleetwood & Fylde][=:DistrictCounty:Fleetwood & Fylde RegDist, Lancashire, England]|
[?:District=Flegg][=:DistrictCounty:Flegg RegDist, Norfolk, England]|
[?:District=Foleshill][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]|
[?:District=Foleshill & Sowe][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]|
[?:District=Foleshill-Sowe][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]|
[?:District=Folkestone][=:DistrictCounty:Folkestone RegDist, Kent, England]|
[?:District=Fordingbridge][=:DistrictCounty:Fordingbridge RegDist, Hampshire, England]|
[?:District=Forehoe][=:DistrictCounty:Forehoe RegDist, Norfolk, England]|
[?:District=Forest of Dean][=:DistrictCounty:Forest of Dean RegDist, Gloucestershire, England]|
[?:District=Freebridge Lynn][=:DistrictCounty:Freebridge Lynn RegDist, Norfolk, England]|
[?:District=Frome][=:DistrictCounty:Frome RegDist, Somerset, England]|
[?:District=Fulham][=:DistrictCounty:Fulham RegDist, Middlesex, England]|
[?:District=Fylde][=:DistrictCounty:Fylde RegDist, Lancashire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#G
|
[?:District:substring:1:1=G]

<
[?:District=Gainsborough][=:DistrictCounty:Gainsborough RegDist, Lincolnshire, England]|
[?:District=Garstang][=:DistrictCounty:Garstang RegDist, Lancashire, England]|
[?:District=Gateshead][=:DistrictCounty:Gateshead RegDist, Co Durham, England]|
[?:District=Gipping][=:DistrictCounty:Gipping RegDist, Suffolk, England]|
[?:District=Gipping & Hartismere][=:DistrictCounty:Gipping & Hartismere RegDist, Suffolk, England]|
[?:District=Glanford Brigg][=:DistrictCounty:Glanford Brigg RegDist, Lincolnshire, England]|
[?:District=Glendale][=:DistrictCounty:Glendale RegDist, Northumberland, England]|
[?:District=Glossop][=:DistrictCounty:Glossop RegDist, Derbyshire, England]|
[?:District=Gloucester][=:DistrictCounty:Gloucester RegDist, Gloucestershire, England]|
[?:District=Gloucester City][=:DistrictCounty:Gloucester City RegDist, Gloucestershire, England]|
[?:District=Gloucester Rural][=:DistrictCounty:Gloucester Rural RegDist, Gloucestershire, England]|
[?:District=Godstone][=:DistrictCounty:Godstone RegDist, Surrey, England]|
[?:District=Goole][=:DistrictCounty:Goole RegDist, Yorkshire, England]|
[?:District=Goole Union][=:DistrictCounty:Goole Union RegDist, Lincolnshire and West Riding of Yorkshire, England]|
[?:District=Gosport][=:DistrictCounty:Gosport RegDist, Hampshire, England]|
[?:District=Grantham][=:DistrictCounty:Grantham RegDist, Lincolnshire, England]|
[?:District=Gravesend][=:DistrictCounty:Gravesend RegDist, Kent, England]|
[?:District=Great Boughton][=:DistrictCounty:Great Boughton RegDist, Cheshire, England]|
[?:District=Great Ouseburn][=:DistrictCounty:Great Ouseburn RegDist, Yorkshire West Riding, England]|
[?:District=Great Yarmouth][=:DistrictCounty:Great Yarmouth RegDist, Norfolk, England]|
[?:District=Greenwich][=:DistrictCounty:Greenwich RegDist, Kent, England]|
[?:District=Grimsby][=:DistrictCounty:Grimsby Regdist, Lincolnshire, England]|
[?:District=Guildford][=:DistrictCounty:Guildford RegDist, Surrey, England]|
[?:District=Guiltcross][=:DistrictCounty:Guiltcross RegDist, Norfolk, England]|
[?:District=Guisborough][=:DistrictCounty:Guisborough RegDist, Yorkshire North Riding, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#H
|
[?:District:substring:1:1=H]

<
[?:District=Hackney][=:DistrictCounty:Hackney RegDist, London, England]|
[?:District=Hailsham][=:DistrictCounty:Hailsham RegDist, East Sussex/Sussex, England]|
[?:District=Halifax][=:DistrictCounty:Halifax RegDist, West Yorkshire, England]|
[?:District=Halton][=:DistrictCounty:Halton RegDist, Cheshire, England]|
[?:District=Haltwhistle][=:DistrictCounty:Haltwhistle RegDist, Northumberland, England]|
[?:District=Hambledon][=:DistrictCounty:Hambledon RegDist, Sussex and Surrey, England]|
[?:District=Hambledon Union][=:DistrictCounty:Hambledon RegDist, Sussex and Surrey, England]|
[?:District=Hammersmith][=:DistrictCounty:Hammersmith RegDist, Greater London, England]|
[?:District=Hampshire North][=:DistrictCounty:Hampshire North RegDist, Hampshire, England]|
[?:District=Hampstead][=:DistrictCounty:Hampstead RegDist, Middlesex, England]|
[?:District=Hardingstone][=:DistrictCounty:Hardingstone RegDist, Northamptonshire, England]|
[?:District=Harrow][=:DistrictCounty:Harrow RegDist, Middlesex, England]|
[?:District=Hartismere][=:DistrictCounty:Hartismere RegDist, Suffolk, England]|
[?:District=Hartley Wintney][=:DistrictCounty:Hartley Wintney RegDist, Hampshire, England]|
[?:District=Haslingden][=:DistrictCounty:Haslingden RegDist, Lancashire, England]|
[?:District=Haslingden Union][=:DistrictCounty:Haslingden RegDist, Lancashire, England]|
[?:District=Hastings][=:DistrictCounty:Hastings RegDist, East Sussex/Sussex, England]|
[?:District=Hastings & Rother][=:DistrictCounty:Hastings & Rother RegDist, East Sussex, England]|
[?:District=Hastings and Rother][=:DistrictCounty:Hastings and Rother RegDist, Sussex, England]|
[?:District=Hatfield][=:DistrictCounty:Hatfield RegDist, Hertfordshire, England]|
[?:District=Havant][=:DistrictCounty:Havant RegDist, Hampshire, England]|
[?:District=Havering][=:DistrictCounty:Havering RegDist, Essex, England]|
[?:District=Hayfield][=:DistrictCounty:Hayfield RegDist, Derbyshire, England]|
[?:District=Hayfield & Glossop][=:DistrictCounty:Hayfield and Glossop RegDist, Cheshire and Derbyshire, England]|
[?:District=Hayfield and Glossop][=:DistrictCounty:Hayfield and Glossop RegDist, Cheshire and Derbyshire, England]|
[?:District=Haywards Heath][=:DistrictCounty:Haywards Heath RegDist, West Sussex, England]|
[?:District=Headington][=:DistrictCounty:Headington RegDist, Oxfordshire, England]|
[?:District=Helmsley][=:DistrictCounty:Helmsley RegDist, Yorkshire North Riding, England]|
[?:District=Helston][=:DistrictCounty:Helston RegDist, Cornwall, England]|
[?:District=Hemsworth][=:DistrictCounty:Hemsworth RegDist, Yorkshire West Riding, England]|
[?:District=Hendon][=:DistrictCounty:Hendon RegDist, Middlesex, England]|
[?:District=Henley][=:DistrictCounty:Henley RegDist, Oxfordshire, England]|
[?:District=Henstead][=:DistrictCounty:Henstead RegDist, Norfolk, England]|
[?:District=Hereford][=:DistrictCounty:Hereford RegDist, Herefordshire/Hereford & Worcester, England]|
[?:District=Hexham][=:DistrictCounty:Hexham RegDist, Northumberland, England]|
[?:District=Heywood][=:DistrictCounty:Heywood RegDist, Lancashire, England]|
[?:District=High Peak][=:DistrictCounty:High Peak RegDist, Derbyshire, England]|
[?:District=Highworth][=:DistrictCounty:Highworth RegDist, Wiltshire, England]|
[?:District=Hinckley][=:DistrictCounty:Hinckley RegDist, Leicestershire, England]|
[?:District=Hitchin][=:DistrictCounty:Hitchin RegDist, Hertfordshire, England]|
[?:District=Hitchin & Stevenage][=:DistrictCounty:Hitchin & Stevenage RegDist, Hertfordshire, England]|
[?:District=Hitchin And Stevenage][=:DistrictCounty:Hitchin & Stevenage RegDist, Hertfordshire, England]|
[?:District=Holbeach][=:DistrictCounty:Holbeach RegDist, Lincolnshire, England]|
[?:District=Holbeck][=:DistrictCounty:Holbeck RegDist, Yorkshire West Riding, England]|
[?:District=Holborn][=:DistrictCounty:Holborn RegDist, London/Middlesex, England]|
[?:District=Holderness][=:DistrictCounty:Holderness RegDist, Yorkshire East Riding, England]|
[?:District=Hollingbourne][=:DistrictCounty:Hollingbourne RegDist, Kent, England]|
[?:District=Holsworthy][=:DistrictCounty:Holsworthy RegDist, Devon, England]|
[?:District=Honiton][=:DistrictCounty:Honiton RegDist, Devon, England]|
[?:District=Hoo][=:DistrictCounty:Hoo RegDist, Kent, England]|
[?:District=Horncastle][=:DistrictCounty:Horncastle RegDist, Lincolnshire, England]|
[?:District=Horsham][=:DistrictCounty:Horsham RegDist, West Sussex/Sussex, England]|
[?:District=Horwich][=:DistrictCounty:Horwich RegDist, Lancashire, England]|
[?:District=Houghton le Spring][=:DistrictCounty:Houghton le Spring RegDist, Co. Durham, England]|
[?:District=Hounslow][=:DistrictCounty:Hounslow RegDist, Middlesex, England]|
[?:District=Hove][=:DistrictCounty:Hove RegDist, East Sussex/Sussex, England]|
[?:District=Howden][=:DistrictCounty:Howden RegDist, Yorkshire East Riding, England]|
[?:District=Howdenshire][=:DistrictCounty:Howdenshire RegDist, Yorkshire East Riding, England]|
[?:District=Hoxne][=:DistrictCounty:Hoxne RegDist, Suffolk, England]|
[?:District=Huddersfield][=:DistrictCounty:Huddersfield RegDist, West Yorkshire/Yorkshire West Riding, England]|
[?:District=Hull][=:DistrictCounty:Hull RegDist, Yorkshire, England]|
[?:District=Hungerford][=:DistrictCounty:Hungerford RegDist, Berkshire, England]|
[?:District=Hunslet][=:DistrictCounty:Hunslet RegDist, Yorkshire, England]|
[?:District=Huntingdon][=:DistrictCounty:Huntingdon RegDist, Cambridgeshire/Huntingdonshire, England]|
[?:District=Huntingdonshire North][=:DistrictCounty:Huntingdonshire North RegDist, Huntingdonshire, England]|
[?:District=Hursley][=:DistrictCounty:Hursley RegDist, Hampshire, England]|
[?:District=Hyde][=:DistrictCounty:Hyde RegDist, Cheshire, England]|
[?:District=Hyndburn & Rossendale][=:DistrictCounty:Hyndburn & Rossendale RegDist, Lancashire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#I
|
[?:District:substring:1:1=I]

<
[?:District=Ilkeston][=:DistrictCounty:Ilkeston RegDist, Derbyshire, England]|
[?:District=Ince][=:DistrictCounty:Ince RegDist, Lancashire, England]|
[?:District=Ipswich][=:DistrictCounty:Ipswich RegDist, Suffolk, England]|
[?:District=Isle of Wight][=:DistrictCounty:Isle of Wight RegDist, Hampshire, England]|
[?:District=Islington][=:DistrictCounty:Islington RegDist, Middlesex, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#J
|
[?:District:substring:1:1=J]

<
[?:District=Jarrow][=:DistrictCounty:Jarrow RegDist, Tyne & Wear, England]|
[lib.Get_GRO_DistrictCounty_Error]
>


#K
|
[?:District:substring:1:1=K]

<
[?:District=Keighley][=:DistrictCounty:Keighley RegDist, West Yorkshire, England]|
[?:District=Kendal][=:DistrictCounty:Kendal RegDist, Lancashire and Westmorland, England]|
[?:District=Kendal Union][=:DistrictCounty:Kendal RegDist, Lancashire and Westmorland, England]|
[?:District=Kensington][=:DistrictCounty:Kensington RegDist, Middlesex, England]|
[?:District=Kent][=:DistrictCounty:Kent RegDist, Kent, England]|
[?:District=Kerrier][=:DistrictCounty:Kerrier RegDist, Cornwall, England]|
[?:District=Kettering][=:DistrictCounty:Kettering RegDist, Northamptonshire, England]|
[?:District=Ketton][=:DistrictCounty:Ketton RegDist, Rutland, England]|
[?:District=Keynsham][=:DistrictCounty:Keynsham RegDist, Gloucestershire, England]|
[?:District=Kidderminster][=:DistrictCounty:Kidderminster RegDist, Worcestershire/Hereford & Worcester, England]|
[?:District=Kings Lynn][=:DistrictCounty:Kings Lynn RegDist, Norfolk, England]|
[?:District=Kings Norton][=:DistrictCounty:Kings Norton RegDist, Worcestershire, England]|
[?:District=Kings Norton Union][=:DistrictCounty:Kings Norton RegDist, Warwickshire, England]|
[?:District=Kingsbridge][=:DistrictCounty:Kingsbridge RegDist, Devon, England]|
[?:District=Kingsclere][=:DistrictCounty:Kingsclere RegDist, Hampshire, England]|
[?:District=Kingsclere & Whitchurch][=:DistrictCounty:Kingsclere & Whitchurch RegDist, Hampshire, England]|
[?:District=Kingston][=:DistrictCounty:Kingston RegDist, Surrey, England]|
[?:District=Kingston upon Thames][=:DistrictCounty:Kingston upon Thames RegDist, Surrey, England]|
[?:District=Kingswinford][=:DistrictCounty:Kingswinford RegDist, Staffordshire, England]|
[?:District=Kingswood][=:DistrictCounty:Kingswood RegDist, Gloucestershire, England]|
[?:District=Kington][=:DistrictCounty:Kington RegDist, Herefordshire, England]|
[?:District=Kirkdeighton][=:DistrictCounty:Kirkdeighton RegDist, Yorkshire West Riding, England]|
[?:District=Kirkstall][=:DistrictCounty:Kirkstall RegDist, Yorkshire West Riding, England]|
[?:District=Knaresborough][=:DistrictCounty:Knaresborough RegDist, Yorkshire West Riding, England]|
[?:District=Knighton][=:DistrictCounty:Knighton RegDist, Shropshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#L
|
[?:District:substring:1:1=L]

<
[?:District=Lambeth][=:DistrictCounty:Lambeth RegDist, Surrey, England]|
[?:District=Lancaster][=:DistrictCounty:Lancaster RegDist, Lancashire, England]|
[?:District=Lanchester][=:DistrictCounty:Lanchester RegDist, Co. Durham, England]|
[?:District=Langport][=:DistrictCounty:Langport RegDist, Somersetshire, England]|
[?:District=Langport district][=:DistrictCounty:Langport RegDist, Somersetshire, England]|
[?:District=Launceston][=:DistrictCounty:Launceston RegDist, Cornwall, England]|
[?:District=Ledbury][=:DistrictCounty:Ledbury RegDist, Herefordshire/Hereford & Worcester, England]|
[?:District=Leeds][=:DistrictCounty:Leeds RegDist, West Riding of Yorkshire, England]|
[?:District=Leeds North][=:DistrictCounty:Leeds North RegDist, Yorkshire West Riding, England]|
[?:District=Leeds South][=:DistrictCounty:Leeds South RegDist, Yorkshire West Riding, England]|
[?:District=Leek][=:DistrictCounty:Leek RegDist, Staffordshire, England]|
[?:District=Leek Union][=:DistrictCounty:Leek Union RegDist, Staffordshire, England]|
[?:District=Leicestershire Central][=:DistrictCounty:Leicestershire Central RegDist, Leicestershire, England]|
[?:District=Leigh][=:DistrictCounty:Leigh RegDist, Lancashire, England]|
[?:District=Leigh Union][=:DistrictCounty:Leigh RegDist, Lancashire, England]|
[?:District=Leighton Buzzard][=:DistrictCounty:Leighton Buzzard RegDist, Bedfordshire, England]|
[?:District=Leominster][=:DistrictCounty:Leominster RegDist, Herefordshire/Hereford & Worcester, England]|
[?:District=Lewes][=:DistrictCounty:Lewes RegDist, East Sussex/Sussex, England]|
[?:District=Lewisham][=:DistrictCounty:Lewisham RegDist, London, England]|
[?:District=Leyburn][=:DistrictCounty:Leyburn RegDist, Yorkshire North Riding, England]|
[?:District=Lichfield][=:DistrictCounty:Lichfield RegDist, Staffordshire, England]|
[?:District=Limehouse][=:DistrictCounty:Limehouse RegDist, London, England]|
[?:District=Lincoln][=:DistrictCounty:Lincoln RegDist, Lincolnshire, England]|
[?:District=Linton][=:DistrictCounty:Linton RegDist, Cambridgeshire, England]|
[?:District=Liskeard][=:DistrictCounty:Liskeard RegDist, Cornwall, England]|
[?:District=Littleborough][=:DistrictCounty:Littleborough RegDist, Lancashire, England]|
[?:District=Liverpool][=:DistrictCounty:Liverpool RegDist, Lancashire, England]|
[?:District=Liverpool North][=:DistrictCounty:Liverpool North RegDist, Lancashire, England]|
[?:District=Liverpool South][=:DistrictCounty:Liverpool South RegDist, Lancashire, England]|
[?:District=Loddon][=:DistrictCounty:Loddon RegDist, Norfolk, England]|
[?:District=London City][=:DistrictCounty:London City RegDist, London, England]|
[?:District=Long Ashton][=:DistrictCounty:Long Ashton RegDist, Somerset, England]|
[?:District=Longtown][=:DistrictCounty:Longtown RegDist, Cumberland, England]|
[?:District=Lothingland][=:DistrictCounty:Lothingland RegDist, Suffolk, England]|
[?:District=Loughborough][=:DistrictCounty:Loughborough RegDist, Leicestershire, England]|
[?:District=Louth][=:DistrictCounty:Louth RegDist, Lincolnshire, England]|
[?:District=Lower Agbrigg][=:DistrictCounty:Lower Agbrigg RegDist, Yorkshire West Riding, England]|
[?:District=Ludlow][=:DistrictCounty:Ludlow RegDist, Shropshire, England]|
[?:District=Lunesdale][=:DistrictCounty:Lunesdale RegDist, Lancashire, England]|
[?:District=Luton][=:DistrictCounty:Luton RegDist, Bedfordshire, England]|
[?:District=Lutterworth][=:DistrictCounty:Lutterworth RegDist, Leicestershire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#M
|
[?:District:substring:1:1=M]

<
[?:District=Macclesfield][=:DistrictCounty:Macclesfield RegDist, Cheshire, England]|
[?:District=Macclesfield Union][=:DistrictCounty:Macclesfield RegDist, Cheshire, England]|
[?:District=Maidenhead][=:DistrictCounty:Maidenhead RegDist, Berkshire, England]|
[?:District=Maidstone][=:DistrictCounty: Maidstone RegDist, Kent, England]|
[?:District=Manchester][=:DistrictCounty:Manchester RegDist, Lancashire, England]|
[?:District=Manchester North][=:DistrictCounty:Manchester North RegDist, Lancashire, England]|
[?:District=Manchester S.][=:DistrictCounty:Manchester South RegDist, Lancashire, England]|
[?:District=Manchester South][=:DistrictCounty:Manchester South RegDist, Lancashire, England]|
[?:District=Mansfield][=:DistrictCounty:Mansfield RegDist, Derbyshire and Nottinghamshire, England]|
[?:District=Martley][=:DistrictCounty:Martley RegDist, Worcestershire, England]|
[?:District=Marylebone][=:DistrictCounty:Marylebone RegDist, Middlesex, England]|
[?:District=Matlock Bakewell And Tideswell][=:DistrictCounty:Matlock Bakewell And Tideswell RegDist, Derbyshire, England]|
[?:District=Mid Warwickshire][=:DistrictCounty:Mid Warwickshire RegDist, Warwickshire, England]|
[?:District=Middlesex South][=:DistrictCounty:Middlesex South RegDist, Middlesex, England]|
[?:District=Midhurst][=:DistrictCounty:Midhurst RegDist, Sussex, England]|
[?:District=Midhurst And Petworth][=:DistrictCounty:Midhurst RegDist, Sussex, England]|
[?:District=Mile End Old Town][=:DistrictCounty:Mile End Old Town RegDist, London and Middlesex, England]|
[?:District=Milton Keynes][=:DistrictCounty:Milton Keynes RegDist, Buckinghamshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#N
|
[?:District:substring:1:1=N]

<
[?:District=Nantwich][=:DistrictCounty:Nantwich RegDist, Cheshire, England]|
[?:District=Newcastle Upon Tyne][=:DistrictCounty:Newcastle Upon Tyne RegDist, Tyne and Wear, England]|
[?:District=Newcastle-Upon-Tyne][=:DistrictCounty:Newcastle upon Tyne, Northumberland, England]|
[?:District=Newington][=:DistrictCounty:Newington RegDist, London, England]|
[?:District=Newport Salop Staffordshire][=:DistrictCounty:Newport RegDist, Shropshire and Staffordshire, England]|
[?:District=Newton Abbot][=:DistrictCounty:Newton Abbot RegDist, Devonshire, England]|
[?:District=North Walsham][=:DistrictCounty:North Walsham RegDist, Norfolk, England]|
[?:District=North Witchford][=:DistrictCounty:North Witchford RegDist, Cambridgeshire, England]|
[?:District=Northumberland Central][=:DistrictCounty:Northumberland Central RegDist, Northumberland, England]|
[?:District=Northumberland South][=:DistrictCounty:Northumberland South RegDist, Northumberland, England]|
[?:District=Northwich][=:DistrictCounty:Northwich RegDist, Cheshire, England]|
[?:District=Nottingham][=:DistrictCounty:Nottingham RegDist, Nottinghamshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#O
|
[?:District:substring:1:1=O]

<
[?:District=Of Blackburn in the county of Lancaster][=:DistrictCounty:Blackburn RegDist, Lancashire, England]|
[?:District=Of Crediton Union][=:DistrictCounty:Crediton RegDist, Devonshire, England]|
[?:District=Of Exeter][=:DistrictCounty:Exeter RegDist, Devon, England]|
[?:District=Of Heywood in the County of Lancaster][=:DistrictCounty:Heywood RegDist, Lancashire, England]|
[?:District=Of Mansfield Union][=:DistrictCounty:Mansfield RegDist, Derbyshire and Nottinghamshire, England]|
[?:District=Of The Holborn Union Middlesex][=:DistrictCounty:Holborn RegDist, Middlesex, England]|
[?:District=Of The Holborn Union][=:DistrictCounty:Holborn RegDist, Middlesex, England]|
[?:District=Okehampton][=:DistrictCounty:Okehampton RegDist, Devonshire, England]|
[?:District=Oldham][=:DistrictCounty:Oldham RegDist, Lancashire, England]|
[?:District=Ormskirk][=:DistrictCounty:Ormskirk RegDist, Lancashire, England]|
[?:District=Oxford][=:DistrictCounty:Oxford RegDist, Oxfordshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#P
|
[?:District:substring:1:1=P]

<
[?:District=Paddington][=:DistrictCounty:Paddington RegDist, London, England]|
[?:District=Pancras][=:DistrictCounty:Pancras RegDist, Middlesex, England]|
[?:District=Penrith][=:DistrictCounty:Penrith RegDist, Cumberland, England]|
[?:District=Petersfield][=:DistrictCounty:Petersfield RegDist, Hampshire, England]|
[?:District=Plymouth][=:DistrictCounty:Plymouth RegDist, Devonshire, England]|
[?:District=Ploughley][=:DistrictCounty:Ploughley RegDist, Oxfordshire, England]|
[?:District=Pontefract][=:DistrictCounty:Pontefract RegDist, Yorkshire, England]|
[?:District=Poole][=:DistrictCounty:Poole RegDist, Dorset, England]|
[?:District=Poplar][=:DistrictCounty:Poplar RegDist, London, England]|
[?:District=Portsea][=:DistrictCounty:Portsea RegDist, Hampshire, England]|
[?:District=Portsea Island][=:DistrictCounty:Portsea Island RegDist, Hampshire, England]|
[?:District=Portsmouth][=:DistrictCounty:Portsmouth RegDist, Hampshire, England]|
[?:District=Prescot][=:DistrictCounty:Prescot RegDist, Lancashire, England]|
[?:District=Preston][=:DistrictCounty:Preston RegDist, Lancashire, England]|
[?:District=Prestwich][=:DistrictCounty:Prestwich RegDist, Lancashire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#Q

#R
|
[?:District:substring:1:1=R]

<
[?:District=Radford Union][=:DistrictCounty:Radford RegDist, Nottinghamshire, England]|
[?:District=Radford][=:DistrictCounty:Radford RegDist, Nottinghamshire, England]|
[?:District=Reading][=:DistrictCounty:Reading RegDist, Berkshire, England]|
[?:District=Redruth][=:DistrictCounty:Redruth RegDist, Cornwall, England]|
[?:District=Reigate][=:DistrictCounty:Reigate RegDist, Surrey, England]|
[?:District=Richmond][=:DistrictCounty:Richmond RegDist, Surrey, England]|
[?:District=Richmond (Surrey)][=:DistrictCounty:Richmond RegDist, Surrey, England]|
[?:District=Richmond Surrey][=:DistrictCounty:Richmond RegDist, Surrey, England]|
[?:District=Richmond upon Thames][=:DistrictCounty:Richmond upon Thames RegDist, Surrey, England]|
[?:District=Rochdale Union][=:DistrictCounty:Rochdale RegDist, Lancashire, England]|
[?:District=Rochdale][=:DistrictCounty:Rochdale RegDist, Lancashire, England]|
[?:District=Rochford][=:DistrictCounty:Rochford RegDist, Essex, England]|
[?:District=Romford][=:DistrictCounty:Romford RegDist, Essex, England]|
[?:District=Rotherhithe][=:DistrictCounty:Rotherhithe RegDist, Surrey, England]|
[?:District=Runcorn][=:DistrictCounty:Runcorn RegDist, Cheshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#S
|
[?:District:substring:1:1=S]

<
[?:District=Saddleworth][=:DistrictCounty:Saddleworth RegDist, Lancashire and West Riding of Yorkshire, England]|
[?:District=Saint George In The East][=:DistrictCounty:Saint George In The East RegDist, Middlesex, England]|
[?:District=Saint James Westminster][=:DistrictCounty:Saint James Westminster RegDist, Middlesex, England]|
[?:District=Saint Luke Middlesex][=:DistrictCounty:St Lukes RegDist, Middlesex, England]|
[?:District=Saint Mary Magdalen Bermondsey Surrey][=:DistrictCounty:Saint Mary Magdalen RegDist, Bermondsey, Surrey, England]|
[?:District=Saint Martin in the Fields][=:DistrictCounty:Saint Martin In The Fields RegDist, Middlesex, England]|
[?:District=Saint Olave Southwark][=:DistrictCounty:Saint Olave RegDist, Southwark, Surrey, England]|
[?:District=Saint Pancras][=:DistrictCounty:Saint Pancras RegDist, Middlesex, England]|
[?:District=Saint Saviour][=:DistrictCounty:Saint Saviour RegDist, Surrey, England]|
[?:District=Salford][=:DistrictCounty:Salford RegDist, Lancashire, England]|
[?:District=Scarborough][=:DistrictCounty:Scarborough RegDist, Yorkshire, England]|
[?:District=Scunthorpe][=:DistrictCounty:Scunthorpe RegDist, Lincolnshire, England]|
[?:District=Selby][=:DistrictCounty:Selby RegDist, West Riding of Yorkshire, England]|
[?:District=Shardlow][=:DistrictCounty:Shardlow RegDist, Derbyshire, England]|
[?:District=Sheffield][=:DistrictCounty:Sheffield RegDist, West Riding of Yorkshire, England]|
[?:District=Shoreditch][=:DistrictCounty:Shoreditch RegDist, London, England]|
[?:District=Shiffnal Union][=:DistrictCounty:Shiffnal RegDist, Staffordshire and Shropshire, England]|
[?:District=Shiffnal][=:DistrictCounty:Shiffnal RegDist, Staffordshire and Shropshire, England]|
[?:District=Somerset][=:DistrictCounty:Somerset RegDist, Somerset, England]|
[?:District=South Glamorgan][=:DistrictCounty:South Glamorgan RegDist, Glamorganshire, Wales]|
[?:District=South Molton][=:DistrictCounty:South Molton RegDist, Devonshire, England]|
[?:District=South Shield][=:DistrictCounty:South Shields RegDist, Co. Durham, England]|
[?:District=South Shields Union][=:DistrictCounty:South Shields RegDist, Co. Durham, England]|
[?:District=South Shields][=:DistrictCounty:South Shields RegDist, Co. Durham, England]|
[?:District=South Warwickshire][=:DistrictCounty:South Warwickshire RegDist, Warwickshire, England]|
[?:District=Southmolton][=:DistrictCounty:South Molton RegDist, Devonshire, England]|
[?:District=Southwark][=:DistrictCounty:Southwark RegDist, Surrey, England]|
[?:District=St Albans][=:DistrictCounty:St Albans RegDist, Hertfordshire, England]|
[?:District=St. Asaph][=:DistrictCounty:St. Asaph RegDist, Flintshire and Denbighshire, Wales]|
[?:District=St Austell][=:DistrictCounty:St Austell RegDist, Cornwall, England]|
[?:District=St. Austell][=:DistrictCounty:St Austell RegDist, Cornwall, England]|
[?:District=St George Hanover Square][=:DistrictCounty:St George Hanover Square RegDist, London, England]|
[?:District=St. George Hanover Square][=:DistrictCounty:St George Hanover Square RegDist, London, England]|
[?:District=St Marylebone][=:DistrictCounty:St Marylebone RegDist, Middlesex, England]|
[?:District=St Martin][=:DistrictCounty:St Martin in the Fields RegDist, Middlesex, England]|
[?:District=St. Martin][=:DistrictCounty:St Martin in the Fields RegDist, Middlesex, England]|
[?:District=St Martin in the Fields][=:DistrictCounty:St Martin in the Fields RegDist, Middlesex, England]|
[?:District=St. Martin in the Fields][=:DistrictCounty:St Martin in the Fields RegDist, Middlesex, England]|
[?:District=St. Martin In The Fields Middlesex][=:DistrictCounty:St. Martin In The Fields Middlesex RegDist, Middlesex, England]|
[?:District=St Olave Bermondsey][=:DistrictCounty:St Olave Bermondsey RegDist, Surrey, England]|
[?:District=St. Olave (Bermondsey)][=:DistrictCounty:St. Olave (Bermondsey) RegDist, Surrey, England]|
[?:District=St Pancras][=:DistrictCounty:St Pancras RegDist, Middlesex, England]|
[?:District=St. Pancras][=:DistrictCounty:St Pancras RegDist, Middlesex, England]|
[?:District=St. Saviour][=:DistrictCounty:St Saviour Southwark RegDist, Surrey, England]|
[?:District=St Saviour London][=:DistrictCounty:St Saviour Southwark RegDist, Surrey, England]|
[?:District=St Saviour Southwark][=:DistrictCounty:St Saviour Southwark RegDist, Surrey, England]|
[?:District=St. Saviour Southwark][=:DistrictCounty:St Saviour Southwark RegDist, Surrey, England]|
[?:District=St Thomas Union Devon][=:DistrictCounty:St Thomas RegDist, Devonshire, England]|
[?:District=St Thomas][=:DistrictCounty:St Thomas RegDist, Devonshire, England]|
[?:District=Stafford Union][=:DistrictCounty:Stafford Union RegDist, Staffordshire, England]|
[?:District=Staines][=:DistrictCounty:Staines RegDist, Middlesex, England]|
[?:District=Stockport Union][=:DistrictCounty:Stockport RegDist, Lancashire and Cheshire, England]|
[?:District=Stockport][=:DistrictCounty:Stockport RegDist, Lancashire and Cheshire, England]|
[?:District=Stoke Newington][=:DistrictCounty:Stoke Newington RegDist, London, England]|
[?:District=Stourbridge][=:DistrictCounty:Stourbridge RegDist, Worcestershire Shropshire and Staffordshire, England]|
[?:District=Strand][=:DistrictCounty:Strand RegDist, Middlesex, England]|
[?:District=Stratton][=:DistrictCounty:Stratton RegDist, Cornwall, England]|
[?:District=Sunderland][=:DistrictCounty:Sunderland RegDist, Co. Durham, England]|
[?:District=Surrey Mid Eastern][=:DistrictCounty:Surrey Mid Eastern RegDist, Surrey, England]|
[?:District=Surrey North Eastern][=:DistrictCounty:Surrey North Eastern RegDist, Surrey, England]|
[?:District=Surrey North Western][=:DistrictCounty:Surrey North Western RegDist, Surrey, England]|
[?:District=Surrey North-Western][=:DistrictCounty:Surrey North Western RegDist, Surrey, England]|
[?:District=Surrey Northern][=:DistrictCounty:Surrey Northern RegDist, Surrey, England]|
[?:District=Surrey South Eastern][=:DistrictCounty:Surrey South Eastern RegDist, Surrey, England]|
[?:District=Surrey South Western][=:DistrictCounty:Surrey South Western RegDist, Surrey, England]|
[?:District=Surrey South-Western][=:DistrictCounty:Surrey South Western RegDist, Surrey, England]|
[?:District=Sutton][=:DistrictCounty:Sutton RegDist, Surrey, England]|
[?:District=Swindon][=:DistrictCounty:Swindon RegDist, Wiltshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#T
|
[?:District:substring:1:1=T]

<
[?:District=Tavistock Union][=:DistrictCounty:Tavistock RegDist, Devonshire, England]|
[?:District=Taunton][=:DistrictCounty:Taunton RegDist, Somerset, England]|
[?:District=Taunton Deane][=:DistrictCounty:Taunton Deane RegDist, Somerset, England]|
[?:District=The Anglesey Union][=:DistrictCounty:Anglesey RegDist, England]|
[?:District=The Bideford Union][=:DistrictCounty:Bideford RegDist, Devonshire, England]|
[?:District=The Bideford][=:DistrictCounty:Bideford RegDist, Devonshire, England]|
[?:District=The Burnley Union][=:DistrictCounty:Burnley RegDist, Lancashire and West Riding of Yorkshire, England]| 
[?:District=The Preston Union][=:DistrictCounty:Preston RegDist, Lancashire, England]|
[?:District=The Salford Union][=:DistrictCounty:Salford RegDist, Lancashire, England]|
[?:District=Thanet][=:DistrictCounty:Thanet RegDist, Kent, England]|
[?:District=Thorne][=:DistrictCounty:Thorne RegDist, Lincolnshire and West Riding of Yorkshire, England]|
[?:District=Tiverton And Dulverton][=:DistrictCounty:Tiverton And Dulverton RegDist, Somerset and Devon, England]|
[?:District=Todmorden][=:DistrictCounty:Todmorden RegDist, Lancashire and West Riding of Yorkshire, England]|
[?:District=Torbay][=:DistrictCounty:Torbay RegDist, Devon, England]|
[?:District=Torrington Union][=:DistrictCounty:Torrington Union RegDist, Devonshire, England]|
[?:District=Torrington][=:DistrictCounty:Torrington RegDist, Devonshire, England]|
[?:District=Totnes][=:DistrictCounty:Totnes RegDist, Devonshire, England]|
[?:District=Trafford][=:DistrictCounty:Trafford RegDist, Lancashire, England]|
[?:District=Truro][=:DistrictCounty:Truro RegDist, Cornwall, England]|
[?:District=Tynemouth][=:DistrictCounty:Tynemouth RegDist, Northumberland, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#U
|
[?:District:substring:1:1=U]

<
[?:District=Ulverstone][=:DistrictCounty:Ulverstone RegDist, Lancashire, England]|
[?:District=Uttoxeter][=:DistrictCounty:Uttoxeter RegDist, Staffordshire, England]|
[?:District=Uxbridge][=:DistrictCounty:Uxbridge RegDist, Middlesex, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#V

#W
|
[?:District:substring:1:1=W]

<
[?:District=W Derby][=:DistrictCounty:West Derby RegDist, Lancashire, England]|
[?:District=Wakefield Union][=:DistrictCounty:Wakefield RegDist, West Riding of Yorkshire, England]|
[?:District=Wallasey][=:DistrictCounty:Wallasey RegDist, Cheshire, England]|
[?:District=Wallingford][=:DistrictCounty:Wallingford RegDist, Berkshire, England]|
[?:District=Walsall Union][=:DistrictCounty:Walsall RegDist, Staffordshire, England]|
[?:District=Walsall][=:DistrictCounty:Walsall RegDist, Staffordshire, England]|
[?:District=Wandsworth][=:DistrictCounty:Wandsworth RegDist, Surrey, England]|
[?:District=Wantage][=:DistrictCounty:Wantage RegDist, Berkshire, England]|
[?:District=Warwickshire South][=:DistrictCounty:Warwickshire South RegDist, Warwickshire, England]|
[?:District=Watford][=:DistrictCounty:Watford RegDist, Hertfordshire, England]|
[?:District=West Bromwich][=:DistrictCounty:West Bromwich RegDist, Warwickshire, England]|
[?:District=West Derby and Toxteth Park][=:DistrictCounty:West Derby RegDist, Lancashire, England]|
[?:District=Westderby And Toxteth Park][=:DistrictCounty:West Derby RegDist, Lancashire, England]|
[?:District=West Derby][=:DistrictCounty:West Derby RegDist, Lancashire, England]|
[?:District=West Derby & Toxteth Park][=:DistrictCounty:West Derby RegDist, Lancashire, England]|
[?:District=West Ham][=:DistrictCounty:West Ham RegDist, Essex, England]|
[?:District=West Surrey][=:DistrictCounty:West Surrey RegDist, Surrey, England]|
[?:District=Westhampnett][=:DistrictCounty:Westhampnett RegDist, Sussex, England]|
[?:District=Weymouth][=:DistrictCounty:Weymouth RegDist, Dorset, England]|
[?:District=Whitechapel][=:DistrictCounty:Whitechapel RegDist, Middlesex and London, England]|
[?:District=Whitehaven][=:DistrictCounty:Whitehaven RegDist, Cumberland, England]|
[?:District=Wigan Union][=:DistrictCounty:Wigan RegDist, Lancashire, England]|
[?:District=Wigan][=:DistrictCounty:Wigan RegDist, Lancashire, England]|
[?:District=Wigton][=:DistrictCounty:Wigton RegDist, Cumberland, England]|
[?:District=Willesden][=:DistrictCounty:Willesden RegDist, Middlesex, England]|
[?:District=Windsor][=:DistrictCounty:Windsor RegDist, Berkshire, England]|
[?:District=Wirral][=:DistrictCounty:Wirral RegDist, Cheshire, England]|
[?:District=Witney][=:DistrictCounty:Witney RegDist, Oxfordshire, England]|
[?:District=Wolverhampton And Seisdon][=:DistrictCounty:Wolverhampton RegDist, Shropshire, England]|
[?:District=Wrexham][=:DistrictCounty:Wrexham RegDist, Denbighshire, Wales]|
[?:District=Wycombe][=:DistrictCounty:Wycombe RegDist, Buckinghamshire and Oxfordshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#Y
|
[?:District:substring:1:1=Y]

<
[?:District=Yarmouth][=:DistrictCounty:Yarmouth RegDist, Norfolk, England]|
[?:District=Yeovil][=:DistrictCounty:Yeovil RegDist, Somerset, England]|
[?:District=York][=:DistrictCounty:York RegDist, Yorkshire, England]|
[lib.Get_GRO_DistrictCounty_Error]
>

#Error
|
[lib.ErrorMessage:Reg District ERROR]
>


>

# Place Parts check
<
[?:var.PlaceParts>3]
[=:zCommas:[var.PlaceParts:mathSubtract:3]]
<
[?:zCommas=3][=:DistrictCounty:[DistrictCounty:prepend: , , , ]]|
[?:zCommas=2][=:DistrictCounty:[DistrictCounty:prepend: , , ]]|
[?:zCommas=1][=:DistrictCounty:[DistrictCounty:prepend: , ]]|
[lib.ErrorMessage:Reg District - Commas error]
>
>





# [=:End:Get_GRO_DistrictCounty]

Get_GRO_DistrictCounty_Error

#{target=ancestral sources}

# Change history   Reason for change
# --------------   --------------------------------------------------------------------
# 04/03/2024       Set Get DistrictCounty error message.

# Usage: [lib.Get_GRO_DistrictCounty_Error]

# Error
[lib.ErrorMessage:Set up district in Get_GRO_DistrictCounty:District:District]

Get_Registry

[=:Start:Get_Registry]

#
# Author : Alan
#
# Description: List of Registries and Sub-Regsitries
#
# Usage: [lib.Get_Registry]
#
# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 01/02/2024         Change error message from GRO to Registry.
#                    Added registry name of "Newcastle upon Tyne".
#                    Removed excessive conditions --> replaced <[ with [ and ]>| with ]|.
# 03/02/2024         Changed "[var.z_*]" to "[var.z*]".

[=:zRegistry:[zRegistry:split:,:1]]


<
#A

#B
[?:zRegistry=Birmingham][==:var.zProbateRegistry:Birmingham Registry, Warwickshire, England]|
[?:zRegistry=Bodmin][==:var.zProbateRegistry:Bodmin Sub-Registry, Cornwall, England]|
[?:zRegistry=Brighton][==:var.zProbateRegistry:Brighton Registry, Sussex, England]|
[?:zRegistry=Bristol][==:var.zProbateRegistry:Bristol Registry, Gloucestershire, England]|
 	

#C
[?:zRegistry=Caernarfon][==:var.zProbateRegistry:Caernarfon Sub-Registry, Caernarvonshire, Wales]|
[?:zRegistry=Cardiff][==:var.zProbateRegistry:Cardiff Registry, Glamorgan, Wales]|
[?:zRegistry=Carlisle][==:var.zProbateRegistry:Carlisle Sub-Registry, Cumberland, England]|
[?:zRegistry=Carmarthen][==:var.zProbateRegistry:Carmarthen Sub-Registry, Carmarthenshire, Wales]|
[?:zRegistry=Chester][==:var.zProbateRegistry:Chester Sub-Registry, Cheshire, England]|
[?:zRegistry=Chichester][==:var.zProbateRegistry:Chichester Sub-Registry, Sussex, England]|

 	
#D

#E
[?:zRegistry=Exeter][==:var.zProbateRegistry:Exeter Sub-Registry, Devon, England]|

#F

#G
[?:zRegistry=Gloucester][==:var.zProbateRegistry:Gloucester Sub-Registry, Gloucestershire, England]|

#H

#I
[?:zRegistry=Ipswich][==:var.zProbateRegistry:Ipswich Registry, Suffolk, England]|

#J

#K

#L
[?:zRegistry=Lancaster][==:var.zProbateRegistry:Lancaster Sub-Registry, Lancashire, England]|
[?:zRegistry=Leeds][==:var.zProbateRegistry:Leeds Registry, Yorkshire, England]|
[?:zRegistry=Leicester][==:var.zProbateRegistry:Leicester Sub-Registry,Leicestershire, England]|
[?:zRegistry=Lincoln][==:var.zProbateRegistry:Lincoln Sub-Registry, Lincolnshire, England]|
[?:zRegistry=Liverpool][==:var.zProbateRegistry:Liverpool Registry, Lancashire, England]|
[?:zRegistry=Llandudno][==:var.zProbateRegistry:Llandudno Registry, Conwy, England]|
[?:zRegistry=London][==:var.zProbateRegistry:Principal Registry, London, England]|

#M
[?:zRegistry=Maidstone][==:var.zProbateRegistry:Maidstone Sub-Registry, Berkshire, England]|
[?:zRegistry=Manchester][==:var.zProbateRegistry:Manchester Registry, Lancashire, England]|
[?:zRegistry=Middlesbrough][==:var.zProbateRegistry:Middlesbrough Sub-Registry, Yorkshire, England]|

#N
[?:zRegistry=Newcastle][==:var.zProbateRegistry:Newcastle Registry, Northumberland, England]|
[?:zRegistry=Newcastle upon Tyne][==:var.zProbateRegistry:Newcastle Registry, Northumberland, England]|
[?:zRegistry=Norwich][==:var.zProbateRegistry:Norwich Sub-Registry, Norfolk, England]|
[?:zRegistry=Nottingham][==:var.zProbateRegistry:Nottingham Sub-Registry, Nottinghamshire, England]|

#O
[?:zRegistry=Oxford][==:var.zProbateRegistry:Oxford Registry, Oxfordshire, England]|


#P
[?:zRegistry=Peterborough][==:var.zProbateRegistry:Peterborough Sub-Registry, Cambridgeshire, England]|
[?:zRegistry=Principal Registry][==:var.zProbateRegistry:Principal Registry, London, England]|

#Q

#R
 	
#S
[?:zRegistry=Sheffield][==:var.zProbateRegistry:Sheffield Sub-Registry, Yorkshire, England]|
[?:zRegistry=Stoke-on-Trent][==:var.zProbateRegistry:Stoke-on-Trent Sub-Registry, Staffordshire, England]|

#T

#U

#V
	
#W
[?:zRegistry=Winchester][==:var.zProbateRegistry:Winchester Registry, Hampshire, England]|
	
#Y
[?:zRegistry=York][==:var.zProbateRegistry:York Sub-Registry, Yorkshire, England]|

[lib.ErrorMessage:Update library template GET_REGISTRY]

>

 	
[=:End:Get_Registry]

Get_Sub-District

# [=:Start:Get_Sub-District]
#
# Author : Alan
#
# Description: Used by UKBMD whuch identifies BMD at a sub-district. UKBMD only sometimes shows a region
#              so best to create a UKBMD sub-district lookup to fetch Registraton District, County and
#              country.
#              To find the Registration District look at FreeBMD, Civl Reg or GRO.
#

# Variables    Input variable: [Sub-District]
#              Output variable(s): [Sub-DistrictCounty], [var.Sub-DistrictCounty]
#
# Usage: [lib.Get_Sub-District]
#
# Called by: 
#
# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 18/05/2024 BETA4   Initial creation with introduction of UKBMD record types.


<
[?:Sub-District]

<
[?:Sub-District:substring:1:1=A]

#A
<
[lib.Get_Sub-District_Error]
>

#B
|
[?:Sub-District:substring:1:1=B]

<
[lib.Get_Sub-District_Error]
>

#C
|
[?:Sub-District:substring:1:1=C]

<
[?:Sub-District=Cheetham][=:Sub-DistrictCounty:Cheetham SubDist, Lancashire, England]|
#[?:Sub-District=Cheetham][=:Sub-DistrictCounty:Cheetham SubDist, Prestwich RegDist, Lancashire, England]|
[lib.Get_Sub-District_Error]
>

#D
|
[?:Sub-District:substring:1:1=D]

<
[lib.Get_Sub-District_Error]
>

#E
|
[?:Sub-District:substring:1:1=E]

<
[lib.Get_Sub-District_Error]
>

#F
|
[?:Sub-District:substring:1:1=F]

<
[lib.Get_Sub-District_Error]
>

#G
|
[?:Sub-District:substring:1:1=G]

<
[lib.Get_Sub-District_Error]
>

#H
|
[?:Sub-District:substring:1:1=H]

<
[lib.Get_Sub-District_Error]
>

#I
|
[?:Sub-District:substring:1:1=I]

<
[lib.Get_Sub-District_Error]
>

#J
|
[?:Sub-District:substring:1:1=J]

<
[lib.Get_Sub-District_Error]
>

#L
|
[?:Sub-District:substring:1:1=L]

<
[lib.Get_Sub-District_Error]
>

#M
|
[?:Sub-District:substring:1:1=M]

<
[lib.Get_Sub-District_Error]
>

#N
|
[?:Sub-District:substring:1:1=N]

<
[lib.Get_Sub-District_Error]
>

#O
|
[?:Sub-District:substring:1:1=O]

<
[lib.Get_Sub-District_Error]
>

#P
|
[?:Sub-District:substring:1:1=P]

<
[lib.Get_Sub-District_Error]
>

#Q

#R
|
[?:Sub-District:substring:1:1=R]

<
[lib.Get_Sub-District_Error]
>

#S
|
[?:Sub-District:substring:1:1=S]

<
[lib.Get_Sub-District_Error]
>

#T
|
[?:Sub-District:substring:1:1=T]

<
[lib.Get_Sub-District_Error]
>

#U
|
[?:Sub-District:substring:1:1=U]

<
[lib.Get_Sub-District_Error]
>

#V

#W
|
[?:Sub-District:substring:1:1=W]

<
lib.Get_Sub-District_Error]
>

#Y
|
[?:Sub-District:substring:1:1=Y]

<
[lib.Get_Sub-District_Error]
>

#Error
|
[lib.ErrorMessage:Sub District ERROR]
>


>

# [=:End:Get_GRO_DistrictCounty]

Get_Sub-District_Error

#{target=ancestral sources}

# Change history   Reason for change
# --------------   --------------------------------------------------------------------
# 18/05/2024       Set Get Sub-District error message.

# Usage: [lib.Get_Sub-District_Error]

# Error
[lib.ErrorMessage:Set up sub-district in Get_Sub-District:Sub-District]

GetCensusDate


<
[?:zTempYear=1841][==:var.EventDate:06 Jun 1841]|
[?:zTempYear=1851][==:var.EventDate:30 Mar 1851]|
[?:zTempYear=1861][==:var.EventDate:07 Apr 1861]|
[?:zTempYear=1871][==:var.EventDate:02 Apr 1871]|
[?:zTempYear=1881][==:var.EventDate:03 Apr 1881]|
[?:zTempYear=1891][==:var.EventDate:05 Apr 1891]|
[?:zTempYear=1901][==:var.EventDate:31 Mar 1901]|
[?:zTempYear=1911][==:var.EventDate:02 Apr 1911]|
[?:zTempYear=1921][==:var.EventDate:19 Jun 1921]
>

GetCivilReg

# Usage: [lib.GetCivilReg:Event Type]

#
# Author: Alan

# Change History     Reason for change
# -----------------  ---------------------------------------------------------
# 07/09/2023 xx:xx   First attempt to consolidate civil reg for Ancestry & Findmypast for birth.
# 07/09/2023 xx:xx   Second attempt to consolidate civil reg for Ancestry & Findmypast for
#                    birth, marriage and death.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 04/02/2024         Ancestry uses alternative district field for death - [Death Registration Place]
# 04/02/2024 11:45   Ancestry uses alternative district field for birth - [Registration Place]
# 21/02/2024         Added [lib.GetGender]
# 29/02/2024         Register number and entry number introduced from Jan 1990s to replace volume and page for SCI Birth and SCI Death.
# 03/03/2024         Added field [var.zBirthDate] in Ancestry and Findmypast.
# 07/04/2024         Updated the setting of Volume, Page, Register Number and Entry Number.
# 16/06/2024 BETA7   Updated fields to cope with service "FreeBMD" - vol

#
# Collections: #

# Usage: [lib.GetCivilReg:Event Type]
#
# Parameters : Event Type being Birth, Death or Marriage
#
# Input variable : None
#
# Called by: 
#
# Calls: 

[==:var.Debug:1]

# Check for valid gender
<
[?:var.zGivenName][lib.GetGender:var.zGivenName]
|
[?:var.zSpouseGiven][lib.GetGender:var.zSpouseGiven]
>


[=:Event Type:{1}]
[==:var.zCivilRegType:{1}]

# Common fields to both Ancestry and Findmypast and GRO
# Birth & Death from Jan 1993 does not use Volume & Page

# Volume
<
[?:Volume][==:var.zVolume:[Volume]]
|
[?:Volume Number][==:var.zVolume:[Volume Number]]
|
[?:Vol][==:var.zVolume:[Vol]]
>
# Page
<
[?:Page][==:var.zPage:[Page]]
|
[?:Page Number][==:var.zPage:[Page Number]]
>

# Register Number (from 1984)
<
[?:Register Number][==:var.zCivilRegisterNumber:[Register Number]]
|
[?:Reg][==:var.zCivilRegisterNumber:[Reg]]
>

# Entry Number (from 1984)
<[?:Entry Number][==:var.zCivilRegEntryNumber:[Entry Number]]>



<[?:District Code][==:var.zCivilRegDistrictNumber:[District Code]]>



<
#======================================================================================Ancestry
[?:Page.ServiceName=Ancestry]

# 07/08/2023 From 1999 the registration date was composed of month and year
# Registration Year - it can appear as yyyy or Qn yyyy or mmm yyyy
# Get registration year and put it into assignment variable "rd2"...
[=:rd1:[Registration Date:split: :1]]
[=:rd2:[Registration Date:split: :2]]
<
[?:rd1/Q/]
|
[?:RD2]
|
[=:rd2:[rd1]]
>
[==:var.zCivilRegYear:[rd2]]

# Reg Month (1984 onwards)
<
[?:var.zCivilRegYear>=1984]
<
[?:Registration Month][==:var.zCivilRegMonth:[Registration Month]]
|
[?:Registration Date][==:var.zCivilRegMonth:[Registration Date:dateMonth]]
>
>

# Get first month of Registration Quarter
[=:m1:[Quarter of the Year:append:1900:dateQuarter:Sss]]
<[?:m1]|[=:m1:[Registration Date:dateQuarter:Sss]]>
[==:var.zCivilRegQtr:[m1]]

# Registration District --> requires [District]
<
[?:Registration district][=:District:[Registration district]]
|
[?:Registration Place][=:District:[Registration Place:split:,:1]]
|
[?:Death Registration Place][=:District:[Death Registration Place:split:,:1]]
>
<
[?:District and Subdistrict][==:var.zCivilRegDistrictNumber:[District and Subdistrict]]
|
[?:District number][==:var.zCivilRegDistrictNumber:[District number]]
>

[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]

<
[?:Birth Date]
[==:var.zBirthYear:[Birth Date:dateYear]]
[==:var.zBirthDate:[Birth Date]]
>


# Update Arcive Reference
[==:var.zArchiveReference:[var.zCivilRegDistrict:split:,:1:append: :append:[var.zCivilRegYear]:append: :append: :append:[var.zCivilRegQtr]:append: :append:[var.zVolume]:append: :append:[var.zPage]]]

|
#====================================================================================Findmypast
[?:Page.ServiceName=Findmypast]

# Registration Year - is the birth year in Findmypast. Confusing because event year could be at end and reg year at start

<
[?:Registration Date][==:var.zCivilRegYear:[Registration Date:dateYear]]
|
[?:^Event Type:append: registration year][==:var.zCivilRegYear:[^Event Type:append: registration year]]
|
[?:^Event Type:append: year][==:var.zCivilRegYear:[^Event Type:append: year]]
>

<[?:Registration Month][==:var.zCivilRegMonth:[Registration Month]]>

# Get first month of Registration Quarter
<
[?:^Event Type:append: quarter=1][==:var.zCivilRegQtr:Jan]|
[?:^Event Type:append: quarter=2][==:var.zCivilRegQtr:Apr]|
[?:^Event Type:append: quarter=3][==:var.zCivilRegQtr:Jul]|
[?:^Event Type:append: quarter=4][==:var.zCivilRegQtr:Oct]|
[?:Registration Date/Q/][==:var.zCivilRegQtr:[Registration Date:dateQuarter:Sss]]
>

# Registration District Number
<
[?:District and Subdistrict][==:var.zCivilRegDistrictNumber:[District and Subdistrict]]
|
[?:District number][==:var.zCivilRegDistrictNumber:[District number]]
>

# Registration District
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]

<[?:Birth day]
[==:var.zBirthDate:[Birth Day:append:/:append:[Birth Month]:append:/:append:[Birth Year]]]>


# Reg Month (1984 onwards)
<
[?:var.zCivilRegYear>=1984]
<
[?:Registration Month][==:var.zCivilRegMonth:[Registration Month]]
|
[?:Registration Date][==:var.zCivilRegMonth:[Registration Date:dateMonth]]
>
>


# Update Arcive Reference
[==:var.zArchiveReference:[var.zCivilRegDistrict:split:,:1:append: :append:[var.zCivilRegYear]:append: :append: :append:[var.zCivilRegQtr]:append: :append:[var.zVolume]:append: :append:[var.zPage]]]

|
#====================================================================================GRO UK
[?:Page.ServiceName=GRO UK]

[==:var.zCivilRegYear:[Registration Year]]

# Get first month of Registration Quarter
<[?:Registration Quarter=Q1][==:var.zCivilRegQtr:Jan]|
[?:Registration Quarter=Q2][==:var.zCivilRegQtr:Apr]|
[?:Registration Quarter=Q3][==:var.zCivilRegQtr:Jul]|
[?:Registration Quarter=Q4][==:var.zCivilRegQtr:Oct]>


# Registration District
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]


|
#====================================================================================FreeBMD
[?:Page.HostName/^FreeBMD/]

[==:var.zCivilRegYear:[var.zRegYear]]

# Get first month of Registration Quarter
[=:Registration Quarter:[SDate:dateMonthAbbr]]
<[?:Registration Quarter=Mar][==:var.zCivilRegQtr:Jan]|
[?:Registration Quarter=Jun][==:var.zCivilRegQtr:Apr]|
[?:Registration Quarter=Sep][==:var.zCivilRegQtr:Jul]|
[?:Registration Quarter=Dec][==:var.zCivilRegQtr:Oct]>


# Registration District
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]


#====================================================================================End of services
>


#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

GetCivilReg_v2

# Usage: [lib.GetCivilReg_v2]

<
#-----------------------------------------------------------------------Ancestry
[?:Page.ServiceName=Ancestry]
Registration Date=[Registration Date]\<br\>
<Registration Quarter=[?:Registration Quarter][Registration Quarter]\<br\>>
Reg Year=[Registration Date:dateYear]\<br\>
<
[?:Registration Date:splitcount: >1]
<
[?:Registration Date/^Q/]
[=:rq:[Registration Date:split: :1]]
Reg Qtr=[rq]\<br\>
Reg Month=<[?:rq=Q1]Jan|[?:rq=Q2]Apr|[?:rq=Q3]Jul|[?:rq=Q4]Oct>
|
Reg Month=[Registration Date:dateMonthabbr]\<br\>
>
|
[?:Quarter Date/^Q/]
[=:rq:[Quarter Date:split: :1]]
Reg Qtr=[rq]\<br\>
Reg Month=<[?:rq=Q1]Jan|[?:rq=Q2]Apr|[?:rq=Q3]Jul|[?:rq=Q4]Oct>

>
#-----------------------------------------------------------------------Findmypast

|
[?:Page.ServiceName=Findmypast]
<
[?:Birth Quarter][=:EventType:Birth]|
[?:Birth registration year][=:EventType:Birth]|
[?:Marriage Quarter][=:EventType:Marriage]|
[?:Death Quarter][=:EventType:Death]|
[?:Death Year][=:EventType:Death][=:Death Quarter:[Death Date:dateMonthabbr]]|
[lib.ErrorMessage:Invalid Event Type]
>
Event Type=[EventType]\<br\>
#Reg Year=[=:ry:[^EventType:append: Date]][ry:dateYear]
Reg Year=
<
[?:^EventType:append: registration year]
[^EventType:append: registration year]
|
[^EventType:append: year]
>
\<br\>
Reg Qtr=
<
[?:Registration quarter][=:rq:[Registration quarter]]
|
[=:rq:[^EventType:append: Quarter]]
>
<[?:rq=1]Jan|[?:rq=2]Apr|[?:rq=3]Jul|[?:rq=4]Oct|[rq]>\<br\>
<
Reg Month=[?:Registration Month][=:rm:[Registration Month]]
<
[?:rm=1]Jan|[?:rm=2]Feb|[?:rm=3]Mar|[?:rm=4]Apr|[?:rm=5]May|[?:rm=6]Jun|
[?:rm=7]Jul|[?:rm=8]Aug|[?:rm=9]Sep|[?:rm=10]Oct|[?:rm=11]Nov|[?:rm=12]Dec
>
>
#-----------------------------------------------------------------------GRO UK

|
[?:Page.ServiceName=GRO UK]
[==:var.zCivilRegYear:[Registration Year]]

# Get first month of Registration Quarter
<[?:Registration Quarter=Q1][==:var.zCivilRegQtr:Jan]|
[?:Registration Quarter=Q2][==:var.zCivilRegQtr:Apr]|
[?:Registration Quarter=Q3][==:var.zCivilRegQtr:Jul]|
[?:Registration Quarter=Q4][==:var.zCivilRegQtr:Oct]>
<[?:Registration Month][==:var.zCivilRegMth:[Registration Month]]>
<[?:District Code][==:var.zRegDistrictNo:[District Code]]>
<[?:Reg][==:var.zRegNo:[Reg]]>
<[?:Entry Number][==:var.zEntryNo:[Entry Number]]>

Reg Year=[var.zCivilRegYear]\<br\>
Reg Qtr=[var.zCivilRegQtr]\<br\>
<Reg Month=[var.zCivilRegMth]\<br\>>
<Reg No=[var.zRegNo]\<br\>>
<Entry No=[var.zEntryNo]\<br\>>
<District=[District:append: (:append:[var.zRegDistrictNo]:append:)]\<br\>>
#-----------------------------------------------------------------------Error in service
|
[lib.ErrorMessage:Invalid Service Name:Page.ServiceName]
>

GetGender

# [=:Start:GetGender]
# Author: Alan
# Description: Routine to find gener for a given name because ORA is not able to pick up gender
#              from the GRO site. Also used for marriages to ensure that the marraige process
#              starts with the GROOM.


# Usage: [lib.GetGender:field name]

# Change History     Reason for change
# --------------     ---------------------------------------------------------------------------
# 01/11/2023 1.0     Added Judith, Betsy, Graham.
# 01/02/2024         Added Georgina.
# 02/02/2024         Added Horace.
# 08/02/2024         Added [lib.ErrorMessageDsiplay]
# 02/03/2024         Added Lee.
# 04/03/2024         Speeded up search process using 1st letter.
# 04/03/2024         Added Angus.
# 06/03/2024         Added Matthew.
# 06/03/2024         Added Neil.

# {1} Field Name to test
[=:GenderName:[{1}:split: :1]]

<
# A
[?:GenderName:substring:1:1=A]

<
[?:GenderName=Ada][=:Gender:F]|
[?:GenderName=Adam][=:Gender:M]|
[?:GenderName=Adrian][=:Gender:M]|
[?:GenderName=Agnes][=:Gender:F]|
[?:GenderName=Aileen][=:Gender:F]|
[?:GenderName=Alan][=:Gender:M]|
[?:GenderName=Allan][=:Gender:M]|
[?:GenderName=Albert][=:Gender:M]|
[?:GenderName=Alfred][=:Gender:M]|
[?:GenderName=Alec][=:Gender:M]|
[?:GenderName=Alex][=:Gender:M]|
[?:GenderName=Alexander][=:Gender:M]|
[?:GenderName=Alice][=:Gender:F]|
[?:GenderName=Alma][=:Gender:F]|
[?:GenderName=Amelia][=:Gender:F]|
[?:GenderName=Amie][=:Gender:F]|
[?:GenderName=Amy][=:Gender:F]|
[?:GenderName=Angus][=:Gender:M]|
[?:GenderName=Andrea][=:Gender:F]|
[?:GenderName=Andrew][=:Gender:M]|
[?:GenderName=Angela][=:Gender:F]|
[?:GenderName=Ann][=:Gender:F]|
[?:GenderName=Anna][=:Gender:F]|
[?:GenderName=Annette][=:Gender:F]|
[?:GenderName=Annie][=:Gender:F]|
[?:GenderName=Anthony][=:Gender:M]|
[?:GenderName=April][=:Gender:F]|
[?:GenderName=Archibald][=:Gender:M]|
[?:GenderName=Arthur][=:Gender:M]|
[?:GenderName=Ayshe][=:Gender:F]|
[lib.GetGenderError]
>
|
# B
[?:GenderName:substring:1:1=B]

<
[?:GenderName=Barbara][=:Gender:F]|
[?:GenderName=Beatrice][=:Gender:F]|
[?:GenderName=Benjamin][=:Gender:M]|
[?:GenderName=Bennett][=:Gender:M]|
[?:GenderName=Bernard][=:Gender:M]|
[?:GenderName=Bert][=:Gender:M]|
[?:GenderName=Bertie][=:Gender:M]|
[?:GenderName=Bertram][=:Gender:M]|
[?:GenderName=Bessie][=:Gender:F]|
[?:GenderName=Betsy][=:Gender:F]|
[?:GenderName=Betty][=:Gender:F]|
[?:GenderName=Brenda][=:Gender:F]|
[?:GenderName=Brian][=:Gender:M]|
[?:GenderName=Bruce][=:Gender:M]|
[lib.GetGenderError]
>
|
# C
[?:GenderName:substring:1:1=C]

<
[?:GenderName=Caroline][=:Gender:F]|
[?:GenderName=Catherine][=:Gender:F]|
[?:GenderName=Cecil][=:Gender:M]|
[?:GenderName=Celia][=:Gender:F]|
[?:GenderName=Charlotte][=:Gender:F]|
[?:GenderName=Charles][=:Gender:M]|
[?:GenderName=Charley][=:Gender:M]|
[?:GenderName=Charlie][=:Gender:M]|
[?:GenderName=Chris][=:Gender:M]|
[?:GenderName=Christine][=:Gender:F]|
[?:GenderName=Christopher][=:Gender:M]|
[?:GenderName=Claire][=:Gender:F]|
[?:GenderName=Clara][=:Gender:F]|
[?:GenderName=Clarence][=:Gender:M]|
[?:GenderName=Clive][=:Gender:M]|
[?:GenderName=Clothilda][=:Gender:F]|
[?:GenderName=Clotilda][=:Gender:F]|
[?:GenderName=Colin][=:Gender:M]|
[?:GenderName=Constance][=:Gender:F]|
[?:GenderName=Craig][=:Gender:M]|
[?:GenderName=Cynthia][=:Gender:F]|
[?:GenderName=Cyril][=:Gender:M]|
[lib.GetGenderError]
>
|
# D
[?:GenderName:substring:1:1=D]

<
[?:GenderName=Daisy][=:Gender:F]|
[?:GenderName=Daniel][=:Gender:M]|
[?:GenderName=Daphne][=:Gender:F]|
[?:GenderName=David][=:Gender:M]|
[?:GenderName=Denis][=:Gender:M]|
[?:GenderName=Dennis][=:Gender:M]|
[?:GenderName=Dereck][=:Gender:M]|
[?:GenderName=Derek][=:Gender:M]|
[?:GenderName=Derick][=:Gender:M]|
[?:GenderName=Diane][=:Gender:F]|
[?:GenderName=Donna][=:Gender:F]|
[?:GenderName=Dora][=:Gender:F]|
[?:GenderName=Doreen][=:Gender:F]|
[?:GenderName=Doris][=:Gender:F]|
[?:GenderName=Dorothy][=:Gender:F]|
[?:GenderName=Douglas][=:Gender:M]|
[lib.GetGenderError]
>
|
# E
[?:GenderName:substring:1:1=E]

<
[?:GenderName=Edith][=:Gender:F]|
[?:GenderName=Edna][=:Gender:F]|
[?:GenderName=Edward][=:Gender:M]|
[?:GenderName=Edwin][=:Gender:M]|
[?:GenderName=Edwina][=:Gender:F]|
[?:GenderName=Eileen][=:Gender:F]|
[?:GenderName=Eleanor][=:Gender:F]|
[?:GenderName=Eliza][=:Gender:F]|
[?:GenderName=Elizabeth][=:Gender:F]|
[?:GenderName=Ellen][=:Gender:F]|
[?:GenderName=Elsie][=:Gender:F]|
[?:GenderName=Emma][=:Gender:F]|
[?:GenderName=Emily][=:Gender:F]|
[?:GenderName=Enid][=:Gender:F]|
[?:GenderName=Ernest][=:Gender:M]|
[?:GenderName=Esther][=:Gender:F]|
[?:GenderName=Ethan][=:Gender:M]|
[?:GenderName=Ethel][=:Gender:F]|
[?:GenderName=Eric][=:Gender:M]|
[?:GenderName=Eusebaus][=:Gender:M]|
[?:GenderName=Eusebius][=:Gender:M]|
[?:GenderName=Eva][=:Gender:F]|
[?:GenderName=Evan][=:Gender:M]|
[?:GenderName=Evangeline][=:Gender:F]|
[?:GenderName=Everard][=:Gender:M]|
[?:GenderName=Evelyn][=:Gender:F]|
[lib.GetGenderError]
>
|
# F
[?:GenderName:substring:1:1=F]

<
[?:GenderName=Fanny][=:Gender:F]|
[?:GenderName=Felicity][=:Gender:F]|
[?:GenderName=Fergus][=:Gender:M]|
[?:GenderName=Florence][=:Gender:F]|
[?:GenderName=Frances][=:Gender:F]|
[?:GenderName=Francis][=:Gender:M]|
[?:GenderName=Frank][=:Gender:M]|
[?:GenderName=Freda][=:Gender:F]|
[?:GenderName=Frederick][=:Gender:M]|
[lib.GetGenderError]
>
|
# G
[?:GenderName:substring:1:1=G]

<
[?:GenderName=Garth][=:Gender:M]|
[?:GenderName=Geoffrey][=:Gender:M]|
[?:GenderName=George][=:Gender:M]|
[?:GenderName=Georgina][=:Gender:F]|
[?:GenderName=Gerald][=:Gender:M]|
[?:GenderName=Gertie][=:Gender:F]|
[?:GenderName=Gertrude][=:Gender:F]|
[?:GenderName=Gilbert][=:Gender:M]|
[?:GenderName=Gladys][=:Gender:F]|
[?:GenderName=Glenda][=:Gender:F]|
[?:GenderName=Glenn][=:Gender:M]|
[?:GenderName=Gordon][=:Gender:M]|
[?:GenderName=Grace][=:Gender:F]|
[?:GenderName=Graeme][=:Gender:M]|
[?:GenderName=Graham][=:Gender:M]|
[?:GenderName=Grant][=:Gender:M]|
[?:GenderName=Gregory][=:Gender:M]|
[?:GenderName=Gwendoline][=:Gender:F]|
[lib.GetGenderError]
>
|
# H
[?:GenderName:substring:1:1=H]

<
[?:GenderName=Hannah][=:Gender:F]|
[?:GenderName=Harold][=:Gender:M]|
[?:GenderName=Harriet][=:Gender:F]|
[?:GenderName=Harriett][=:Gender:F]|
[?:GenderName=Harriette][=:Gender:F]|
[?:GenderName=Harry][=:Gender:M]|
[?:GenderName=Heather][=:Gender:F]|
[?:GenderName=Helen][=:Gender:F]|
[?:GenderName=Helena][=:Gender:F]|
[?:GenderName=Henrietta][=:Gender:F]|
[?:GenderName=Henry][=:Gender:M]|
[?:GenderName=Herbert][=:Gender:M]|
[?:GenderName=Hilda][=:Gender:F]|
[?:GenderName=Horace][=:Gender:M]|
[?:GenderName=Howard][=:Gender:M]|
[?:GenderName=Humphrey][=:Gender:M]|
[lib.GetGenderError]
>
|
# I
[?:GenderName:substring:1:1=I]

<
[?:GenderName=Ian][=:Gender:M]|
[?:GenderName=Ida][=:Gender:F]|
[?:GenderName=Iris][=:Gender:F]|
[?:GenderName=Isaac][=:Gender:M]|
[?:GenderName=Isabel][=:Gender:F]|
[?:GenderName=Isabelle][=:Gender:F]|
[?:GenderName=Ivy][=:Gender:F]|
[lib.GetGenderError]
>
|
# J
[?:GenderName:substring:1:1=J]

<
[?:GenderName=Jack][=:Gender:M]|
[?:GenderName=Jacqueline][=:Gender:F]|
[?:GenderName=James][=:Gender:M]|
[?:GenderName=Jane][=:Gender:F]|
[?:GenderName=Janet][=:Gender:F]|
[?:GenderName=Jayne][=:Gender:F]|
[?:GenderName=Jean][=:Gender:F]|
[?:GenderName=Jennie][=:Gender:F]|
[?:GenderName=Jennifer][=:Gender:F]|
[?:GenderName=Jeremiah][=:Gender:M]|
[?:GenderName=Jenny][=:Gender:F]|
[?:GenderName=Jessie][=:Gender:F]|
[?:GenderName=Jill][=:Gender:F]|
[?:GenderName=Jo][=:Gender:F]|
[?:GenderName=Joan][=:Gender:F]|
[?:GenderName=Joe][=:Gender:M]|
[?:GenderName=Johanna][=:Gender:F]|
[?:GenderName=John][=:Gender:M]|
[?:GenderName=Jonathan][=:Gender:M]|
[?:GenderName=Joseph][=:Gender:M]|
[?:GenderName=Josephine][=:Gender:F]|
[?:GenderName=Joshua][=:Gender:M]|
[?:GenderName=Joy][=:Gender:F]|
[?:GenderName=Joyce][=:Gender:F]|
[?:GenderName=Judith][=:Gender:F]|
[?:GenderName=Julie][=:Gender:F]|
[?:GenderName=Juliette][=:Gender:F]|
[?:GenderName=June][=:Gender:F]|
[lib.GetGenderError]
>
|
# K
[?:GenderName:substring:1:1=K]

<
[?:GenderName=Karen][=:Gender:F]|
[?:GenderName=Kate][=:Gender:F]|
[?:GenderName=Kathleen][=:Gender:F]|
[?:GenderName=Kathryn][=:Gender:F]|
[?:GenderName=Kenneth][=:Gender:M]|
[?:GenderName=Krista][=:Gender:F]|
[lib.GetGenderError]
>
|
# L
[?:GenderName:substring:1:1=L]

<
[?:GenderName=Laura][=:Gender:F]|
[?:GenderName=Lauren][=:Gender:F]|
[?:GenderName=Lavinia][=:Gender:F]|
[?:GenderName=Lawrence][=:Gender:M]|
[?:GenderName=Leah][=:Gender:F]|
[?:GenderName=Lee][=:Gender:M]|
[?:GenderName=Lena][=:Gender:F]|
[?:GenderName=Leonard][=:Gender:M]|
[?:GenderName=Leonine][=:Gender:F]|
[?:GenderName=Leonora][=:Gender:F]|
[?:GenderName=Leslie][=:Gender:M]|
[?:GenderName=Lighton][=:Gender:M]|
[?:GenderName=Lilian][=:Gender:F]|
[?:GenderName=Lilly][=:Gender:F]|
[?:GenderName=Lily][=:Gender:F]|
[?:GenderName=Linda][=:Gender:F]|
[?:GenderName=Lindsey][=:Gender:F]|
[?:GenderName=Lionel][=:Gender:M]|
[?:GenderName=Lizzie][=:Gender:F]|
[?:GenderName=Lomas][=:Gender:M]|
[?:GenderName=Louis][=:Gender:M]|
[?:GenderName=Louisa][=:Gender:F]|
[?:GenderName=Lucretia][=:Gender:F]|
[?:GenderName=Luke][=:Gender:M]|
[?:GenderName=Lydia][=:Gender:F]|
[?:GenderName=Lynn][=:Gender:F]|
[?:GenderName=Lynton][=:Gender:M]|
[lib.GetGenderError]
>
|
# M
[?:GenderName:substring:1:1=M]

<
[?:GenderName=Mabel][=:Gender:F]|
[?:GenderName=Madeline][=:Gender:F]|
[?:GenderName=Maggie][=:Gender:F]|
[?:GenderName=Malcolm][=:Gender:M]|
[?:GenderName=Marc][=:Gender:M]|
[?:GenderName=Margaret][=:Gender:F]|
[?:GenderName=Margery][=:Gender:F]|
[?:GenderName=Maria][=:Gender:F]|
[?:GenderName=Marian][=:Gender:F]|
[?:GenderName=Marie][=:Gender:F]|
[?:GenderName=Marina][=:Gender:F]|
[?:GenderName=Mark][=:Gender:M]|
[?:GenderName=Marjorie][=:Gender:F]|
[?:GenderName=Martha][=:Gender:F]|
[?:GenderName=Martin][=:Gender:M]|
[?:GenderName=Mathew][=:Gender:M]|
[?:GenderName=Matthew][=:Gender:M]|
[?:GenderName=Maud][=:Gender:F]|
[?:GenderName=Maude][=:Gender:F]|
[?:GenderName=Maureen][=:Gender:F]|
[?:GenderName=Mary][=:Gender:F]|
[?:GenderName=May][=:Gender:F]|
[?:GenderName=Michael][=:Gender:M]|
[?:GenderName=Mildred][=:Gender:F]|
[?:GenderName=Miles][=:Gender:M]|
[?:GenderName=Minnie][=:Gender:F]|
[?:GenderName=Miriam][=:Gender:F]|
[?:GenderName=Molly][=:Gender:F]|
[?:GenderName=Montague][=:Gender:M]|
[?:GenderName=Morris][=:Gender:M]|
[?:GenderName=Muriel][=:Gender:F]|
[?:GenderName=Myra][=:Gender:F]|
[lib.GetGenderError]
>
|
# N
[?:GenderName:substring:1:1=N]

<
[?:GenderName=Nancy][=:Gender:F]|
[?:GenderName=Neil][=:Gender:M]|
[?:GenderName=Nellie][=:Gender:F]|
[?:GenderName=Nora][=:Gender:F]|
[?:GenderName=Norman][=:Gender:M]|
[lib.GetGenderError]
>
|
# O
[?:GenderName:substring:1:1=O]

<
[?:GenderName=Octavia][=:Gender:F]|
[?:GenderName=Olga][=:Gender:F]|
[?:GenderName=Olive][=:Gender:F]|
[?:GenderName=Olivia][=:Gender:F]|
[?:GenderName=Orsie][=:Gender:M]|
[?:GenderName=Oswald][=:Gender:M]|
[lib.GetGenderError]
>
|
# P
[?:GenderName:substring:1:1=P]

<
[?:GenderName=Patricia][=:Gender:F]|
[?:GenderName=Patrick][=:Gender:M]|
[?:GenderName=Paul][=:Gender:M]|
[?:GenderName=Paula][=:Gender:F]|
[?:GenderName=Pauline][=:Gender:F]|
[?:GenderName=Penelope][=:Gender:F]|
[?:GenderName=Percival][=:Gender:M]|
[?:GenderName=Percy][=:Gender:M]|
[?:GenderName=Peter][=:Gender:M]|
[?:GenderName=Phoebe][=:Gender:F]|
[?:GenderName=Phyllis][=:Gender:F]|
[?:GenderName=Piers][=:Gender:M]|
[?:GenderName=Pollie][=:Gender:F]|
[?:GenderName=Polly][=:Gender:F]|
[?:GenderName=Poppy][=:Gender:F]|
[lib.GetGenderError]
>
|
# R
[?:GenderName:substring:1:1=R]

<
[?:GenderName=Rachael][=:Gender:F]|
[?:GenderName=Rachel][=:Gender:F]|
[?:GenderName=Ralph][=:Gender:M]|
[?:GenderName=Ray][=:Gender:M]|
[?:GenderName=Raymond][=:Gender:M]|
[?:GenderName=Rebecca][=:Gender:F]|
[?:GenderName=Reginald][=:Gender:M]|
[?:GenderName=Renee][=:Gender:F]|
[?:GenderName=Reuben][=:Gender:M]|
[?:GenderName=Rex][=:Gender:M]|
[?:GenderName=Richard][=:Gender:M]|
[?:GenderName=Robert][=:Gender:M]|
[?:GenderName=Roland][=:Gender:M]|
[?:GenderName=Ronald][=:Gender:M]|
[?:GenderName=Rosaleen][=:Gender:F]|
[?:GenderName=Rose][=:Gender:F]|
[?:GenderName=Rosanna][=:Gender:F]|
[?:GenderName=Rosalie][=:Gender:F]|
[?:GenderName=Rosetta][=:Gender:F]|
[?:GenderName=Rosina][=:Gender:F]|
[?:GenderName=Roy][=:Gender:M]|
[?:GenderName=Royce][=:Gender:M]|
[?:GenderName=Ruby][=:Gender:F]|
[?:GenderName=Rueben][=:Gender:M]|
[?:GenderName=Ruth][=:Gender:F]|
[lib.GetGenderError]
>
|
# S
[?:GenderName:substring:1:1=S]

<
[?:GenderName=Sally][=:Gender:F]|
[?:GenderName=Samuel][=:Gender:M]|
[?:GenderName=Sandra][=:Gender:F]|
[?:GenderName=Sarah][=:Gender:F]|
[?:GenderName=Selina][=:Gender:F]|
[?:GenderName=Sharon][=:Gender:F]|
[?:GenderName=Sid][=:Gender:M]|
[?:GenderName=Sidney][=:Gender:M]|
[?:GenderName=Sophie][=:Gender:F]|
[?:GenderName=Spencer][=:Gender:M]|
[?:GenderName=Stanley][=:Gender:M]|
[?:GenderName=Stella][=:Gender:F]|
[?:GenderName=Stephen][=:Gender:M]|
[?:GenderName=Steven][=:Gender:M]|
[?:GenderName=Stuart][=:Gender:M]|
[?:GenderName=Susan][=:Gender:F]|
[?:GenderName=Susannah][=:Gender:F]|
[?:GenderName=Suzanne][=:Gender:F]|
[?:GenderName=Sydney][=:Gender:M]|
[?:GenderName=Sylvia][=:Gender:F]|
[lib.GetGenderError]
>
|
# T
[?:GenderName:substring:1:1=T]

<
[?:GenderName=Teddy][=:Gender:M]|
[?:GenderName=Terence][=:Gender:M]|
[?:GenderName=Thomas][=:Gender:M]|
[?:GenderName=Tom][=:Gender:M]|
[lib.GetGenderError]
>
|
# U
[?:GenderName:substring:1:1=U]

<
[?:GenderName=Udell][=:Gender:M]|
[lib.GetGenderError]
>
|
# V
[?:GenderName:substring:1:1=V]

<
[?:GenderName=Vera][=:Gender:F]|
[?:GenderName=Victor][=:Gender:M]|
[?:GenderName=Vincent][=:Gender:M]|
[?:GenderName=Violet][=:Gender:F]|
[lib.GetGenderError]
>
|
# W
[?:GenderName:substring:1:1=W]

<
[?:GenderName=Walter][=:Gender:M]|
[?:GenderName=Wendy][=:Gender:F]|
[?:GenderName=William][=:Gender:M]|
[?:GenderName=Willis][=:Gender:M]|
[?:GenderName=Winifred][=:Gender:F]|
[lib.GetGenderError]
>
|
# Z
[?:GenderName:substring:1:1=Z]

<
[?:GenderName=Zandra][=:Gender:F]|
[lib.GetGenderError]
>
|
# Error
[lib.GetGenderError]
>

<[?:Gender][==:var.zGender:[Gender]]>

# [=:End:GetGender]

GetGenderError

#{target=ancestral sources}

# Change history   Reason for change
# --------------   --------------------------------------------------------------------
# 04/03/2024       Set Get Gender error message.

# Usage: [lib.GetGenderError]

# Error
[lib.ErrorMessage:Set up name in GetGender:GenderName]


GetMedia

[=:Start:GetMedia]

# Author: Alan
# Description: 

# Change History     Reason for change
# --------------     --------------------------------------------------------------------
# 12/08/2023         Initial Creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.

# Usage: [lib.GetMedia]
# ...Births, Deaths, Marriages, Census, Newspaper, Other, Photos

# Parameters: none
# Input variables
#    [zMediaSource] - media filename including the full Windows folder path
#    [zFHFolder] - folder where media will be stored in Family Historian (FH)

{slow}

# Add media to Source Record --> Insert from File
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder and filename where media is opened from.
{1000}
[var.zMediaSource]
{1000}
{Enter}


# Add to FH folder
[var.zFactFolder]
{Enter}

# This tab is needed to allow the use of other control keys!!!
{Tab}

[=:End:GetMedia]

GetNewspaperEvent

#[=:Start:GetNewspaperEvent]

#
# Author : Alan
#
# Description: List of Newspaper Events
#
# Usage: [lib.GetNewspaperEvent]
#
# Change History      Reason for change
# ----------------    ----------------------------------------------------------------------------
# 13/06/2024 BETA7_8  Initial creation.
# 20/07/2024 BETA9_1  New event type "Tribute".
# 24/07/2024 BETA9_1  New event type "Shipwreck".

<
[?:Event:substring:1:8!=***Enter]

[=:zNewsEvent:[Event:split:,:1]]

<
#A

#B
[?:Event=Birth][==:var.zNewsEventParts:1]|
[?:Event=B][==:Event:Birth][==:var.zNewsEventParts:1]|
[?:Event=Burial][==:var.zNewsEventParts:1]|	
[?:Event=U][==:Event:Burial][==:var.zNewsEventParts:1]|	

#C
[?:Event=Compensation][==:var.zNewsEventParts:1]|
[?:Event=Court Case][==:var.zNewsEventParts:1]|
[?:Event=Crime][==:var.zNewsEventParts:1]|
 	
#D
[?:Event=Death][==:var.zNewsEventParts:1]|	
[?:Event=D][==:Event:Death][==:var.zNewsEventParts:1]|	
[?:Event=Diamond Wedding Anniversary][==:var.zNewsEventParts:2]|
[?:Event=DWA][==:Event:Diamond Wedding Anniversary][==:var.zNewsEventParts:2]|

#E
[?:Event=Educational Achievement][==:var.zNewsEventParts:2]|
[?:Event=Engagement][==:var.zNewsEventParts:2]|

#F
[?:Event=Funeral][==:var.zNewsEventParts:1]|

#G
[?:Event=Golden Wedding Anniversary][==:var.zNewsEventParts:2]|
[?:Event=GWA][==:Event:Golden Wedding Anniversary][==:var.zNewsEventParts:2]|

#H

#I
[?:Event=Inquest][==:var.zNewsEventParts:1]|

#J

#K

#L

#M
[?:Event=Marriage][==:var.zNewsEventParts:2]|
[?:Event=M][==:Event:Marriage][==:var.zNewsEventParts:2]|	

#N

#O

#P

#Q

#R
 	
#S
[?:Event=Shipwreck][==:var.zNewsEventParts:2]|
[?:Event=Silver Wedding Anniversary][==:var.zNewsEventParts:2]|
[?:Event=SWA][==:Event:Silver Wedding Anniversary][==:var.zNewsEventParts:2]|

#T
[?:Event=Tribute][==:var.zNewsEventParts:2]|

#U

#V
	
#W
	
#Y

[lib.ErrorMessage:GETNEWSPAPEREVENT - Unknown event]

>

>
 	
#[=:End:GetNewspaperEvent]

GetNewsType

#[=:Start:GetNewsType]

#
# Author : Alan
#
# Description: List of Newspaper Item Types
#
# Usage: [lib.GetNewsType]
# Called by: [lib.InitVars_GENERIC]
#
# Change History      Reason for change
# ----------------    ----------------------------------------------------------------------------
# 13/06/2024 BETA6_8  Initial creation.

<
[?:News Item Type:length=1]
[=:nit:[News Item Type]]

<
[?:nit=A][==:var.zNewsItemType:Announcement]|
[?:nit=N][==:var.zNewsItemType:News Item]|
[?:nit=O][==:var.zNewsItemType:Obituary]|
[?:nit=R][==:var.zNewsItemType:Report]|
[?:nit=V][==:var.zNewsItemType:Advertisement]|
[lib.ErrorMessage:GetNewsType - Invalid News Item Type]
>

|
[?:News Item Type/(Advertisement|Announcement|News Item|Obituary|Report)/]
[==:var.zNewsItemType:[News Item Type]]
|
[lib.ErrorMessage:GetNewsType - Invalid News Item Type]
[==:var.zNewsItemType:[News Item Type]]
>

[==:News Item Type:[var.zNewsItemType]]
 	
#[=:End:GetNewsType]

GetRecordType_FMP

# Author: Alan based on idea from Graham
# Description: It is very hard to recognise an automatic way of determining a record / source 
# type within Findmypast so this is an attempt to use the field [Record Set] as extracted into 
# the ORA Panel.
# NB. This should only be called if not able to establish the record type easily.
#     Reason for this is that ORA would have to read all the characters in a record
#     set name and if there are many recod sets to check then this may take a lot of
#     time. Need to suck it and see.

# Usage: [lib.GetRecordType]
# Called by: [lib.SetRecordType_FMP]

# Change Date   Change History
# -----------   ---------------------------------------------------
# 26 Jan 2024   Initial creation

# Each line has a conditional check of record set and line must end with a "|" (pipe).
<

#-------------------------------------------------------------------------Baptism
<[?:Subcategory/Baptisms/]
<[?:Baptism Date>0][==:Var.zRecordType:Baptism]>>|

#-------------------------------------------------------------------------Burial
[?:Record ID/Burial/]
[==:var.zRecordType:Burial][==:var.zFact:Burial]|


#-------------------------------------------------------------------------Census
<[?:Record ID:substring:1:9=GBC/1841/]
[==:var.zRecordType:1841 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1851/]
[==:var.zRecordType:1851 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1861/]
[==:var.zRecordType:1861 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1871/]
[==:var.zRecordType:1871 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1881/]
[==:var.zRecordType:1881 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1991/]
[==:var.zRecordType:1891 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1901/]
[==:var.zRecordType:1901 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1911/]
[==:var.zRecordType:1911 Census][==:var.zFact:Census]>|

<[?:Record ID:substring:1:9=GBC/1921/]
[==:var.zRecordType:1921 Census][==:var.zFact:Census]>|


#-------------------------------------------------------------------------Marriage
[?:Record ID:substring:1:7=GBPRS/M]
[==:var.zRecordType:Marriage][==:var.zFact:Marriage]|



#-------------------------------------------------------------------------Register
<[?:Record ID:substring:1:8=TNA/R39/]
[==:var.zRecordType:1939 Register][==:var.zFact:Census]>|


#-------------------------------------------------------------------------SCI Birth
[?:Record ID:substring:1:5=BMD/B]
[==:var.zRecordType:SCI Birth][==:var.zFact:Birth]|

#-------------------------------------------------------------------------SCI Death
[?:Record ID:substring:1:5=BMD/D]
[==:var.zRecordType:SCI Death][==:var.zFact:Death]|

#-------------------------------------------------------------------------SCI Marriage
[?:Record ID:substring:1:5=BMD/M]
[==:var.zRecordType:SCI Marriage][==:var.zFact:Marriage]|







# A

# E
[?:Record Set=England, Newspaper Death Notices][==:var.zRecordType:Newspaper Death]|
[?:Record Set=England & Wales Deaths 1837-2007][==:var.zRecordType:SCI Death]|
[?:Record Set=England & Wales Government Probate Death Index 1858-2019][==:var.zRecordType:Probate]|
#[?:Record Set=England Births & Baptisms 1538-1975][==:var.zRecordType:Baptism]|
[?:Record Set=England Marriages 1538-1973][==:var.zRecordType:Marreage]|

# H
[?:Record Set=Hampshire, Portsmouth Burials][==:var.zRecordType:Burial]|

# M
[?:Record Set=Middlesex Monumental Inscriptions][==:var.zRecordType:MMI]|




[=:GetRecordType_FMP - No valid Record Type (see Record Set) - Click CANCEL]
>

[var.zRecordType]

GRO


#
# Author: Alan
# Description: GRO Database of Births and Deaths only
#
# Usage: [lib.GRO:Fact]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 20/03/2023 07:45   First attempt - add citation only
# 01/04/2023 13:40   Fixed issue of Repository type filed not being selected#        
# 19/05/2023 10:30   Fixed folderpath issue.
#                    Introduced new SetWindowsUser library to make folder path flexible.
#                    Introduced new SetResearchPlace library so not continually prompter.
# 14/09/2023 15:15   Introduced [lib.SetRepository] for flexibilty.
#                    Introduced [lib.SetAssessment:P]
#                    [lib.Add_FH_Citation:GRO Birth]
# 30/09/2023         Added [District]
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#                    Consolidation of [lib.Amend_GRO_Birth] and [lib.Amend_GRO_Death]
# 02/02/2023         Converted variables fields from var.z_ to var.z
#                    Changed var.zSourceType to var.zRecordType.
#                    Added {Tab} after [lib.SetResearchPlace].
#                    Added {Tab} after [lib.SetRepository].
#                    Commented out duplicate call of [lib.Get_GRO_DistrictCounty].
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
# 07/04/2024         New fields and re-arranged fields. District Code replaced by Reg Dist No.

[==:var.Debug:1]

[=:Parameter1:{1}]

# ============================== ADD FACT==============================================

<
[?:Parameter1=Fact]

# Add fact.
{Ctrl+I}[var.zFactType]{ENTER}{TAB}

#Execute code speed
{SLOW}

# Get Civil Registration Quarter and Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]{TAB}

# Age at Death
<[var.zAgeAtDeath]>
{TAB}


# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFactType=Death]{TAB*3}|{TAB*2}>


# Add reference to Notes field and tab across to Source box
[lib.SetGRORefNote]
{TAB}

>



# ============================== ADD CITATION==================================

#Execute code at this speed
{SLOW}

# Starting point is the birth fact in the Facts tab in the Property box.
<
[?:var.zRecordType=GRO Birth][lib.Add_FH_Citation:GRO Birth]
|
[?:var.zRecordType=GRO Death][lib.Add_FH_Citation:GRO Death]
>

#Execute code at this speed
{FAST}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

<
# Mother's maiden name
[?:var.zRecordType=GRO Birth][var.zMothersMaidenName]
|
# Age at Death - this coud be an age but in later documents it was a birth date - dd mmm yyyy
[?:var.zRecordType=GRO Death][var.zAgeAtDeath]
>
{TAB}

# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Quarter
[var.zCivilRegQtr]{TAB}

# Registration Month (this occurs from 1984 when Civil Registration online)
<[var.zCivilRegMonth]>{TAB}

# Registration District 
[var.zCivilRegDistrict]{TAB}

# Registration District Number (this occurs from 1984 when Civil Registration online)
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
[var.zVolume]{TAB}

# Page
[var.zPage]{TAB}

# Register Number
[var.zCivilRegisterNumber]{TAB}

# Entry Number
[var.zCivilRegEntryNumber]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

#District Code
##07/04/2024 [var.zCivilRegDistrictCode]
{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactType]s
{ENTER}


<[?:var.Debug=0]
## DO NOTHING
>

Household Members

# Usage: [lib.Household Members]

# Example website link - https://www.ancestry.co.uk/discoveryui-content/view/14207750:7619

# Input ORA field - Household Members
# Porter H Aylmore, Caroline Aylmore, 41, Wife, William T Aylmore, 11, Son, Porter Aylmore, 10, Son, Frederick Aylmore, 8, Son, Letitia A Aylmore, 7, Daughter, Willis Aylmore, 2, Son, Alfred Aylmore, 3/12, Boarder

# Output ORA field - 
# Family Size=8
# 
# Porter H Aylmore, , 37
# Caroline Aylmore, Wife, 41
# William T Aylmore, Son, 11
# Porter Aylmore, Son, 10
# Frederick Aylmore, Son, 8
# Letitia A Aylmore, Daughter, 7
# Willis Aylmore, Son, 2
# Alfred Aylmore, Boarder, 3/12




# Note
# Count the entries in the household members list made up...
# Current person and the following 3 fields for each person
# Name, age, relationship
# NB. The sublect of the website only shows the name. In this example Prter H Aylmore by himself.

[=:SplitCount:[Household Members:splitCount:,]]

# Calculate number of people in family
[=:FamilySize:[SplitCount:mathDivide:3:mathAdd:1:mathFloor]]

Family Size=[FamilySize]\<BR\>\<BR\>

#1
[Name], [Relation], [Age]\<BR\>

#2
<[?:FamilySize>1][Household Members:split:,:2], [Household Members:split:,:4], [Household Members:split:,:3]\<BR\>>
#|
#3
<[?:FamilySize>2][Household Members:split:,:5], [Household Members:split:,:7], [Household Members:split:,:6]\<BR\>>
#|
#4
<[?:FamilySize>2][Household Members:split:,:8], [Household Members:split:,:10], [Household Members:split:,:9]\<BR\>>
#|
#5
<[?:FamilySize>3][Household Members:split:,:11], [Household Members:split:,:13], [Household Members:split:,:12]\<BR\>>
#|
#6
<[?:FamilySize>4][Household Members:split:,:14], [Household Members:split:,:16], [Household Members:split:,:15]\<BR\>>
#|
#7
<[?:FamilySize>5][Household Members:split:,:17], [Household Members:split:,:19], [Household Members:split:,:18]\<BR\>>
#|
#8
<[?:FamilySize>6][Household Members:split:,:20], [Household Members:split:,:22], [Household Members:split:,:21]\<BR\>>
#|
#9
<[?:FamilySize>7][Household Members:split:,:23], [Household Members:split:,:25], [Household Members:split:,:24]\<BR\>>
\<BR\>

InitVars


# Usage: [lib.InitVars]

# Change History       Reason for change
# --------------       -----------------------------------------------------------------------
# 02/022024            Enabled [lib.InitVars_GRO] to run.
# 04/03/2024           New field [var.zErrorMessageCount] initialised.
# 12/05/2024 BETA4     Changed position of error message clearance.
# 16/05/2024 BETA4     Created Service Name check for Find a Grave.
# 01/07/2024 BETA8     Initial creation - *new* Service.

[==:var.debug:1]


# Clear error message
[==:var.zErrorMessage:]
[==:var.zErrorMessageCount:]


# Get Windows User and Project and Folderpath
[lib.SetWindowsUser]

<
# Get record type and set fact type and record type folder.
[lib.SetRecordType]

#------------------------------------------------------------Ancestry
<[?:Page.ServiceName=Ancestry]
[lib.InitVars_ANC]
|
#------------------------------------------------------------Familysearch
[?:Page.ServiceName=Familysearch]
[lib.InitVars_FS]
|
#------------------------------------------------------------Find a Grave
[?:Page.ServiceName=Find a Grave]
[lib.InitVars_FAG]
|
#------------------------------------------------------------Findmypast
[?:Page.ServiceName=Findmypast]
[lib.InitVars_FMP]
|
#------------------------------------------------------------GRO UK
[?:Page.ServiceName=GRO UK]
[lib.InitVars_GRO]
|
#------------------------------------------------------------Generic
[?:Page.ServiceName/^Generic/]
[lib.InitVars_GENERIC]
|
#------------------------------------------------------------Newspapers.Com
[?:Page.ServiceName/^Newspaper/]
[lib.InitVars_Newspapers]
|
#------------------------------------------------------------Trove
[?:Page.ServiceName=Trove]
[lib.InitVars_Trove]
|
#------------------------------------------------------------ERROR
[lib.ErrorMessage:InitVars - No valid service name]
>

[?:var.Debug=0]
## Do nothing
>

InitVars_ANC

# Description: Based on source/record type set up common variables that are shared between other
#              services such as Findmypast, FamilySearch, etc. There will be variables that are common
#              to all record types and then there are fields that are specific to the record type.

# Usage: [lib.InitVars_ANC]

# Change History       Reason for change
# --------------       ---------------------------------------------------------------------------
# 01/02/2024           Set up specific burial variables and correct other common variables that were not
#                      set up correctly.
# 02/02/2024           Added transform "dateYear" to [Registration Date:dateYear]
#                      Changed [var.DeathAge] to [var.zDeathAge].
# 07/02/2024           Check to spouse entered in Other Records.
# 24/02/2024           Added new record type "Services".
# 26/02/2024           For SCI Marriage an additional field to be checked - [Registration Date].
# 01/03/2024           Fixed media name - Replaced [zMothersMaidenName] with [var.zMothersMaidenName].
# 01/03/2024           Added transform "dateYear" to [Registration Date].
# 04/03/2024           Added [Mother] as an alternative maiden name in SCI Birth.
# 06/05/2024           Added record Burial BT
# 06/05/2024           Set [var.zRegisterType].
# 16/05/2024           Added validation to [Place] and used it for [var.zBurialPlace]
# 05/06/2024 BETA6     Added record type "Marriage BT".
# 10/06/2024 BETA7_3   Added record type "School Admission".
# 10/06/2024 BETA6_9   Added record type "Workhouse Admission".
# 22/06/2024 BETA7     Added record type "DNA Match".
# 11/07/2024 BETA8_2   Added [lib.ValidatePlace] to place fields in record type "Marriage"
# 12/07/2024 BETA8_4   Added record type "Marriage Banns".
# 13/07/2024 BETA8_6   Update setting of [var.zRegisterType].
# 13/07/2024 BETA8_5   Added record type "US Federal Census".
# 25/07/2024 BETA8_5   Added record type "Canada Federal Census".

# Based on Record Type set up variables

#----------------------------------------------------------------------------General
[==:var.zSurname:[Name:nameSurname]]
[==:var.zGivenName:[Name:nameGiven]]
[==:var.zFullname:[var.zGivenName:append: :append:[var.zSurname]]]
<
[?:Source.Reference][==:var.zArchiveReference:[Source.Reference:uppercase:replace: ::]]
|
[?:Source.Reference Number][==:var.zArchiveReference:[Source.Reference Number:uppercase:replace: ::]]
|
[?:Reference Number][==:var.zArchiveReference:[Reference Number:uppercase:replace: ::]]
>
<
[==:var.zArchive:[Source.Part1]]
>
<
[?:Register Type]
<
[?:Register Type/^Bishop/][==:var.zRegisterType:BT]
>
|
[?:Source.Part3/Parish/][==:var.zRegisterType:PR]
>

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollection:[Collection Name]]
[==:var.zRecordID:[Record ID]]

[==:var.zFactType:[var.zFact]]


# Start of record type checks
<
#----------------------------------------------------------------------------1939 Register
[?:var.zRecordType=1939 Register]
[==:var.zFactType:Census]
[==:var.zFactYear:1939]
[==:var.zCensusYear:1939]
[==:var.zRegistration district:[Registration district]]
[==:var.zEnumeration district:[Enumeration District:uppercase]]
[==:var.zSchedule:[Schedule]]
[==:var.zFullAddress:[Full Address]]


|

#----------------------------------------------------------------------------Birth
[?:var.zRecordType=Birth]

|
#----------------------------------------------------------------------------Baptism
[?:var.zRecordType=Baptism]
[==:var.zFactYear:[Baptism Date:dateYear]]
[==:var.zBaptismYear:[Baptism Date:dateYear]]
<
[?:Baptism Place][==:var.zBaptismPlace:[Baptism Place]]
|
[?:Parish][==:var.zBaptismPlace:[Parish]]
>
<[?:Abode]
<
[?:Abode!=nk]
[lib.ValidatePlace:Abode]
[==:var.zResidence:[Abode]]
|
[==:var.zResidence:]
>
>
[==:var.zOccupation:[Occupation]]

# ..Else2
|
#----------------------------------------------------------------------------Baptism BT
# Baptism BT
[?:var.zRecordType=Baptism BT]
[==:var.zFactYear:[Baptism Date:dateYear]]
[==:var.zBaptismYear:[Baptism Date:dateYear]]
<
[?:Baptism Place][==:var.zBaptismPlace:[Baptism Place]]
|
[?:Parish][==:var.zBaptismPlace:[Parish]]
>
<
[?:Abode]
[lib.ValidatePlace:Abode]
[==:var.zResidence:[Abode]]
>
[==:var.zOccupation:[Occupation]]

# ..Else2
|
#----------------------------------------------------------------------------Baptism NC
# Baptism Non-Conformist
[?:var.zRecordType=Baptism NC]
[==:var.zFactYear:[Baptism Date:dateYear]]
[==:var.zBaptismYear:[Baptism Date:dateYear]]
<
[?:Baptism Place][==:var.zBaptismPlace:[Baptism Place]]
|
[?:Parish][==:var.zBaptismPlace:[Parish]]
>

[==:var.zOccupation:[Occupation]]

# ..Else2
|
#----------------------------------------------------------------------------Baptism RC
# Baptism Roman Catholic
[?:var.zRecordType=Baptism RC]
[==:var.zFactYear:[Baptism Date:dateYear]]
[==:var.zBaptismYear:[Baptism Date:dateYear]]
<
[?:Baptism Place][==:var.zBaptismPlace:[Baptism Place]]
|
[?:Parish][==:var.zBaptismPlace:[Parish]]
>
<
[?:Abode][==:var.zResidence:[Abode]]
|
[?:Residence][==:var.zResidence:[Residence]]
>
[==:var.zOccupation:[Occupation]]

# ..Else2
|
#----------------------------------------------------------------------------Burial
# Burial
[?:var.zRecordType=Burial]
<
[?:Burial Year][==:var.zBurialYear:[Burial Year]]
|
[?:Burial Date][==:var.zBurialYear:[Burial Date:dateYear]]
>

[==:var.zFactYear:[var.zBurialYear]]
[==:var.zBurialDate:[Burial Date]]
[==:var.zDeathDate:[Death Date]]

<[?:Death Age][==:var.zDeathAge:[Death Age]]>

<
[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]
|
[?:Abode][lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]
>

<
[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]
|
[?:Place][lib.ValidatePlace:Place][==:var.zBurialPlace:[Place]]
>

<[?:Source.Reference Number][==:var.zRefID:[Source.Reference Number:uppercase]]>
[==:var.OtherInfo:]

<[?:Source.Part1][==var.zRecordOffice:[Source.Part1]]>

<[?:Page=nk][==:var.zPage:]|[==:var.zPage:[Page]]>

<[?:Entry No=nk][==:var.zEntryNo:]|[==:var.zEntryNo:[Entry No]]>

# ..Else2
|
#----------------------------------------------------------------------------Burial BT
# Burial Bishops Transcript
[?:var.zRecordType=Burial BT]
<
[?:Burial Year][==:var.zBurialYear:[Burial Year]]
|
[?:Burial Date][==:var.zBurialYear:[Burial Date:dateYear]]
>

[==:var.zFactYear:[var.zBurialYear]]
[==:var.zBurialDate:[Burial Date]]
[==:var.zDeathDate:[Death Date]]

<[?:Death Age][==:var.zDeathAge:[Death Age]]>

<
[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]
|
[?:Abode][lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]
>

<[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]>

<[?:Source.Reference Number][==:var.zRefID:[Source.Reference Number:uppercase]]>
[==:var.OtherInfo:]

<[?:Source.Part1][==var.zRecordOffice:[Source.Part1]]>

<[?:Page=nk][==:var.zPage:]|[==:var.zPage:[Page]]>

<[?:Entry No=nk][==:var.zEntryNo:]|[==:var.zEntryNo:[Entry No]]>

# ..Else2
|
#---------------------------------------------------------------------------------------
# Burial Non-Conformist
[?:var.zRecordType=Burial NC]

[==:var.zBurialYear:[Burial Date:dateYear]]
[==:var.zFactYear:[var.zBurialYear]]


<
[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]
|
[?:Abode][lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]
>

<
[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]
|
[?:Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Place]]
>

[==:var.DeathAge:[Death Age]]

|
#----------------------------------------------------------------------------Canada Federal Census
[?:var.zRecordType=Canada Federal Census]
[==:var.zFactYear:[Source.Year]]
[==:var.zCensusYear:[Source.Year]]



[==:var.zCollection:[Source.Title]]

[==:var.zFullAddress:[Full Address]]

# Validate Province
<
[?:Province:length=2]
[=:ProvinceName:[Province:full:ca_provinces]]
<
[?:ProvinceName]
[==:Province:[ProvinceName]]
|
[lib.ErrorMessage:Invalid province]
>
|
[=:ProvinceAbbr:[Province:abbr:ca_provinces]]
<
[?:ProvinceAbbr]
|
[lib.ErrorMessage:Invalid province]
>
>

<
[?:HoH ID][lib.ValidateInputField:HoH ID][=:var.zID:[HoH ID]]
|
[lib.ValidateInputField:Individual ID][=:var.zID:[Individual ID]]
>

|
#----------------------------------------------------------------------------Census
[?:var.zRecordType=Census]
[==:var.zFactYear:[Source.Year]]
[==:var.zCensusYear:[Source.Year]]


<[?:var.zCensusYear=1911][==:var.zCensusClass:RG14]
|[==:var.zCensusClass:[Source.Class:uppercase:replace: ::]]>

[==:var.zPiece:[Piece]]
<[?:var.zFactYear=1841][==:var.zBook:[Book]]|[==:var.zBook:]>

[==:var.zFolio:[Folio]]

<[?:Page][==:var.zPage:[Page]]
|[?:Page number][==:var.zPage:[Page number]]
|[?:Source.Page][==:var.zPage:[Source.Page]]>

<[?:Household schedule number][==:var.zSchedule:[Household schedule number]]
|[?:Schedule][==:var.zSchedule:[Schedule]]>

<[?:Registration district number][==:var.zRegistration district:[Registration district number:append: :append:[Registration district]]]
|[?:Registration district][==:var.zRegistration district:[Registration district]]>

<[?:Sub district number][==:var.zSub district:[Sub district number:append: :append:[Sub-registration district]]]
|[?:Sub-registration district][==:var.zSub district:[Sub-registration district]]
|[?:Sub registration district][==:var.zSub district:[Sub registration district]]
|[?:Sub district][==:var.zSub district:[Sub district]]>



<[?:ED, institution, or vessel][==:var.zEnumeration district:[ED, institution, or vessel]]
|[?:ED, Institution or Vessel][==:var.zEnumeration district:[ED, institution or vessel]]
|[?:Source.Enumeration District][==:var.zEnumeration district:[Source.Enumeration District]]>


<
[?:Full Address][==:var.zFullAddress:[Full Address]]
|
[==:var.zFullAddress:[*****<, [Town]><, [County Island]><, [Country]>]]]
>

[==:var.zParish:[Ecclesiastical parish]]

[==:var.zCollection:[Source.Title]]

<
[?:HoH ID][lib.ValidateInputField:HoH ID][=:var.zID:[HoH ID]]
|
[lib.ValidateInputField:Individual ID][=:var.zID:[Individual ID]]
>


|
#----------------------------------------------------------------------------Death
[?:var.zRecordType=Death]

|
#----------------------------------------------------------------------------DNA Match
[?:var.zRecordType=DNA Match]


|
#----------------------------------------------------------------------------Electoral Register
[?:var.zRecordType=Electoral Register]
<
[?:Residence Date]
[==:var.zFactYear:[Residence Date:dateYear]]
[==:var.zResidenceYear:[Residence Date:dateYear]]
|
[?:Residence Year]
[==:var.zFactYear:[Residence Year:dateYear]]
[==:var.zResidenceYear:[Residence Year:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zResidenceYear:[Year:dateYear]]
|
[?:Electoral Date]
[==:var.zFactYear:[Electoral Date:dateYear]]
[==:var.zResidenceYear:[Electoral Date:dateYear]]
>

<
[?:Full Address][==:var.zFullAddress:[Full Address]]
[lib.ValidatePlace:Full Address]
|
[?:Residence Place][==:var.zFullAddress:[Residence Place]]
[lib.ValidatePlace:Residence Place]
|
[?:Residence Street Address][==:var.zFullAddress:[Residence Street Address]]
[lib.ValidatePlace:Residence Street Address]
|
[?:Street Address][==:var.zFullAddress:[Street Address]]
[lib.ValidatePlace:Street Address]
>

|
#----------------------------------------------------------------------------Marriage
[?:var.zRecordType=Marriage]
[==:var.zFactType:Marriage]
<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
>

[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
<
[?:Spouse]
[==:var.zSpouseGiven:[Spouse:nameGiven]]
[==:var.zSpouseSurname:[Spouse:nameSurname]]
|
[?:Spouse's Name]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
>

<[?:Marriage Place][lib.ValidatePlace:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
|[?:Parish][lib.ValidatePlace:Parish][==:var.zMarriagePlace:[Parish]]
|[?:Place][lib.ValidatePlace:Place][==:var.zMarriagePlace:[Place]]>

<[?:Individual Residence][lib.ValidatePlace:Individual Residence]>
<[?:Spouse Residence][lib.ValidatePlace:Spouse Residence]>



|
#----------------------------------------------------------------------------Marriage Banns
[?:var.zRecordType=Marriage Banns]
[==:var.zFactType:Marriage Banns]
<
[?:Marriage Banns Date][==:var.zFactDate:[Marriage Banns Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
>
[==:var.zEventDate:[var.zFactDate]]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageBannsYear:[var.zFactDate:dateYear]]
<
[?:Spouse]
[==:var.zSpouseGiven:[Spouse:nameGiven]]
[==:var.zSpouseSurname:[Spouse:nameSurname]]
|
[?:Spouse's Name]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
>
<
[?:var.zSpouseSurname]
[==:var.zSpouseFullname:[var.zSpouseGiven:append: :append:[var.zSpouseSurname]]]
>

<[?:Location][lib.ValidatePlace:Location][==:var.zMarriagePlace:[Marriage Place]]
|[?:Parish][lib.ValidatePlace:Parish][==:var.zMarriagePlace:[Parish]]
|[?:Place][lib.ValidatePlace:Place][==:var.zMarriagePlace:[Place]]>

<[?:Individual Residence][lib.ValidatePlace:Individual Residence]>
<[?:Spouse Residence][lib.ValidatePlace:Spouse Residence]>

<
[?:Marriage Banns Place][lib.ValidatePlace:Marriage Banns Place][==:var.zLocation:[Marriage Banns Place]]>

# Records Office
<
[?:Source.Part1]
[==:var.zRecordsOffice:[Source.Part1]]
>



|
#----------------------------------------------------------------------------Marriage BT
[?:var.zRecordType=Marriage BT]
[==:var.zFactType:Marriage]
<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
>

[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
<
[?:Spouse]
[==:var.zSpouseGiven:[Spouse:nameGiven]]
[==:var.zSpouseSurname:[Spouse:nameSurname]]
|
[?:Spouse's Name]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
>

<[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
|[?:Parish][==:var.zMarriagePlace:[Parish]]
|[?:Place][==:var.zMarriagePlace:[Place]]>

|
#----------------------------------------------------------------------------Newspaper
# Newspaper Item
[?:var.zRecordType=Newspaper]
# General

[lib.GetNewspaperEvent]

# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
# If event type <> Marriage then check for "&" in case event is an anniversary then 
#                               name will appear as George Marsden Bayley & Anna Mary Woollam

[=:var.zParts:[Name:splitcount: & ]]

<
[?:var.zParts>2][lib.ErrorMessage:InitVars_Gen - More than 2 names]
|
[?:var.zParts>1]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

>

<
[?:Name]
[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]
|
[==:var.zGivenName:[First name(s)]]
[==:var.zSurname:[Last name]]
>

<
[?:Record Set/Birth/][==:var.zEventType:Birth]
|
[?:Record Set/Death/][==:var.zEventType:Death]
|
[?:Record Set/Marriage/][==:var.zEventType:Marriage]
|
[?:Event][==:var.zEventType:[Event]]
>

[==:var.zEvent:[var.zEventType]]


[lib.GetNewsType]

<
[?:Event Date]
[==:var.zFactYear:[Event Date:dateYear]]
[==:var.zEventDate:[Event Date]]
|
[==:var.zFactYear:[^var.zEventType:append: Date]]
[==:var.zFactYear:[var.zFactYear:dateYear]]
>

<
[?:Newspaper Title]
[==:var.zNewspaper:[Newspaper Title]]
|
[==:var.zNewspaper:[Publication title:append: (FMP)]]
>

<
[?:Source.Publication Date][==:var.zPublicationDate:[Source.Publication Date]]
>

|
#----------------------------------------------------------------------------Probate
[?:var.zRecordType=Probate]
# Probate
# Probates can be issued by England /Wales and Scotland.
# Scotland calls their probate date as confirmation date
# Only 1 example of this found so far is death & probate in 1933 forf Percy Foulkes Hodgson
<
[?:Probate Text][lib.ValidateInputField:Probate Text]
>

<
[?:Probate Date]
[==:var.zFactYear:[Probate Date:dateYear]]
[==:var.zProbateYear:[Probate Date:dateYear]]
[==:var.zProbateDate:[Probate Date]]
|
[?:Confirmation Date]
[==:var.zFactYear:[Confirmation Date:dateYear]]
[==:var.zProbateYear:[Confirmation Date:dateYear]]
[==:var.zProbateDate:[Confirmation Date]]
>

<
[?:Death Date]
[==:var.zDeathYear:[Death date:dateYear]]
[==:var.zDeathDate:[Death date]]
|
[==:var.zDeathYear:[Deathdate:dateYear]]
[==:var.zDeathDate:[Deathdate]]
>
<
[?:Death Place]
[==:var.zDeathPlace:[Death Place]]
|
[?:DeathPlace]
[==:var.zDeathPlace:[DeathPlace]]
>

<
[?:Residence place at death][==:var.zResidencePlace:[Residence place at death]]
|
[?:Residence Place][==:var.zResidencePlace:[Residence Place]]
>

<
[?:Probate Registry]
[=:zRegistry:[Probate Registry]]
|
[?:Confirmation Place][=:zRegistry:[Confirmation Place]]
|
[=:zRegistry:[Registry]]
>

[lib.Get_Registry]



|
#----------------------------------------------------------------------------School Admission
[?:var.zRecordType=School Admission]
[==:var.zFactType:Education]
[==:var.zFactYear:[Admission Date:dateYear]]
[==:var.zAdmissionDate:[Admission Date]]
[==:var.zSchool:[School]]
[lib.ValidateInputField:School Location]
[lib.ValidatePlace:School Location]
[==:var.zSchoolLocation:[School Location]]
[lib.ValidateInputField:Residence]
[lib.ValidatePlace:Residence]
[==:var.zResidence:[Residence]]
[lib.ValidateInputField:Admission No]
[==:var.zAdmissionNo:[Admission No]]
<[==:var.zBirthDate:[Birth Date]]>
<
[?:Father]
[==:var.zParentGuardian:[Father]]
>


|
#----------------------------------------------------------------------------SCI Birth
[?:var.zRecordType=SCI Birth]

[==:var.zFactType:SCI Birth]
[==:var.zFactYear:[Registration Date:dateYear]]
[==:var.zRegYear:[var.zFactYear]]

[==:var.zCollectionID:[Record Id:split:\::1]]
[==:var.zCollectionName:[Source.Title]]
[==:var.zRecordNo:[Record Id:split:\::3]]

<
[?:Mother's Maiden Name][==:var.zMothersMaidenName:[Mother's Maiden Name]]
|
[?:Mother][==:var.zMothersMaidenName:[Mother]]
>

[==:var.zNameSuffix:[var.zMothersMaidenName:uppercase:prepend: - mother ]]

[lib.GetCivilReg:Birth]

|
#----------------------------------------------------------------------------SCI Death
[?:var.zRecordType=SCI Death]

[==:var.zFactType:SCI Death]
[==:var.zFactYear:[Registration Date:dateYear]]
[==:var.zRegYear:[var.zFactYear]]

[==:var.zCollectionID:[Record Id:split:\::1]]
[==:var.zCollectionName:[Source.Title]]
[==:var.zRecordNo:[Record Id:split:\::3]]

<[==:var.zMother:[Mother's Maiden Name]]>

<
[?:Age][==:var.zAgeAtDeath:[Age]]
|
[?:Death Age][==:var.zAgeAtDeath:[Death Age]]
>

[lib.GetCivilReg:Death]

|
#----------------------------------------------------------------------------SCI Marriage
[?:var.zRecordType=SCI Marriage]

[==:var.zFactType:Marriage]
<
[?:Registration Year]
[==:var.zFactYear:[Registration Year:dateYear]]
[==:var.zRegYear:[var.zFactYear]]
|
[?:Registration Date]
[==:var.zFactYear:[Registration Date:dateYear]]
[==:var.zRegYear:[var.zFactYear]]
>

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]



<
[?:Other Records]
<[?:Other Records:splitCount:,!=1][lib.ErrorMessage:ERROR - Other Records has not been updated]
|
[==:var.zSpouseGiven:[Other Records:nameGiven]]
[==:var.zSpouseSurname:[Other Records:nameSurname]]
[==:Principal2 Name:[Other Records:nameGiven]]
>
|
[?:Spouse]
[==:var.zSpouseGiven:[Spouse:nameGiven]]
[==:var.zSpouseSurname:[Spouse:nameSurname]]
[==:Principal2 Name:[Spouse:nameGiven]]

|
[lib.ErrorMessage:InitVars_ANC ERROR - No valid spouse]
>


[lib.GetCivilReg:Marriage]

|
#----------------------------------------------------------------------------Services
[?:var.zRecordType=Services]
[lib.Services_ANC]



|
#----------------------------------------------------------------------------TRX Death
[?:var.zRecordType=TRX Death]

[==:var.zFactType:TRX Death]
[==:var.zFactYear:[Death Date:dateYear]]
[==:var.zRegYear:[var.zFactYear]]

<[?:Birth Date][==:var.zBirthDate:[Birth Date]]>

<
[?:Age][==:var.zAgeAtDeath:[Age]]
|
[?:Death Age][==:var.zAgeAtDeath:[Death Age]]
>

[==:var.zDeathDate:[Death Date]]

[==:var.zResidence:[Last Residence]]

<[?:Source.Part1]
<
[?:Source.Part1/^GreyPower/][==var.zRecordsOffice:[Source.Part1:append: :append:[Source.Part2]]]
|
[==var.zRecordsOffice:[Source.Part1]]
>
>

<[?:Postal Code District][==var.zPostalCode:[Postal Code District:uppercase]]>


|
#----------------------------------------------------------------------------TRX Marriage
[?:var.zRecordType=TRX Marriage]

[==:var.zFactType:TRX Marriage]
[==:var.zFactYear:[Marriage Date:dateYear]]

[lib.GetGender:First name(s)]

<
[?:Gender=M]
[==:var.zSurname:[Name:nameSurname]]
[==:var.zGivenName:[NamenameGiven]]
[==:var.zSpouseSurname:[Spouse's last name]]
[==:var.zSpouseGiven:[Spouse's first name(s)]]
|
[==:var.zSurname:[Spouse's last name]]
[==:var.zGivenName:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Last name]]
[==:var.zSpouseGiven:[First name(s)]]
>


[lib.ValidateInputField:Records Office]
[lib.ValidatePlace:Place]


|
#----------------------------------------------------------------------------US Federal Census
[?:var.zRecordType=US Federal Census]
[==:var.zFactYear:[Source.Year]]
[==:var.zCensusYear:[Source.Year]]



[==:var.zCollection:[Source.Title]]

[==:var.zFullAddress:[Full Address]]

# Validate State
<
[?:State:length=2]
[=:StateName:[State:full:us_states]]
<
[?:StateName]
[==:State:[StateName]]
|
[lib.ErrorMessage:Invalid state]
>
|
[=:StateAbbr:[State:abbr:us_states]]
<
[?:StateAbbr]
|
[lib.ErrorMessage:Invalid state]
>
>

<
[?:HoH ID][lib.ValidateInputField:HoH ID][=:var.zID:[HoH ID]]
|
[lib.ValidateInputField:Individual ID][=:var.zID:[Individual ID]]
>

|
#----------------------------------------------------------------------------Workhouse Admission
[?:var.zRecordType=Workhouse Admission]
[==:var.zFactType:Residence]
[==:var.zFactYear:[Admission Date:dateYear]]
[==:var.zAdmissionDate:[Admission Date]]
[==:var.zWorkhouseName:[Workhouse Name]]
[lib.ValidateInputField:Admission Place]
[lib.ValidatePlace:Admission Place]
[==:var.zWorkhouseLocation:[Admission Place]]
[lib.ValidateInputField:Residence]
[lib.ValidatePlace:Residence]
[==:var.zResidence:[Residence]]
[lib.ValidateInputField:Admission No]
<
[?:Admission No=nk][==:var.zAdmissionNo:]|[==:var.zAdmissionNo:[Admission No]]
>

# Birth Date
<
[?:Birth Date][==:var.zBirthDate:[Birth Date]]
|
[?:Admission Age][==:var.zBirthDate:[var.zAdmissionDate:dateYear:mathSubtract:[Admission Age]]]
>

# Occupation
[lib.ValidateInputField:Occupation]
<
[?:Occupation=nk][==:var.zOccupation:]|[==:var.zOccupation:[Occupation]]
>


# From Parish
<[?:From Parish][==:var.zFromParish:[From Parish]]|[==:var.zFromParish:]>

|
#---------------------------------------------------------------------Error - no valid record type
[lib.ErrorMessage:INITVARS_ANC - no valid record type]
# End of Record Type checking
>

InitVars_BG

#[=:Start:InitVars_BG]
# Author: Alan
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.

# Version Date       Reason for change
# ------------       -----------------------------------------------------------
# 07/11/2023         Split [lib.SetFieldName] by Service Name.
# 28/04/2024         Converted to InitVars_BG

# Usage: [lib.InitVars_BG]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [z_FactType]
# Input Variables:
#      [z_SourceType] - this field was previously [z_FactType]
#      [z_FactType] is still needed for Ancestral Sources - Birth, Baptism, Death, Burial, Census
#      [Page.ServiceName]
# Called by: 
# Calls: none



#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



[==:var.Debug:1]


# BillionGraves====================================================================
# [?:Page.ServiceName=BillionGraves]

# General
[==:var.zGivenName:[Given Name]]
[==:var.zSurname:[Family Name]]
[==:var.zFactYear:[Death Date:dateYear]]
[==:var.zDeathYear:[Death Date:dateYear]]
[==:var.zArchiveReference:[Record ID:prepend:BG ID]]





#***********
<[?:var.Debug=0]
#***********

## Do nothing
>
#[=:End:InitVars_BG]

InitVars_FAG

#[=:Start:InitVars_FAG]
# Author: Alan
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.

# Version Date       Reason for change
# ------------       -----------------------------------------------------------
# 07/11/2023         Split [lib.SetFieldName] by Service Name.
# 28/04/2024         Converted to InitVars_FAG
# 22/05/2024 BETA6   Further conversions to Bare Bones system
# 11/06/2024 BETA7_4 Removed excess colons from [Geocode], [What 3 Words], [var.zRecordsOffice].

# Usage: [lib.InitVars_FAG]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [z_FactType]
# Input Variables:
#      [zRecordType] - this field was previously [z_FactType]
#      [zFactType] is still needed for Ancestral Sources - Birth, Baptism, Death, Burial, Census
#      [Page.ServiceName]
# Called by: 
# Calls: none



#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



# Find a Grave=====================================================================
# [?:Page.ServiceName=Find a Grave]

# General
[==:var.zGivenName:[GivenName]]
[==:var.zSurname:[Surname]]
[==:var.zFullname:[Fullname]]
[==:var.zFactYear:[Death Date:dateYear]]
[==:var.zDeathYear:[var.zFactYear]]
[==:var.zArchiveReference:[Record ID:prepend:Memorial ID ]]
[==:var.zPlot:[Plot]]
[==:var.zDeathDate:[Death Date:initialcapital]]
[==:var.zBurialPlace:[Burial Place]]
[==:var.zCemeteryName:[Cemetery Name]]
<[?:Geocode=nk][==:var.zGeocode: ]|[==:var.zGeocode:[Geocode]]>
<[?:What 3 Words=nk][==:var.zW3W: ]|[==:var.zW3W:[What 3 Words]]>
[==:var.zPlot:[Plot]]
[==:var.zRecordsOffice:Find-a-Grave]

#Not needed for a Gravestone
<[==:var.zPage:[Page number]]>
<[==:var.zEntry:[Entry number]]>



#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

#[=:End:InitVars_FAG]

InitVars_FMP

# Description: Based on source/record type set up common variables that are shared between other
#              services such as Ancestry, FamilySearch, etc. There will be variables that are common
#              to all record types and then there are fields that are specific to the record type.

# Usage: [lib.InitVars_FMP]

# Change History       Reason for change
# --------------       -----------------------------------------------------------------------------
# 01/02/2024           Set up specific burial variables and correct other common variables that were not
#                      set up correctly.
# 02/02/24             Added [var.zMothersMaidenName] for SCI Birth
#                      Changed [var.DeathAge] to [var.zDeathAge].
# 07/02/2024           Check to spouse entered in MarriageFinder.
# 19/02/2024           Added code to hand record type MARRIAGE.
#                      Used [Archive reference] to set [var.zArchiveReference].
# 24/02/2024           Added new record type "Services".
# 26/02/2024           Added alternative last name field [Last name(s)].
# 27/02/2024           In SCI Marriage checked for presence of [Spouse's last name]
# 03/03/2024           Calculate death age for deaths after 1869.
# 05/04/2024           Registration year not being picked up.
# 06/04/2024           Removed word ERROR out of MarriageFinder error message.
# 28/04/2024           Added new record tyes Newspaper and Newspaper Item
# 29/04/2024           28/04/2024 BETA2_1 Fix Added [Spouse's first name] to Marriage record type.
# 30/04/2024           BETA2_15 Added record type Burial NC.
# 12/05/2024           Added new record type "TRX Marriage".
# 16/05/2024           Validation to [Place] for Burial was looking at [Burial Place]
# 20/05/2024 BETA4     Replace ? in a date with nothing.
# 21/05/2024 BETA5_1   Added check for [Baptism Place] to set [var.zBaptismPlace].
# 21/05/2024 BETA5_1   Unmatched "[" found in Baptism section.
# 10/06/2024 BETA7_3   Added record type "School Admission".
# 13/06/2024 BETA6_8   Record Type "Newspaper" - updated to handle a multiple name field
# 13/06/2024 BETA6_8   Record Type "Newspaper Item" - updated to handle a multiple name field
# 23/06/2024 BETA7_1   Added [lib.ValidatePlace] to Census [Full Address].
# 28/06/2024 BETA7_14  Evaluate the spouse's name from "MarriageFinder" field in the 
#                      "SCI Marriage" before evaluating the normal Spouse's name.
# 29/06/2024 BETA7_15  Added [Volume as transcribed] as condition in SCI Marriage.
# 11/07/2024 BETA8_2   Added [lib.ValidatePlace] to place fields in record type "Marriage"


# Based on Record Type set up variables


[=:var.debug:1]


#----------------------------------------------------------------------------General
# Principal 1
<
[?:Last name][==:var.zSurname:[Last name]]
|
[?:Last name(s)][==:var.zSurname:[Last name(s)]]
>
[==:var.zGivenName:[First name(s)]]
[==:var.zFullname:[var.zGivenName:append: :append:[var.zSurname]]]

# Principal 2
<
[?:Spouse's first name(s)][==:var.zSpouseGiven:[Spouse's first name(s)]]
|
[?:Spouse's first name][==:var.zSpouseGiven:[Spouse's first name]]
>
[==:var.zSpouseSurname:[Spouse's last name]]
[==:var.zSpouseName:[var.zSpouseGiven:append: :append:[var.zSpouseSurname]]]

# Reference
<
[?:Source.Reference][==:var.zArchiveReference:[Source.Reference:uppercase:replace: ::]]
|
[?:Source.Reference Number][==:var.zArchiveReference:[Source.Reference Number:uppercase:replace: ::]]
|
[?:Reference Number][==:var.zArchiveReference:[Reference Number:uppercase:replace: ::]]
|
[?:Archive reference][==:var.zArchiveReference:[Archive reference:uppercase:replace: ::]]
>

# Archive / Records Office
<
[==:var.zArchive:[Archive]]
>

# Collection and record IDs
[==:var.zCollectionID:[Collection ID]]
[==:var.zCollection:[Collection Name]]
[==:var.zRecordID:[Record ID]]


<
[?:Gender][==:var.zGender:[Gender]]
|
[?:Sex][==:var.zGender:[Sex]]
>
[==:var.zBirth:[Birth Year]]

<[?:Abode][==:var.zResidence:[Abode]]>


# Father
[==:var.zFSurname:[Father's last name]]
[==:var.zFGivenName:[Father's first name(s)]]
[==:var.zFFullname:[var.zFGivenName:append: :append:[var.zFSurname]]]
[==:var.zFOccupation:[Father's occupation]]

# Mother
[==:var.zMSurname:[Mother's first name(s)]]
[==:var.zMGivenName:[Mother's last name]]
[==:var.zMFullname:[var.zMGivenName:append: :append:[var.zMSurname]]]

# Start of record type checks
<
#----------------------------------------------------------------------------1939 Register
[?:var.zRecordType=1939 Register]
[==:var.zFactType:Census]
[==:var.zFactYear:1939]
[==:var.zCensusYear:1939]
[==:var.zRegistration district:[Registration district]]
[==:var.zEnumeration district:[E  D  letter code]]
[==:var.zSchedule:[Schedule]]
[==:var.zFullAddress:[Full Address]]


|
#----------------------------------------------------------------------------Birth
[?:var.zRecordType=Birth]

|
#----------------------------------------------------------------------------Baptism
[?:var.zRecordType=Baptism]

[==:var.zFactType:Baptism]
[==:var.zFactYear:[Baptism year]]
[==:var.zRegYear:[var.zFactYear]]
[==:var.zBaptismDate:[Baptism Date]]
<
[?:Parish][lib.ValidatePlace:Parish][==:var.zBaptismPlace:[Parish:append:, :append:[County]:append:, :append:[Country]]]
|
[?:Place][lib.ValidatePlace:Place][==:var.zBaptismPlace:[Place:append:, :append:[County]:append:, :append:[Country]]]
|
[?:Baptism Place][lib.ValidatePlace:Baptism Place][==:var.zBaptismPlace:[Baptism Place:append:, :append:[County]:append:, :append:[Country]]]
>

<
[?:Abode][lib.ValidatePlace:Abode]
>

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]

|
#----------------------------------------------------------------------------Baptism RC
[?:var.zRecordType=Baptism RC]

[==:var.zFactType:Baptism]
[==:var.zFactYear:[Baptism year]]
[==:var.zRegYear:[Baptism year]]
[==:var.zBaptismDate:[Baptism Date]]
<
[?:Parish][==:var.zBaptismPlace:[Parish:append:, :append:[County]:append:, :append:[Country]]]
|
[?:Place][==:var.zBaptismPlace:[Place:append:, :append:[County]:append:, :append:[Country]]]
>
# [lib.ValidateInputField:Place]

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]
|
#----------------------------------------------------------------------------Burial
[?:var.zRecordType=Burial]

<
[?:Burial Year][==:var.zBurialYear:[Burial Year]]
|
[?:Burial Date][==:var.zBurialYear:[Burial Date:dateYear]]
>
[==:var.zFactYear:[var.zBurialYear]]
[==:var.zBurialDate:[Burial Date:replace:?::l]]
[==:var.zDeathDate:[Death Date:replace:?::l]]


<
[?:Death Age][==:var.zDeathAge:[Death Age]]
|
[?:Age at death][==:var.zDeathAge:[Age at death]]
>


<
[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]
|
[?:Abode]
<[?:Abode=nk][==:var.zResidence:]|[lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]>
>

<
[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]
|
[?:Place][lib.ValidatePlace:Place][==:var.zBurialPlace:[Place]]
>

<[?:Archive reference][==:var.zRefID:[Archive reference:uppercase]]>
[==:var.OtherInfo:]

<[?:Page=nk][==:var.zPage:]|[==:var.zPage:[Page]]>

<[?:Entry No=nk][==:var.zEntryNo:]|[==:var.zEntryNo:[Entry No]]>

|
#----------------------------------------------------------------------------Burial NC
[?:var.zRecordType=Burial NC]

<
[?:Burial Year][==:var.zBurialYear:[Burial Year]]
|
[?:Burial Date][==:var.zBurialYear:[Burial Date:dateYear]]
>
[==:var.zFactYear:[var.zBurialYear]]
[==:var.zBurialDate:[Burial Date]]
[==:var.zDeathDate:[Death Date]]


<
[?:Death Age][==:var.zDeathAge:[Death Age]]
|
[?:Age at death][==:var.zDeathAge:[Age at death]]
>


<
[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]
|
[?:Abode]
<[?:Abode=nk][==:var.zResidence:]|[lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]>
>

<
[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]
|
[?:Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Place]]
>

<[?:Archive reference][==:var.zRefID:[Archive reference:uppercase]]>
[==:var.OtherInfo:]

<[?:Page=nk][==:var.zPage:]|[==:var.zPage:[Page]]>

<[?:Entry No=nk][==:var.zEntryNo:]|[==:var.zEntryNo:[Entry No]]>



|
#----------------------------------------------------------------------------Census
[?:var.zRecordType=Census]
[==:var.zFactType:Census]
[==:var.zFactYear:[Record Set:split: :1]]
[==:var.zCensusYear:[Record set:split: :1]]
[==:var.zCensusClass:[Archive reference:replace:RG0:RG:]]
[==:var.zPiece:[Piece number]]

<
[?:var.zFactYear=1861][==:var.zCensusClass:[Archive reference:replace:RG0:RG:]]
|
[?:Archive series][==:var.zCensusClass:[Archive series:replace:RG :RG:]]
|
[?:Archive reference][==:var.zCensusClass:[Archive reference]]
>

<[?:var.zFactYear=1841][==:var.zBook:[Book number]]|[==:var.zBook:]>

<[?:Folio][==:var.zFolio:[Folio]]
|[?:Folio number][==:var.zFolio:[Folio number]]>

<[?:Page][==:var.zPage:[Page]]
|[?:Page number][==:var.zPage:[Page number]]>

<[?:Schedule][==:var.zSchedule:[Schedule]]
|[?:Schedule number][==:var.zSchedule:[Schedule number]]>

<[?:Registration district number][==:var.zRegistration district:[Registration district number:append: :append:[Registration district]]]
|[?:Registration district][==:var.zRegistration district:[Registration district]]>


<[?:Sub-district number][==:var.zSub district:[Sub-district number:append: :append:[Sub-district]]]
|[?:Sub district][==:var.zSub district:[Sub district]]
|[?:Sub-district][==:var.zSub district:[Sub-district]]>


<[?:Enumeration district][==:var.zEnumeration district:[Enumeration district]]
|[?:Enumeration district number][==:var.zEnumeration district:[Enumeration district number]]>



<
[?:Full address]
[lib.ValidatePlace:Full address]
[==:var.zFullAddress:[Full address]]
|
[lib.ValidatePlace:Full address as transcribed]
[==:var.zFullAddress:[Full address as transcribed]]
>

[==:var.zParish:[Ecclesiastical parish or district]]

[==:var.zCollection:[Record Set]]


|
#----------------------------------------------------------------------------Death
[?:var.zRecordType=Death]

|
#----------------------------------------------------------------------------Marriage
[?:var.zRecordType=Marriage]
[==:var.zFactType:Marriage]
<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
>

[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactYear]]

# 28/04/2024 BETA2_1 Fix
<
[?:Spouse's first name(s)][==:var.zSpouseGiven:[Spouse's first name(s)]]
|
[?:Spouse's first name][==:var.zSpouseGiven:[Spouse's first name]]
>

<
[?:Spouse's last name][==:var.zSpouseSurname:[Spouse's last name]]
>


<[?:Marriage Place][lib.ValidatePlace:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
|[?:Parish][lib.ValidatePlace:Parish][==:var.zMarriagePlace:[Parish]]
|[?:Place][lib.ValidatePlace:Place][==:var.zMarriagePlace:[Place]]>

<[?:Individual Residence][lib.ValidatePlace:Individual Residence]>
<[?:Spouse Residence][lib.ValidatePlace:Spouse Residence]>


|
#----------------------------------------------------------------------------Newspaper
# Newspaper
[?:var.zRecordType=Newspaper]
# General

[lib.GetNewspaperEvent]

# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam BUT
# in some papers one name will appear in [Name] and the other in [Spouse].
# If event type <> Marriage then check for "&" in case event is an anniversary then 
#                               name will appear as George Marsden Bayley & Anna Mary Woollam

[=:var.zParts:[Name:splitcount: & ]]

# Start of Parts check for marriages & couples.
<
[?:var.zParts>2][lib.ErrorMessage:InitVars_Gen - More than 2 names]
|
[?:var.zParts>1]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]

# ...Split name and spouse name into Given and Surname
<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
#|
#[==:var.zSpouseGiven:[Spouse's first name(s)]]
#[==:var.zSpouseSurname:[Spouse's last name]]
>
|
[?:Event=Marriage]
#[==:var.zSpouseGiven:[Spouse's first name(s)]]
#[==:var.zSpouseSurname:[Spouse's last name]]
[==:var.zSpouseName:[var.zSpouseGiven:append: :append:[var.zSpouseSurname]]]

# End of Parts check for marriages & couples.
>


[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]

# Swap name and spouse if subject is a female
<
[?:Sex=Female]
[=:p2Given:[var.zGivenName]]
[=:p2Surname:[var.zSurname]]
[==:var.zGivenName:[var.zSpouseGiven]]
[==:var.zSurname:[var.zSpouseSurname]]
[==:var.zSpouseGiven:[p2Given]]
[==:var.zSpouseSurname:[p2Surname]]
>

# Event
[lib.ValidateInputField:Event]
[lib.GetNewsType]
[==:var.zEventType:[Event]]
[==:var.zEvent:[Event]]

# Newspaper
<
[?:Newspaper][==:var.zNewspaper:[Newspaper]]
|
[?:Publication Title][==:var.zNewspaper:[Publication Title]]
>
[==:var.zNewspaper:[var.zNewspaper:append: (FMP)]]

# Publication Date
<
[?:Publication Date][==:var.zPublicationDate:[Publication Date]]
|
[?:Date][==:var.zPublicationDate:[Date]]
>

# Event Date
<
[?:Event Date][==:var.zEventDate:[Event Date]]
|
[?:Date][==:var.zEventDate:[Date]]
>
[==:var.zFactYear:[var.zEventDate:dateYear]]


# ..Else2
|
#----------------------------------------------------------------------------Newspaper Item
# Newspaper Item
[?:var.zRecordType=Newspaper Item]
# General

[lib.GetNewspaperEvent]

# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
# If event type <> Marriage then check for "&" in case event is an anniversary then 
#                               name will appear as George Marsden Bayley & Anna Mary Woollam

[=:var.zParts:[Name:splitcount: & ]]

<
[?:var.zParts>2][lib.ErrorMessage:InitVars_Gen - More than 2 names]
|
[?:var.zParts>1]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

>

<
[?:Name]
[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]
|
[==:var.zGivenName:[First name(s)]]
[==:var.zSurname:[Last name]]
>

<
[?:Record Set/Birth/][==:var.zEventType:Birth]
|
[?:Record Set/Death/][==:var.zEventType:Death]
|
[?:Record Set/Marriage/][==:var.zEventType:Marriage]
>

[==:var.zEvent:[var.zEventType]]


[lib.GetNewsType]

[==:var.zFactYear:[^var.zEventType:append: Date]]
[==:var.zFactYear:[var.zFactYear:dateYear]]

[==:var.zNewspaper:[Publication title:append: (FMP)]]


|
#----------------------------------------------------------------------------Probate
[?:var.zRecordType=Probate]
[==:var.zFactYear:[Probate Date:dateYear]]
[==:var.zProbateYear:[var.zFactYear]]
[==:var.zProbateDate:[Probate Date]]
[==:var.zDeathYear:[Death date:dateYear]]
[==:var.zDeathDate:[Death date]]
[==:var.zDeathPlace:[Death Place]]
[==:var.zResidencePlace:[Residence place at death]]

<
[?:Probate Text][lib.ValidateInputField:Probate Text]
>

<
[?:Probate Registry]
[=:zRegistry:[Probate Registry]]
|
[?:Confirmation Place][=:zRegistry:[Confirmation Place]]
|
[=:zRegistry:[Registry]]
>

[lib.Get_Registry]



|
#----------------------------------------------------------------------------School Admission
[?:var.zRecordType=School Admission]
[==:var.zFactType:Education]
<
[?:Admission Date][==:var.zFactYear:[Admission Date:dateYear]]
|
[?:Event Year][==:var.zFactYear:[Event Year:dateYear]]
>
[==:var.zAdmissionDate:[Admission Date]]
[==:var.zSchool:[School Name]]
[lib.ValidateInputField:School Location]
[lib.ValidatePlace:School Location]
[==:var.zSchoolLocation:[School Location]]
[lib.ValidateInputField:Residence]
[lib.ValidatePlace:Residence]
[==:var.zResidence:[Residence]]
[lib.ValidateInputField:Admission No]
[==:var.zAdmissionNo:[Admission No]]
<[==:var.zBirthDate:[Birth Date]]>
<
[?:Parent's name(s)]
[==:var.zParentGuardian:[Parent's name(s)]]
>

|
#----------------------------------------------------------------------------SCI Birth
[?:var.zRecordType=SCI Birth]

[==:var.zFactType:SCI Birth]
<
[?:Birth year][==:var.zFactYear:[Birth year]]|
[?:Birth registration year][==:var.zFactYear:[Birth registration year]]|
[?:Registration Date][==:var.zFactYear:[Registration Date:dateYear]]
>
[==:var.zRegYear:[var.zFactYear]]

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]
[==:var.zMothersMaidenName:[Mother's maiden name]]

[lib.GetCivilReg:Birth]

|
#----------------------------------------------------------------------------SCI Death
[?:var.zRecordType=SCI Death]

[==:var.zFactType:SCI Death]
<
[?:Death year][==:var.zFactYear:[Death year]]
|
[?:Death Date][==:var.zFactYear:[Death Date:dateYear]]
>
[==:var.zRegYear:[var.zFactYear]]

[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]
[lib.GetCivilReg:Death]

<
[?:Age][==:var.zAgeAtDeath:[Age]]
|
[?:Birth Year][==:var.zAgeAtDeath:[Death Year:dateYear::mathSubtract:[Birth Year:dateYear]]]
>


|
#----------------------------------------------------------------------------SCI Marriage
[?:var.zRecordType=SCI Marriage]

[==:var.zFactType:SCI Marriage]
[==:var.zFactYear:[Marriage Date:dateYear]]
[==:var.zRegYear:[Marriage Date:dateYear]]


[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:[Record ID]]


<
[?:MarriageFinder™/married one of these people/]
[=:sp:[MarriageFinder™:split:married one of these people:2]]
<[?:sp:splitcount:,>1]|[==:MarriageFinder™:[sp]]>
|
[?:MarriageFinder™/married/]
[=:sp:[MarriageFinder™:split:married:2]]
<[?:sp:splitcount:,>1]|[==:MarriageFinder™:[sp]]>
>


<[?:MarriageFinder™/married/][lib.ErrorMessage:MarriageFinder field not updated]>
<
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:Spouse's last name]
[==:var.zSpouseGiven:[Spouse's last name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's last name:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>
[lib.GetCivilReg:Marriage]

<
[?:Volume Number as transcribed][==:var.zVolume:[Volume Number as transcribed]]
|
[?:Volume as transcribed][==:var.zVolume:[Volume as transcribed]]
|
[?:Volume Number][==:var.zVolume:[Volume Number]]
|
[?:Entry Number][==:var.zVolume:[Entry Number]]
>

<[?:Page number][==:var.zPage:[Page Number]]>

|
#----------------------------------------------------------------------------Services
[?:var.zRecordType=Services]
[lib.Services_FMP]

|
#----------------------------------------------------------------------------TRX Death
[?:var.zRecordType=TRX Death]

[==:var.zFactType:TRX Death]
[==:var.zFactYear:[Death Date:dateYear]]
[==:var.zRegYear:[var.zFactYear]]

<[?:Birth Date][==:var.zBirthDate:[Birth Date]]>

<
[?:Age][==:var.zAgeAtDeath:[Age]]
|
[?:Death Age][==:var.zAgeAtDeath:[Death Age]]
>

[==:var.zDeathDate:[Death Date]]

<[?:Residence][lib.ValidatePlace:Residence][==:var.zLastResidence:[Residence]]>


<[?:Postal Code District][==var.zPostalCode:[Postal Code District:uppercase]]>


|
#----------------------------------------------------------------------------TRX Marriage
[?:var.zRecordType=TRX Marriage]

[==:var.zFactType:TRX Marriage]
[==:var.zFactYear:[Marriage Date:dateYear]]

[lib.GetGender:First name(s)]

<
[?:Gender=M]
[==:var.zSurname:[Last name]]
[==:var.zGivenName:[First name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
[==:var.zSpouseGiven:[Spouse's first name(s)]]
|
[==:var.zSurname:[Spouse's last name]]
[==:var.zGivenName:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Last name]]
[==:var.zSpouseGiven:[First name(s)]]
>


[lib.ValidateInputField:Records Office]
[lib.ValidatePlace:Place]



|
#-----------------------------------------------------------------------Error - no valid record type
[lib.ErrorMessage:InitVars_FMP Error - no valid record type]




<[?:var.Debug=0]
## DO NOTHING
>


# End of Record Type checking
>

InitVars_FS

[=:Start:InitVars_FS]
# Author: Alan
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.

# Version Date       Reason for change
# ------------       -----------------------------------------------------------
# 07/11/2023         Split [lib.InitVars] by Service Name.
# 30/05/2024 BETA6   Added [Abode] for a baptism.

# Usage: [lib.InitVars_FS]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [zFactType]
# Input Variables:
#      [zRecordType] - this field was previously [zFactType]
#      [zFactType] is still needed for Ancestral Sources - Birth, Baptism, Death, Burial, Census
#      [Page.ServiceName]
# Called by: 
# Calls: none


#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



[==:var.Debug:1]

# FamilySearch===============================================================================
# [?:Page.ServiceName=FamilySearch]

#-------------------------------------------------------------------------------------------
# General
[==:var.zGivenName:[Name:nameGiven]]
[==:var.zSurname:[Name:nameSurname]]
[==:var.zFullName:[Name]]

[==:var.zArchiveReference:[Source.Digital Folder Number:prepend:Digital Folder :append:; ]]
[==:var.zArchiveReference:[var.zArchiveReference:append:[Source.Microfilm Number:prepend:Microfilm :append:; ]]]
[==:var.zArchiveReference:[var.zArchiveReference:append:[Source.Indexing Batch:prepend:Indexing Batch ]]]



# Register Type - (P)arish (R)ecords, (B)ishops (T)ranscripts, (N)on-(C)onformist.
#                 The default register type in FH source template is PR.
#                 The default media name does not include the register type for PR but we need 
#                 to capture BT and NC. BT and PR are most important because you can get both
#                 for the same person AND in the same collection.


# [Record type] on Yorkshire Burials = Bishop's transcripts
# [Register type] on Yorkshire Burials = Baptisms & burials


<[?:Record set/Non-Conform/][==:var.zRegisterType:NC]
|[?:Records set/Non-Conform/][==:var.zRegisterType:NC]
|[?:Record set/Bishop's Transcripts/][==:var.zRegisterType:BT]
|[?:Records set/Bishop's Transcripts/][==:var.zRegisterType:BT]
|[?:Records set/Parish Marriages/][==:var.zRegisterType:PR]
|[?:Record type:substring:1:6=Bishop][==:var.zRegisterType:BT]
|[?:Register Type:substring:1:6=Bishop][==:var.zRegisterType:BT]
|[==:var.zRegisterType:PR]>

<[?:var.zRecordType=Burial]
<[?:var.zRegisterType=BT][==:var.zRecordType:Burial BT]
|[?:var.zRegisterType=NC][==:var.zRecordType:Burial NC]>>

## Citing for Ancestry, Findmypast and FamiySearch only for all collections.
#[lib.SetCitingWebSites]


# Start of Source type checks...

<
#-------------------------------------------------------------------------------------------
# Banns
[?:var.zRecordType=Banns]

<
[?:Banns Date][==:var.zFactDate:[Banns Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zBannsYear:[var.zFactDate:dateYear]]
|
[?:Banns Year]
[==:var.zFactYear:[Banns Year:dateYear]]
[==:var.zMarriageYear:[Banns Year:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Baptism / Christening
[?:var.zRecordType=Baptism]
[==:var.zFactType:[var.zFact]]
<
[?:Event Date]
[==:var.zFactYear:[Event Date:dateYear]]
[==:var.zBaptismDate:[Event Date]]
[==:var.zEventDate:[Event Date]]
[=:Baptism date:[Event Date]]
|
[?:Baptism day][==:var.zFactYear:[Baptism year:dateYear]]
[=:Baptism date:[Baptism day:append: :append:[Baptism month]:append: :append:[Baptism year]]]
|
[?:Baptism Date]
[==:var.zFactYear:[Baptism Date:dateYear]]
[==:var.zBaptismDate:[Baptism Date]]
[==:var.zEventDate:[Baptism Date]]
|
[?:Date]
[==:var.zFactYear:[Date:dateYear]]
[==:var.zBaptismDate:[Date]]
[==:var.zEventDate:[Date]]
>
[==:var.zBaptismYear:[var.zFactYear]]

<
[?:Event Place]
[==:var.zBaptismPlace:[Event Place]]
[==:var.zEventPlace:[Event Place]]
|
[?:Baptism Place]
[==:var.zBaptismPlace:[Baptism Place]]
[==:var.zEventPlace:[Baptism Place]]
|
[?:Place]
[==:var.zBaptismPlace:[Place]]
[==:var.zEventPlace:[Place]]
>
[lib.ValidatePlace:var.zBaptismPlace]


<
[?:Abode]
<
[?:Abode!=nk][==:var.zResidence:[Abode]]
|
[==:var.zResidence:]
>
|
[?:Residence]
##[lib.ValidateInputField:Residence]
[==var.zResidence:[Residence]]
##[lib.ValidatePlace:Residence]
>

<
[?:Mother Name]
[==:var.zMothersGivenName:[Mother Name:nameGiven]]
[==:var.zMothersLastname:[Mother Name:nameSurname]]
|
[?:Mother's Name]
[==:var.zMothersGivenName:[Mother's Name:nameGiven]]
[==:var.zMothersLastname:[Mother's Name:nameSurname]]
>


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Baptism NC
[?:var.zRecordType=Baptism NC]
<
[?:Baptism Date][==:var.zFactYear:[Baptism Date:dateYear]]
|
[?:Date][==:var.zFactYear:[Date:dateYear]]
>
[==:var.zBaptismYear:[Baptism Date:dateYear]]

[==:var.zBaptismPlace:[Place]]
[lib.ValidatePlace:var.zBaptismPlace]


<[?:Mother's first name(s)][==:var.zMothersGivenName:[Mother's first name(s)]]>
<[?:Mother's last name][==:var.zMothersLastname:[Mother's last name]]>

# ..Else2
|
#-------------------------------------------------------------------------------------------
# Burial
[?:var.zRecordType=Burial]

# Findmypast combines burials and cemetery record under the category of BURIALS.
# [Register Type] set to Burials identifies true burial.
# Record ID identifies burial with "/BUR/" and cemetery as "/CEMETERY/
<
[?:Record ID/\/CEMETERY\//][==:var.zRecordType:Cemetery]
>

<
[?:Burial Date]
[==:var.zFactYear:[Burial Date:dateYear]]
[==:var.zBurialYear:[Burial Date:dateYear]]
|
[?:Burial Year]
[==:var.zFactYear:[Burial Year:dateYear]]
[==:var.zBurialYear:[Burial Year:dateYear]]
>

<[?:Burial Place][lib.ValidatePlace:Burial Place][==:var.zBurialPlace:[Burial Place]]
|[?:Place][lib.ValidatePlace:Place][==:var.zBurialPlace:[Place]]>

# Possible duplication because some state Abode and no Residence and vice versa.
<[?:Abode][lib.ValidatePlace:Abode][==:var.zResidence:[Abode]]>
<[?:Residence][lib.ValidatePlace:Residence][==:var.zResidence:[Residence]]>

<
[?:Death Date]
[==:var.zDeathYear:[Death Date:dateYear]]
|
[?:Death Year]
[==:var.zDeathYear:[Death Year:dateYear]]
>

# 17/10/2023 [==:var.zCollection:[Source]]


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Burial BT
[?:var.zRecordType=Burial BT]

# Set up fact year and burial year.
<
[?:Burial Date]
[==:var.zFactYear:[Burial Date:dateYear]]
[==:var.zBurialYear:[Burial Date:dateYear]]
|
[?:Burial Year]
[==:var.zFactYear:[Burial Year:dateYear]]
[==:var.zBurialYear:[Burial Year:dateYear]]
>


# Problem death date for collection: England & Wales non-conformist burials on Findmypast
<[?:Death Date/\?/][=:Death Date:[Death Date:replace:\?::]]>

# Set up Death Year.
<
[?:Death Date]
[==:var.zDeathYear:[Death Date:dateYear]]
|
[?:Death Year]
[==:var.zDeathYear:[Death Year:dateYear]]
>

# 17/10/2023 [==:var.zCollection:[Record set]]

[==:var.zDeathAge:[Age]]
[==:var.zCemetery:[Place]]
[==:var.zBurialPlace:[Burial place as transcribed]]
[==:var.zPlot:[Ground]]

<[?:Death Date][==:var.zDeathDate:[Death Date]]
|[?:Death Year][==:var.zDeathDate:[Death Year]]>

<[?:Burial Date][==:var.zBurialDate:[Burial Date]]
|[?:Burial Year][==:var.zBurialDate:[Burial Year]]>

<[?:Birth Date][==:var.zBirthDate:[Birth Date]]
|[?:Birth Year][==:var.zBirthDate:[Birth Year]]>


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Burial NC
[?:var.zRecordType=Burial NC]

# Set up fact year and burial year.
<
[?:Burial Date]
[==:var.zFactYear:[Burial Date:dateYear]]
[==:var.zBurialYear:[Burial Date:dateYear]]
|
[?:Burial Year]
[==:var.zFactYear:[Burial Year:dateYear]]
[==:var.zBurialYear:[Burial Year:dateYear]]
>


# Problem death date for collection: England & Wales non-conformist burials on Findmypast
<[?:Death Date/\?/][=:Death Date:[Death Date:replace:\?::]]>

# Set up Death Year.
<
[?:Death Date]
[==:var.zDeathYear:[Death Date:dateYear]]
|
[?:Death Year]
[==:var.zDeathYear:[Death Year:dateYear]]
>

# 17/10/2023 [==:var.zCollection:[Record set]]

[==:var.zDeathAge:[Age]]
[==:var.zCemetery:[Place]]
[==:var.zBurialPlace:[Burial place as transcribed]]
[==:var.zPlot:[Ground]]

<[?:Death Date][==:var.zDeathDate:[Death Date]]
|[?:Death Year][==:var.zDeathDate:[Death Year]]>

<[?:Burial Date][==:var.zBurialDate:[Burial Date]]
|[?:Burial Year][==:var.zBurialDate:[Burial Year]]>

<[?:Birth Date][==:var.zBirthDate:[Birth Date]]
|[?:Birth Year][==:var.zBirthDate:[Birth Year]]>


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Cementery (Burial)
[?:var.zRecordType=Cemetery]

# Findmypast combines burials and cemetery record under the category of BURIALS.
# [Register Type] set to Burials identifies true burial.
# Record ID identifies burial with "/BUR/" and cemetery as "/CEMETERY/

# Following code included in [lib.SetSourceTypeConflicts] called by [lib.InstructionsBurial].
# [?:Record ID/\/CEMETERY\//][==:var.zRecordType:Cemetery]>

<
[?:Burial Date]
[==:var.zFactYear:[Burial Date:dateYear]]
[==:var.zBurialYear:[Burial Date:dateYear]]
|
[?:Burial Year]
[==:var.zFactYear:[Burial Year:dateYear]]
[==:var.zBurialYear:[Burial Year:dateYear]]
>


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Census
[?:var.zRecordType=Census]
[==:var.zFactYear:[Record set:split: :1]]
[==:var.zCensusYear:[Record set:split: :1]]
[==:var.zCensusClass:[Archive reference:replace:RG0:RG:]]
[==:var.zPiece:[Piece number]]

<
[?:var.zFactYear=1861][==:var.zCensusClass:[Archive reference:replace:RG0:RG:]]
|
[?:Archive series][==:var.zCensusClass:[Archive series:replace:RG :RG:]]
|
[?:Archive reference][==:var.zCensusClass:[Archive reference]]
>

<[?:var.zFactYear=1841][==:var.zBook:[Book number]]|[==:var.zBook:]>

<[?:Folio][==:var.zFolio:[Folio]]
|[?:Folio number][==:var.zFolio:[Folio number]]>

<[?:Page][==:var.zPage:[Page]]
|[?:Page number][==:var.zPage:[Page number]]>

<[?:Schedule][==:var.zSchedule:[Schedule]]
|[?:Schedule number][==:var.zSchedule:[Schedule number]]>

<[?:Registration district number][==:var.zRegistration district:[Registration district number:append: :append:[Registration district]]]
|[?:Registration district][==:var.zRegistration district:[Registration district]]>


<[?:Sub-district number][==:var.zSub district:[Sub-district number:append: :append:[Sub-district]]]
|[?:Sub district][==:var.zSub district:[Sub district]]
|[?:Sub-district][==:var.zSub district:[Sub-district]]>


<[?:Enumeration district][==:var.zEnumeration district:[Enumeration district]]
|[?:Enumeration district number][==:var.zEnumeration district:[Enumeration district number]]>



<[?:Full address][==:var.zFullAddress:[Full address]]
|[==:var.zFullAddress:[Full address as transcribed]]>

[==:var.zParish:[Ecclesiastical parish or district]]

# [==:var.zCollection:[Record Set]]


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Electoral Register
[?:var.zRecordType=Electoral Register]
[==:var.zFactYear:[Residence Date:dateYear]]
[==:var.zResidenceYear:[Residence Date:dateYear]]

# ..Else2
|
#-------------------------------------------------------------------------------------------
# Marriage
[?:var.zRecordType=Marriage]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
|[?:Parish][==:var.zMarriagePlace:[Parish]]
|[?:Place][==:var.zMarriagePlace:[Place]]>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>

# ..Else2
|
#-------------------------------------------------------------------------------------------
# Marriage Bishop's Transcript
[?:var.zRecordType=Marriage BT]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>

<
[?:Place][==:var.zMarriagePlace:[Place]]
|
[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
>




# ..Else2
|
#-------------------------------------------------------------------------------------------
# Marriage Licence Bonds And Allegations
[?:var.zRecordType=Marriage Licence]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>

<
[?:Place][==:var.zMarriagePlace:[Place]]
|
[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
>




|
#-------------------------------------------------------------------------------------------
# Marriage Licence
[?:var.zRecordType=Marriage Licence]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>


<
[?:Place][==:var.zMarriagePlace:[Place]]
|
[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
>




# ..Else2
|
#-------------------------------------------------------------------------------------------
# Marriage Non-Conformist
[?:var.zRecordType=Marriage NC]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>


<
[?:Place][==:var.zMarriagePlace:[Place]]
|
[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
>




# ..Else2
|
#-------------------------------------------------------------------------------------------
# Marriage Parish
[?:var.zRecordType=Marriage PR]

<
[?:Marriage Date][==:var.zFactDate:[Marriage Date]]
|
[?:Event Date][==:var.zFactDate:[Event Date]]
|
[?:Date][==:var.zFactDate:[Date]]
>

<
[?:var.zFactDate]
[==:var.zFactYear:[var.zFactDate:dateYear]]
[==:var.zMarriageYear:[var.zFactDate:dateYear]]
|
[?:Year]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zMarriageYear:[Year:dateYear]]
>

<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
|
[?:MarriageFinder™]
[==:var.zSpouseGiven:[MarriageFinder™:nameGiven]]
[==:var.zSpouseSurname:[MarriageFinder™:nameSurname]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

<
[?:Spouse Father Occupation][==:var.zSpouseFatherOccupation:[Spouse Father Occupation]]
|
[?:Spouse's father's occupation][==:var.zSpouseFatherOccupation:[Spouse's father's occupation]]
>


<
[?:Place][==:var.zMarriagePlace:[Place]]
|
[?:Marriage Place][==:var.zMarriagePlace:[Marriage Place]]
>





|
#-------------------------------------------------------------------------------------------
# Newspaper
[?:var.zRecordType=Newspaper]
# General
# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
<
[?:Event=Marriage]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

>
[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]
[==:var.zEventType:[Event]]
[==:var.zFactYear:[Year]]
[==:var.zNewspaper:[Newspaper:append: (FMP)]]

# ..Else2
|
#-------------------------------------------------------------------------------------------
# Newspaper Item
[?:var.zRecordType=Newspaper Item]
# General
# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
<
[?:Event=Marriage]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
<
[?:var.zSpouseName]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
|
[==:var.zSpouseGiven:[Spouse's first name(s)]]
[==:var.zSpouseSurname:[Spouse's last name]]
>

>
[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]
[==:var.zEventType:[Event]]
[==:var.zFactYear:[Year]]
[==:var.zNewspaper:[Newspaper:append: (FMP)]]


# ..Else2
|
#-------------------------------------------------------------------------------------------
# Probate
[?:var.zRecordType=Probate]
[==:var.zFactYear:[Probate Date:dateYear]]
[==:var.zProbateYear:[Probate Date:dateYear]]
[==:var.zProbateDate:[Probate Date]]
[==:var.zDeathYear:[Death date:dateYear]]
[==:var.zDeathDate:[Death date]]
[==:var.zDeathPlace:[Death Place]]
[==:var.zResidencePlace:[Residence place at death]]

<
[?:Probate Registry]
[=:z_Registry:[Probate Registry]]
|
[?:Confirmation Place][=:z_Registry:[Confirmation Place]]
|
[=:z_Registry:[Registry]]
>

[lib.Get_Registry]

# 17/10/2023 [==:var.zCollectionID:]
# 17/10/2023 [==:var.zCollectionName:[Record Set]]

# ..Else2
|
#-------------------------------------------------------------------------------------------
# Error - Invalid Fact Type
[=:Source Type Error  for Findmypast - Press CANCEL]

# End of source type checks
# ..End2
>





#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

[=:End:InitVars_FS]

InitVars_GENERIC

#[=:Start:InitVars_GENERIC]
# Author: Alan
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.

# Version Date         Reason for change
# ------------         -----------------------------------------------------------
# 07/11/2023           Split [lib.SetFieldName] by Service Name.
# 28/04/2024           Converted to InitVars_GENERIC
# 13/06/2024 BETA6_8   BNA - updated method to handle a multiple name field
# 16/06/2024 BETA7     Added record type "FreeBMD Birth/Marriage/Death" with host "freebmd.org.uk".
# 26/06/2024 BETA7_12  Added record type "Funeral Notice" --> "funeral-notices.co.uk".
# 27/06/2024 BETA7_11  Added transform ":capitalize" to the FreeBMD person names.


# Usage: [lib.InitVars_GENERIC]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [z_FactType]
# Input Variables:
#      [zRecordType] - this field was previously [z_FactType]
#      [zFactType] is still needed for Ancestral Sources - Birth, Baptism, Death, Burial, Census
#      [Page.ServiceName]
# Called by: 
# Calls: none



#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



[==:var.Debug:1]

# Set fact type up for Ancestral Sources
[==:var.zFactType:[var.zRecordType]]


# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++FreeBMD
# FreeBMD must come before UKBMD because both hostnames end with "bmd.org,uk".
#
# ..Start1 - Host check
<
[?:Page.HostName/^freebmd/]

# ----------------------------------------------------------------------FreeBMD General
# General (Common to all types)

[==:var.zSurname:[Surname:capitalize]]
[==:var.zGivenName:[First name(s):capitalize]]
[==:var.zFullname:[var.zGivenName:append: :append:[var.zSurname]]]
[==:var.zFactYear:[Sdate:dateYear]]
[==:var.zRegYear:[var.zFactYear]]
[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zCollection:[Collection Name]]
<[?:Record ID][==:var.zRecordNo:[Record ID]]|[==:var.zRecordNo: ]>


# ----------------------------------------------------------------------FreeBMD Birth
# ...Start2 FreeBMD TYPE CHECK
<
[?:var.zRecordType=FreeBMD Birth]

[==:var.zFactType:FreeBMD Birth]

<[?:Mother][==:var.zMothersMaidenName:[Mother]]|[==:var.zMothersMaidenName:]>

[lib.GetCivilReg:Birth]

|
# ----------------------------------------------------------------------FreeBMD Marriage
# ...Else2 FreeBMD TYPE CHECK
[?:var.zRecordType=FreeBMD Marriage]
[==:var.zFactType:FreeBMD Marriage]


<
[?:Spouse's Name]
[==:Spouse's Name:[Spouse's Name:capitalize]]
[==:var.zSpouseFullname:[Spouse's Name]]
[==:var.zSpouseGiven:[Spouse's Name:nameGiven]]
[==:var.zSpouseSurname:[Spouse's Name:nameSurname]]
>
[lib.GetCivilReg:Marriage]


|
#----------------------------------------------------------------------------FreeBMD Death
# ...Else2 FreeBMD TYPE CHECK
[?:var.zRecordType=FreeBMD Death]

[==:var.zFactType:FreeBMD Death]

<
[?:Age]
[==:var.zAgeAtDeath:[Age]]
[==:var.zBirthYear:[var.zFactYear:mathSubtract:[var.zAgeAtDeath]]]
>

[lib.GetCivilReg:Death]

# ...End 2 FreeBMD type checks 
>

# ..Else1 - Host check
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++UKBMD
[?:Page.HostName/bmd.org.uk$/]

# ----------------------------------------------------------------------General
<
[?:First Name(s)][==:var.zGivenName:[First Name(s)]]
|
[?:Forename(s)][==:var.zGivenName:[Forename(s)]]
|
[?:Forename(s) 1][==:var.zGivenName:[Forename(s) 1]]
>
<
[?:Surname][==:var.zSurname:[Surname:initialCapital]]
|
[?:Surname 1][==:var.zSurname:[Surname 1:initialCapital]]
>
<
[?:Spouse's First Name(s)][==:var.zSpouseGiven:[Spouse's First Name(s)]]
|
[?:Forename(s) 2][==:var.zSpouseGiven:[Forename(s) 2]]
>
<
[?:Spouse's Surname][==:var.zSpouseSurname:[Spouse's Surname:initialCapital]]
|
[?:Surname 2][==:var.zSpouseSurname:[Surname 2:initialCapital]]
>

[==:var.zArchiveReference:[Reference]]
[==:var.zFactYear:[Year:dateYear]]
[==:var.zRegYear:[var.zFactYear]]
[==:var.zRegistersAt:[Registers At]]

# ----------------------------------------------------------------------UKBMD Birth
# ...Start2 UKBMD TYPE CHECK
<
[?:var.zRecordType=UKBMD Birth]
[==:var.zFactType:{BMD Type]]

<
[?:Mother's Maiden Name]
[==:var.zNameSuffix:[Mother's Maiden Name:uppercase:prepend: - mother ]]
[==:var.zMothersMaidenName:[Mother's Maiden Name:InitialCapital]]
|
[==:var.zNameSuffix:]
>

<
#######[lib.ValidatePlace:Sub-District]
[==:var.zSub-District:[Sub-District]]
>

<
[lib.ValidateInputField:Region]
[==:var.zRegion:[Region]]
>

# ...Else2 UKBMD TYPE CHECK
|
# ----------------------------------------------------------------------UKBMD Marriage
[?:var.zRecordType=UKBMD Marriage]
[==:var.zFactType:{BMD Type]]
[==:var.zRegYear:[Year]]

# Church Register Office
<[==:var.zChurchRegOffice:[Church Register Office]]|[==:var.zChurchRegOffice:[Church   Register Office]]>

<
[lib.ValidateInputField:Region]
[==:var.zRegion:[Region]]
>


# ...Else2 UKBMD TYPE CHECK
|
# ----------------------------------------------------------------------UKBMD Death
[?:var.zRecordType=UKBMD Death]
[==:var.zFactType:{BMD Type]]
[==:var.zRegYear:[Year]]
# Age at Death

# ...Start3
<
[?:Age]

<
[?:Age=-][==:var.zAgeAtDeath:]
|
[==:var.zAgeAtDeath:[Age]]
>

|

# Age at Death or Year of Birth
[?:Age at Death or Year of Birth]

<
[?:Age at Death or Year of Birth=-][==:var.zAgeAtDeath:]
|
[?:Age at Death or Year of Birth:length>=4][==:var.zAgeAtDeath:[Year:mathSubtract:[Age at Death or Year of Birth:dateYear]]][==:var.zBirthDate:[Age at Death or Year of Birth]]
|
[?:Age at Death or Year of Birth:length>0]
[==:var.zAgeAtDeath:[Age at Death or Year of Birth]]
[==:var.zBirthDate:[Year:mathSubtract:[Age at Death or Year of Birth]]]
>

|

# Age or Date of Birth
[?:Age or Date of Birth]

<
[?:Age or Date of Birth=-][==:var.zAgeAtDeath:]
|
[?:Age or Date of Birth:length>=4][==:var.zAgeAtDeath:[Year:mathSubtract:[Age or Date of Birth:dateYear]]][==:var.zBirthDate:[Age or Date of Birth]]
|
[?:Age or Date of Birth:length>0]
[==:var.zAgeAtDeath:[Age or Date of Birth]]
[==:var.zBirthDate:[Year:mathSubtract:[Age or Date of Birth]]]

>

>

# ...End3

# ...Start3


[==:var.zSub-District:[Sub-District]]

<
[lib.ValidateInputField:Region]
[==:var.zRegion:[Region]]
>


<
[?:var.zAgeAtDeath]
[==:var.zNameSuffix:[var.zAgeAtDeath:prepend: - age ]]
|
[==:var.zNameSuffix:]
>
# ...End3


# End of bmd.org.uk
# ...End2
>


# ..Else1 - Host check
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++British Newspapers Archive
[?:Page.HostName/^britishnewspaper|^Newspaper/]

# General
[lib.GetNewspaperEvent]

# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
# If event type <> Marriage then check for "&" in case event is an anniversary then 
#                               name will appear as George Marsden Bayley & Anna Mary Woollam

[==:var.zParts:[Name:splitcount: & ]]

<
[?:var.zParts>2][lib.ErrorMessage:InitVars_Gen - More than 2 names]
|
[?:var.zParts>1]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
>

[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]


[lib.GetNewsType]

[lib.ValidateInputField:Event]
[==:var.zEvent:[Event]]
[==:var.zEventType:[Event]]

# Publication Date
<
[?:Publication Date]
[==:var.zPublicationDate:[Publication Date]]
#[==:var.zPublicationDate:[Publication Date:split: :2]]
#[==:var.zPublicationDate:[var.zPublicationDate:append: :append:[Publication Date:split: :3]]]
#[==:var.zPublicationDate:[var.zPublicationDate:append: :append:[Publication Date:split: :4]]]
|
[?:Date][==:var.zPublicationDate:[Date]]
>

# Event Date

[==:var.zEventDate:[Event Date]]

<
[?:Event Date][==:var.zFactYear:[Event Date:dateYear]]
|
[?:Year][==:var.zFactYear:[Year]]
|
[?:Death Date][==:var.zFactYear:[Death Date:dateYear]]
>

[lib.ValidateInputField:Newspaper Text]

# Newspaper
<
[?:Newspaper][==:var.zNewspaper:[Newspaper]]
|
[?:Paper][==:var.zNewspaper:[Paper]]
|
[?:Publication title][==:var.zNewspaper:[Publication title]]
>
# End of British Newspapers Archive


# ..Else1 - Host check
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Funeral Notices
[?:Page.HostName=funeral-notices.co.uk]

# General
[==:var.zGivenName:[Name:nameGiven]]
[==:var.zSurname:[Name:nameSurname:initialCapital]]
[==:var.zFullName:[var.zGivenName:append: :append:[var.zSurname]]]

# Others

[==:var.zFactYear:[Event Date:dateYear]]

<
[?:Event/^B/][==:var.zEvent:Burial][==:Event:Burial]
|
[?:Event/^C/][==:var.zEvent:Cremation][==:Event:Cremation]
|
[lib.ErrorMessage:InitVars - Invalid event type]
>

<[Newspaper][lib.ValidateInputField:Newspaper]>

<[Event Location][lib.ValidatePlace:Event Location]>

<
[?:Update Death/^a/][==:var.zUpdateDeath:A][==:Update Death:Add]
|
[?:Update Death/^u/][==:var.zUpdateDeath:U][==:Update Death:Update]
|
[?:Update Death/^a/][==:var.zUpdateDeath:N][==:Update Death:None]
|
[lib.ErrorMessage:InitVars - Invalid Update Death]
>


# End of HostName Funeral Notices

# ..Else1 - Host check
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Leicester University
[?:Page.HostName=specialcollections.le.ac.uk]


# General
[==:var.zGivenName:[Name:nameGiven]]
[==:var.zSurname:[Name:nameSurname]]
[==:var.zFullName:[Name]]

# Trade Directory------------------------------------------------------------------
<
[?:var.zRecordType=Trade Directory]
[==:var.zFactYear:[Publication Year]]
>


# End of HostName Leicester University

#### ..Else1 - Host check
###|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Scotlands People
###[?:Page.HostName=scotlandspeople.co.uk]
###
#### End of HostName Scotlands People

|

# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++The National Archives
[?:Page.HostName=discovery.nationalarchives.gov.uk]


# End of HostName The National Archives

|
# ..Else1 - Host check

# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Invalid Host Name
# Error - Invalid Host Name=====================================================
[lib.ErrorMessage:InitVars-GENERIC - Host Name Error]
# .End1
>




#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

#[=:End:InitVars_GENERIC]

InitVars_GRO

# Usage: [lib.InitVars_GRO]

# Change History  Reason for change
# --------------  ----------------------------------------------------
# 06/02/2024      Check if [Mother's Maiden Surname] is empty ie. Shows "-" only.
# 04/04/2024      From ??? Age at Death has been replace with Birth Year.
# 07/04/2024      Commented out [lib.GetGender] because it is called by [lib.GetCivilReg]

# Based on Record Type set up variables

#----------------------------------------------------------General
[==:var.zSurname:[Surname]]
[==:var.zGivenName:[GivenName]]
[==:var.zFullname:[var.zGivenName:append: :append:[var.zSurname]]]
[==:var.zFactYear:[Registration Year]]
[==:var.zRegYear:[var.zFactYear]]
[==:var.zCollectionID:[Collection ID]]
[==:var.zCollectionName:[Collection Name]]
[==:var.zRecordNo:]
##<[?:var.zGivenName][lib.GetGender:var.zGivenName]>


# Start of record type checks
<
#----------------------------------------------------------Birth
[?:var.zRecordType=GRO Birth]
[==:var.zFactType:Birth]
[lib.GetCivilReg:Birth]
[==:var.zMothersMaidenName:[Mother's Maiden Surname]]
<[?:var.zMothersMaidenName/^-/][==:var.zNameSuffix:][==:var.zMothersMaidenName:]
|[==:var.zNameSuffix:[Mother's Maiden Surname:uppercase:prepend: - mother ]]>

|
#----------------------------------------------------------Death
[?:var.zRecordType=GRO Death]
[==:var.zFactType:Death]
[lib.GetCivilReg:Death]

<
[?:Age at Death][==:var.zAgeAtDeath:[Age at Death]]
|
[?:Birth Year][==:var.zAgeAtDeath:[Death Year:dateYear::mathSubtract:[Birth Year:dateYear]]]
>



[==:var.zNameSuffix:[var.zAgeAtDeath:prepend: - age ]]

|
#----------------------------------------------------------Error - no valid record type

[lib.ErrorMessage:GRO error - no valid record type]

# End of Record Type checking
>

InitVars_Newspapers

#[=:Start:InitVars_GENERIC]
# Author: Alan
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.

# Version Date        Reason for change
# ------------        -----------------------------------------------------------
# 13/06/2024 BETA7_8  *NEW* BNA - updated method to handle a multiple name field

# Usage: [lib.InitVars_Newspapers]
# Called by: 
# Calls: none



#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



[==:var.Debug:1]


# ----------------------------------------------------------------------General

[==:var.zNewspaper:[Paper]]
[==:var.zFactYear:[Event Date:dateYear]]
[==:var.zPublication:[Date]]

[lib.InitVars_GENERIC]


#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

#[=:End:InitVars_Newspapers]

InitVars_Trove

#[=:Start:InitVars_Trove]
# Author: Alan
# Description: Trove is the place to explore all things Australian.
#              Only [Page.Hostname] appears to be "articles".

# Version Date         Reason for change
# ------------         -----------------------------------------------------------
# 01/07/2024 BETA8     Initial creation - *new* Service.


# Usage: [lib.InitVars_Trove]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [z_FactType]
# Input Variables:
#      [zRecordType] - this field was previously [z_FactType]
#      [zFactType] is still needed for Ancestral Sources - Birth, Baptism, Death, Burial, Census
#      [Page.ServiceName]
# Called by: 
# Calls: none



#========= Splits the services
#--------- Splits the source types
#+++++++++ Splits Generic sites



[==:var.Debug:1]


# ============================================================================Trove

# General
[lib.GetNewspaperEvent]

# If event type = Marriage then name will appear as George Marsden Bayley & Anna Mary Woollam
# If event type <> Marriage then check for "&" in case event is an anniversary then 
#                               name will appear as George Marsden Bayley & Anna Mary Woollam

[==:var.zParts:[Name:splitcount: & ]]

<
[?:var.zParts>2][lib.ErrorMessage:InitVars_Gen - More than 2 names]
|
[?:var.zParts>1]
[==:var.zSpouseName:[Name:split:&:2]]
[=:Name:[Name:split:&:1]]
[==:var.zSpouseGiven:[var.zSpouseName:nameGiven:capitalize]]
[==:var.zSpouseSurname:[var.zSpouseName:nameSurname:capitalize]]
>

[==:var.zGivenName:[Name:nameGiven:capitalize]]
[==:var.zSurname:[Name:nameSurname:capitalize]]


[lib.GetNewsType]

[lib.ValidateInputField:Event]
[==:var.zEvent:[Event]]
[==:var.zEventType:[Event]]

# Publication Date
<
[?:Publication Date]
[==:var.zPublicationDate:[Publication Date]]
|
[?:Publication.Date]
[==:var.zPublicationDate:[Publication.Date]]
|
[?:Date][==:var.zPublicationDate:[Date]]
>

# Event Date

[==:var.zEventDate:[Event Date]]

<
[?:Event Date][==:var.zFactYear:[Event Date:dateYear]]
|
[?:Year][==:var.zFactYear:[Year]]
|
[?:Death Date][==:var.zFactYear:[Death Date:dateYear]]
>

[lib.ValidateInputField:Newspaper Text]

# Newspaper
<
[?:Newspaper][==:var.zNewspaper:[Newspaper]]
|
[?:Paper][==:var.zNewspaper:[Paper]]
|
[?:Publication title][==:var.zNewspaper:[Publication title]]
>
# End of Trove






#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

#[=:End:InitVars_Trove]

InsertTextfromSource

#[=:Start:InsertTextfromSource]

# Author: Alan
#
# Change History      Reason For Change
# --------------      ----------------------------------------------
# 12 Aug 2023         Initial creation
# 12 Sep 2023         New AutoText source introduced - "Cemetery"
# 17/10/2023 1.0      Conversion of persistent variables into variances.
# 13/06/2024 BETA7_8  Added new TfS type - Newspaper
# 26/06/2024 BETA7_12 New record type "Funeral Notice"
# 01/07/2024 BETA7_18 Check for existence of "nk" in field [var.zDeathPlace].

# Usage: [lib.InsertTextfromSource:Custom Template Parameter Name]
# ...Births, Deaths, Marriages, Census, Newspaper, Other, Photos, Grave

# Parameters: Text Source Template
#             {1} (Probate, Funeral, Generic, Grave, Letter, Banns, Newspaper, 
#                    Prison, School, Wills)


# Input variables:
#    None
#
# Called by: [lib.Find-a-Grave]
#            [lib.Newspaper_BNA]
#            [lib.Newspaper_FMP]
#            [lib.Probate]
#





# Execution speed
#{fast}

# Set value assigment based on parameter 1
[=:zTextFromSource:{1}]

# Add Text from Source
{Ctrl+I}{DOWN}{Right}

# Select Custom from Group Text templates
<
#---------------------------------------------------------------------Census
# UK Census Text Sources
[?:zTextFromSource=Census]
{DOWN*2}{Right}
<
[?:Source.Year=1841]{ENTER}|
[?:Source.Year=1851]{DOWN}{ENTER}|
[?:Source.Year=1861]{DOWN*2}{ENTER}|
[?:Source.Year=1871]{DOWN*3}{ENTER}|
[?:Source.Year=1881]{DOWN*4}{ENTER}|
[?:Source.Year=1891]{DOWN*5}{ENTER}|
[?:Source.Year=1901]{DOWN*6}{ENTER}|
[?:Source.Year=1911]{DOWN*7}{ENTER}|
[?:Source.Year=1921]{DOWN*8}{ENTER}
>

|
#---------------------------------------------------------------------Custom
# Custom Text Sources
{DOWN}{Right}


#     Autotext Template                 Down    Parameter
#     -------------------------------   ----    -------------
#     Cemetery                          Enter   Cemetery
#     Employment                            1   Employment
#     Funeral Notice                        2   Funeral Notice
#     Generic Event                         3   Generic
#     Grave                                 4   Grave
#     Letter                                5   Letter
#     Marriage Banns                        6   Banns
#     Military                              7   Military
#     Newspaper                             8   Newspaper
#     Prison Record                         9   Prison
#     Probate - England and Wales          10   Probate
#     School Admission                     11   School
#     Service Attestation                  12   Service Attestation
#     Service History                      13   Service History
#     Travel & Immigration                 14   Travel
#     Wills                                16   Wills


<
# Start of Custom Autotext selection
#---------------------------------------------------------------------Cemetery
[?:zTextFromSource=Cemetery][lib.InsertTfS_pos]

#---------------------------------------------------------------------Employment
|[?:zTextFromSource=Employment][lib.InsertTfS_pos]

#---------------------------------------------------------------------Funeral Notice
|
[?:zTextFromSource=Funeral Notice][lib.InsertTfS_pos]
{1000}
{DOWN*2}{TAB}[var.zFullName]
{TAB*2}[Death Date]
{TAB*2}[Date Published]
{TAB*2}[Newspaper]
{TAB*2}[Event Date]
{TAB*2}[Event Location]
{TAB*2}[URL]
{TAB*2}[Obituary Text]

#---------------------------------------------------------------------Generic
|[?:zTextFromSource=Generic][lib.InsertTfS_pos]

#---------------------------------------------------------------------Grave
|[?:zTextFromSource=Grave][lib.InsertTfS_pos]

#---------------------------------------------------------------------Letter
|[?:zTextFromSource=Letter][lib.InsertTfS_pos]

#---------------------------------------------------------------------Marriage Banns
|[?:zTextFromSource=Banns][lib.InsertTfS_pos]

#---------------------------------------------------------------------Military
|[?:zTextFromSource=Military][lib.InsertTfS_pos]

#---------------------------------------------------------------------Newspaper
|
[?:zTextFromSource=Newspaper][lib.InsertTfS_pos]
{1000}
{DOWN*3}{TAB}[var.zNewspaper]
{TAB*2}[var.zPublicationDate]
{TAB*2}<[?:Newspaper Text=nk]|[Newspaper Text]>
{TAB*2}

#---------------------------------------------------------------------Prison
|[?:zTextFromSource=Prison][lib.InsertTfS_pos]

#---------------------------------------------------------------------Probate
|
[?:zTextFromSource=Probate][lib.InsertTfS_pos]
{1000}
{DOWN*3}
<[?:Probate Text!=nk][Probate Text]>
{ENTER*2}
{TAB*2}
[var.zGivenName] [var.zSurname]{TAB*2}
<[var.zDeathDate]>{TAB*2}
<[?:var.zDeathPlace!=nk][var.zDeathPlace]>{TAB*2}
<[?:var.zResidencePlace!=nk][var.zResidencePlace]>{TAB*2}
[var.zProbateDate]{TAB*2}
<[var.zProbateRegistry]>

#---------------------------------------------------------------------School
|[?:zTextFromSource=School][lib.InsertTfS_pos]

#---------------------------------------------------------------------Service Attestation
|[?:zTextFromSource=Service Attestation][lib.InsertTfS_pos]

#---------------------------------------------------------------------Service History
|[?:zTextFromSource=Service History][lib.InsertTfS_pos]

#---------------------------------------------------------------------Travel
|[?:zTextFromSource=Travel][lib.InsertTfS_pos]

#---------------------------------------------------------------------Will
|[?:zTextFromSource=Will][lib.InsertTfS_pos]

#---------------------------------------------------------------------Error
|
[lib.ErrorMessage:InsertTfS - invalid Tfs]
# End of Custom Autotext selection
>

# End of Group Text templates
>

# Close Text From Source window
# FH fault as control passes back to the main window and not the source citation.
#######{Alt+A} --> Apply
#######{Alt+C} --> Cancel
# OK
{Alt+O}

# Reset position to correct tab due to FH fault
#{Alt+V}{DOWN*12}{ENTER}
#---------------------------------------------------------------------Census
<[?:zTextFromSource|=Census]
{Alt+A}{DOWN*7}{Right}{DOWN*2}{ENTER}{Ctrl+D}[var.zSourceCitation]{F6}{Space}{ENTER}>


#[=:End:InsertTextfromSource]

InsertTfS_pos

#[=:Start:InsertTfS_pos]

# Author: Alan
# Description: This controls the selection of Custom Autotext templates.

# Usage: [lib.InsertTfS_pos]

# 
# Change History      Reason For Change
# --------------      ----------------------------------------------
# 26/06/2024 BETA7_12 New record type "Funeral Notice"


#     Autotext Template                 Down    Parameter
#     -------------------------------   ----    -------------
#     Cemetery                          Enter   Cemetery
#     Employment                            1   Employment
#     Funeral Notice                        2   Funeral Notice
#     Generic Event                         3   Generic
#     Grave                                 4   Grave
#     Letter                                5   Letter
#     Marriage Banns                        6   Banns
#     Military                              7   Military
#     Newspaper                             8   Newspaper
#     Prison Record                         9   Prison
#     Probate - England and Wales          10   Probate
#     School Admission                     11   School
#     Service Attestation                  12   Service Attestation
#     Service History                      13   Service History
#     Travel & Immigration                 14   Travel
#     Wills                                16   Wills

#[=:pos:1]
#{Down*[pos]}

<
[?:zTextFromSource=Cemetery]
|[?:zTextFromSource=Employment]{DOWN}
|[?:zTextFromSource=Funeral Notice]{DOWN*2}
|[?:zTextFromSource=Generic]{DOWN*3}
|[?:zTextFromSource=Grave]{DOWN*4}
|[?:zTextFromSource=Letter]{DOWN*5}
|[?:zTextFromSource=Banns]{DOWN*6}
|[?:zTextFromSource=Military]{DOWN*7}
|[?:zTextFromSource=Newspaper]{DOWN*8}
|[?:zTextFromSource=Prison]{DOWN*9}
|[?:zTextFromSource=Probate]{DOWN*10}
|[?:zTextFromSource=School]{DOWN*11}
|[?:zTextFromSource=Service Attestation]{DOWN*12}
|[?:zTextFromSource=Service History]{DOWN*13}
|[?:zTextFromSource=Travel]{DOWN*14}
|[?:zTextFromSource=Will]{DOWN*15}
[lib.ErrorMessage:InsertTfS - invalid parameter]
>
{ENTER}


#[=:End:InsertTfS_pos]

InstructionsBanns

[=:Start:InstructionsBanns]
# Usage: [lib.InstructionsBanns]

# Change History      Reason for change
# --------------      -------------------------------------------------------------------------
# 08/02/2024          Added [lib.ErrorMessageDisplay]
# 12/07/2024 BETA8_4  Added AT1 and AT2 options.

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Change Banns Date to 3rd reading date.\</li\>
\<li\>Fill in marriage date, if known.\</li\>
\<li\>Ensure media images has been saved.\</li\>
\</ul\>
\</span\>

\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add citation only.\<BR\>
\<span style="color:Red"\>
AT2 - Add fact with citation\<BR\>
\<span style="color:Green"\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsBanns]

InstructionsBaptism

[=:Start:InstructionsBaptism]
# Author: Alan
# Description: Instructions on how to use the templates.

# Change history    Reason for change
# --------------    -----------------------------------------------------------------------
# 30/07/2023        Creation Date.
# 29/02/2024        Removed lines that were copied from [lib.InstructionsMarriage].

# Usage: [lib.InstructionsBaptism]
#

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check address - place fields.\</li\>
\<li\>Fill in fields marked ***Enter oe enter NK\</li\>
\<li\>Save image before start (it's quicker)\</li\>




[lib.ErrorMessageDisplay]

[=:End:InstructionsBaptism]

InstructionsBillionGraves

[=:Start:InstructionsBillionGraves]
# Author: Alan
# Description: Instructions on how to use the templates.
# 
# Change History     Reason for change
# --------------     -------------------------------------------------------------------------
# 11/09/2023         Initial creation
# 08/02/2024         Added [lib.ErrorMessageDisplay]

# Usage: [lib.InstructionsBillionGraves:FH/WIP]
#



[=:InstructionSource:{1}]


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check address - place fields.\</li\>
\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
#\<li\>AT1 - Ensure focus is on birth fact\</li\>
#\<li\>AT2 - Ensure focus is on a fact\</li\>
\</ul\>
\</span\>


<
[?:InstructionSource=FH]
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
See AutoType legend for instructions.\<BR\>
\</span\>

|
[?:InstructionSource=WIP]
\<span style="color:Fuchsia;font-size: 100%;font-weight: bold"\>
INCOMPLETE - WORK IN PROGRESS.\<BR\>
\</span\>

|


\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
#AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
#AT2 - Add Baptism Details.\<BR\>
\<span style="color:Green"\>
#AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
#AT4 - Get Image\<BR\>
\<span style="color:Black"\>
#AT5 - Get AutoText\<BR\>
\</span\>

>

[lib.ErrorMessageDisplay]

[=:End:InstructionsBillionGraves]

InstructionsBirth

[=:Start:InstructionsBirth]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 11 Sep 2023
# Usage: [lib.InstructionsBirth:FH/WIP]
#



[=:InstructionSource:{1}]


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check address - place fields.\</li\>
\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\<li\>AT1 - Ensure focus is on birth fact\</li\>
\<li\>AT2 - Ensure focus is on a fact\</li\>
\</ul\>
\</span\>


<
[?:InstructionSource=FH]
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
See AutoType legend for instructions.\<BR\>
\</span\>

|
[?:InstructionSource=WIP]
\<span style="color:Fuchsia;font-size: 100%;font-weight: bold"\>
INCOMPLETE - WORK IN PROGRESS.\<BR\>
\</span\>

|


\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Baptism Details.\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\</span\>

>

[lib.ErrorMessageDisplay]

[=:End:InstructionsBirth]

InstructionsBurial

[=:Start:InstructionsBurial]
# Author: Alan
# Description: Instructions on how to use the templates.

# Change History     Reason for change
# --------------     -------------------------------------------------------------------
# 08/09/2023         Initial Creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.

# Usage: [lib.InstructionsBurial]
#
[=:InstructionSource:{1}]

[lib.SetSourceTypeConflicts]

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>

<
[?:z_SourceType=Cemetery]
\<span style="color:Fuchsia;font-size: 120%;font-weight: bold"\>
\<BR\>
\<li\>C E M E T E R Y\</li\>
\</span\>
>

\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Place fields must have town/city, county and country.\</li\>
\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
<[?:z_SourceType=Cemetery]\<li\>Put focus on a fact\</li\>>
\</ul\>
\</span\>

<
[?:InstructionSource=FH]
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
See AutoType legend for instructions.\<BR\>
\</span\>

|

[?:z_SourceType=Cemetery]
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT6 - Add citation to burial fact into FH\<BR\>
\<span style="color:Red"\>
AT7 - Add burial with citation into FH\<BR\>
\<span style="color:Red"\>
\</span\>

|
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Death Details.\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\<span style="color:Red"\>
AT6 - Run ATT 2 - 5\<BR\>
\<span style="color:Green"\>
AT7 - Prompt for all input fields\<BR\>

\</span\>
>

[lib.ErrorMessageDisplay]

[=:End:InstructionsBurial]

InstructionsCensus

[=:Start:InstructionsCensus]
# Author: Alan
# Description: Instructions on how to use the templates.
#
# Usage: [lib.InstructionsCensus]
#
# Change History     Reason for change
# --------------     -----------------
# 22/07/2023         Initial.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>If using AT7 then do AT1-AT4, fill census grid, copy clipboard, AT7, AT5.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Census Details\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\<span style="color:Fuchsia"\>
AT6 - Run AT2 - AT5\<BR\>
\<span style="color:Red"\>
AT7 - Add Census Person\<BR\>
\</span\>

[lib.ErrorMessageDisplay]


[=:End:InstructionsCensus]

InstructionsCivilReg


# Author: Alan
# Description: Instructions on how to use the templates.

# Change History      Reason for change
# -----------------   -------------------------------------------------------------------
# 30/07/2023          Creation.
# 17/09/2023  08:40   Gender check was causing too many annoying displays - new [z_ErrorMessage].
#                     Message to be displayed [lib.InstructionsCivilReg].
# 07/02/2024          Made marriage lines for spouse conditional.

# Usage: [lib.InstructionsCivilReg:Birth/Marriage/Death]
#
[=:CivilRegType:{1}]
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on {1} fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
<[?:CivilRegType=Marriage]
<[?:Page.ServiceName=Ancestry]\<li\>Update spouse in Other Records (ANC)\</li\>>
<[?:Page.ServiceName=Findmypast]\<li\>Update spouse in MarriageFinder™ (FMP)\</li\>>
>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing {1}.\<BR\>
\<span style="color:Green"\>
AT2 - Add {1} fact with citation\<BR\>
\</span\>

# Error display area
<
[?:CivilRegType=Marriage]
<
[?:Page.ServiceName/Ancestry|Findmypast/]
<[?:var.zGender=F][lib.ErrorMessage:Marriage error - Start with groom]>
>
>

[lib.ErrorMessageDisplay]


InstructionsDeath

[=:Start:InstructionsDeath]
# Author: Alan
# Description: Instructions on how to use the templates.

# Change History     Reason for change
# --------------     -------------------------------------------------------------------------
# 05/08/2023         Initial creation
# 08/02/2024         Added [lib.ErrorMessageDisplay]

# Usage: [lib.InstructionsDeath]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check address - place fields.\</li\>
\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Death Details.\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\</span\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsDeath]

InstructionsDeceasedOnline

# Author: Alan
# Description: Instructions on how to use Deceased Online.
#              This site requires a paid subscription.
#              Ancestry collection name:  Web: UK, Burial and Cremation Index, 1576-2014

# Change History        Reason for change
# --------------        -------------------------------------------------------------------
# 11/06/2024 BETA6_4    Initial Creation

# Usage: [lib.InstructionsDeceasedOnline]
#
[=:InstructionSource:{1}]

[lib.SetSourceTypeConflicts]

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>


\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>This is a paid subscription site.\</li\>
\<li\>Currently BB does not support entirely.\</li\>
\<li\>No image available.\</li\>
\<li\>Put focus on a fact\</li\>
\<li\>Capture of DeceasedOnline URL is manual\</li\>
\</ul\>
\</span\>


\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add fact without citation.\<BR\>

\</span\>


[lib.ErrorMessageDisplay]


InstructionsElectoralRegister

[=:Start:InstructionsElectoralRegister]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 02 Aug 2023
# Usage: [lib.InstructionsElectoralRegister]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Consolidate address into place.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Census Details - put cursor on PLACE.\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\</span\>

[lib.ErrorMessageDisplay]


[=:End:InstructionsElectoralRegister]

InstructionsFamilyTreePerson

#[=:Start:InstructionsFamilyTreePerson]
# Author: Alan
# Description: Instructions on how to use the Family Tree Person collection.

# Usage: [lib.InstructionsFamilyTreePerson]

# Change History       Reason for change
# --------------       ---------------------------------------------------------------
# 28/06/2024 BETA7_13  Initial creation.
# 03/07/2024 BETA7_21  Remove [lib.SetAncestryImportFlag].

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
Family Tree Person READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
\<li\>Put FH focus on Individual name and in Ancestry select profile relating to the Autotype action\</li\>
\<li\>\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
Autotype 1 Add Father\</br\>\</span\>
\<span style="color:Green"\>
Autotype 2 Add Mother (father exists)\</br\>\</span\>
\<span style="color:Blue"\>
Autotype 3 Add Spouse\</br\>\</span\>
\<span style="color:Red"\>
Autotype 4 Add a Child\</br\>\</span\>
\<span style="color:Green"\>
Autotype 5 Add Birth + death only\</br\>\</span\>
\<span style="color:Blue"\>
Autotype 6 Add Mother (no parents)\</br\>\</span\>
\<span style="color:Red"\>
Autotype 7 Add Father (mother exists)\</br\>\</br\>\</span\>
\<span style="color:Black;background-color:White"\>
SWITCH ON Auto Source Citation for Import with Ancestry Medows-Lambert tree BEFORE STARTING.\</br\>\</span\>

[==:var.zErrorMessage:]
[==:var.zErrorMessageCount:]
[lib.GetGender:Name]

[lib.ErrorMessageDisplay]

#[=:End:InstructionsFamilyTreePerson]

InstructionsFreeBMD


# Author: Alan
# Description: Instructions on how to use the templates.

# Change History      Reason for change
# -----------------   -------------------------------------------------------------------
# 16/06/2024 BETA7    Creation.

# Usage: [lib.InstructionsFreeBMD:Birth/Marriage/Death]
#
[=:CivilRegType:{1}]
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on {1} fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
<[?:CivilRegType=Marriage]
\<li\>Update spouse name\</li\>
>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing {1}.\<BR\>
\<span style="color:Green"\>
AT2 - Add {1} fact with citation\<BR\>
\</span\>

# Error display area
<
[?:CivilRegType=Marriage]
<[?:var.zGender=F][lib.ErrorMessage:Marriage error - Start with groom]>
>

[lib.ErrorMessageDisplay]


InstructionsFuneralNotice


# Author: Alan
# Description: Instructions on how to use the templates.
#
# Change History         Reason for change
# ------------------     ------------------------------------------------------------------
# 26/06/2024             Initial creation
#              
#
# Usage: [lib.InstructionsFuneralNotice]
#


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>AT3 - Put focus on Fact or Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing fact.\<BR\>
\<span style="color:Green"\>
AT2 - Add event fact with citation\<BR\>
\<span style="color:Red"\>
AT3 - Add death details\<BR\>


[lib.ErrorMessageDisplay]

InstructionsGravestone

[=:Start:InstructionsGravestone]
# Author: Alan
# Description: Instructions on how to use the templates.

# Change History     Reason for change
# --------------     -------------------------------------------------------------------------
# 05/08/2023         Initial creation.
# 08/02/2024         Added [lib.ErrorMessageDisplay]

# Usage: [lib.InstructionsGravestone]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Place focus on appropriate FH fact.\</li\>
\<li\>Check Burial Place address.\</li\>
#\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\<li\>Update Text from Source once citation completed.\</li\>
\<li\>Update Quality Assessment once citation completed.\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add citation to existing burial fact.\<BR\>
\<span style="color:Red"\>
AT2 - Add burial fact with citation.\<BR\>
\</span\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsGravestone]

InstructionsGRO


# Author: Alan
# Description: Instructions on how to use the templates.
#
# Change History         Reason for change
# 16/09/2023             Initial creation
#              
#
# Usage: [lib.InstructionsGRO:Birth/Death]
#


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on {1} fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing fact.\<BR\>
\<span style="color:Green"\>
AT2 - Add fact with citation\<BR\>


[lib.ErrorMessageDisplay]

InstructionsMarriage


# Author: Alan
# Description: Instructions on how to use the templates.

# Change History     Reason for change
# --------------     -----------------------------------------------------------------------
# 27/07/2023         Initial Creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 12/05/2024 BETA4   Check for TRX record type (Transcription only)


# Usage: [lib.InstructionsMarriage]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>

[=:Param1:{1}]

<
# Start of TRX check
[?:Param1!=TRX]

\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check address.\</li\>
\<li\>Witnesses must be entered manually.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>


\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Find ID.\<BR\>
\<span style="color:Red"\>
AT2 - Add Marriage Details\<BR\>
\<span style="color:Green"\>
AT3 - Update "Edit Templated Source"\<BR\>
\<span style="color:Blue"\>
AT4 - Get Image\<BR\>
\<span style="color:Black"\>
AT5 - Get AutoText\<BR\>
\<span style="color:Red"\>
AT6 - Run ATT 2 - 5\<BR\>
\<span style="color:Green"\>
AT7 - Prompt for all input fields\<BR\>
\</span\>


|
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add citation only.\<BR\>
\<span style="color:Red"\>
AT2 - Add fact with citation\<BR\>
\<span style="color:Green"\>

# End of TRX check
>

[lib.ErrorMessageDisplay]

InstructionsNewspaper

[=:Start:InstructionsNewspaper]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 29 Aug 2023
# Usage: [lib.InstructionsNewspaper]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Put focus on a fact\</li\>
\<li\>Fill in fields marked ***Enter\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\<li\>Update Text from Source once citation completed.\</li\>
\<li\>Update Quality Assessment once citation completed.\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add source citation to existing fact.\<BR\>
\</span\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsNewspaper]

InstructionsProbate

[=:Start:InstructionsProbate]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 1 Sep 2023
# Usage: [lib.InstructionsProbate]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Best to use Findmypast.\</li\>
\<li\>Check address - place fields.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\<li\>On completion fill in Text from Source tab\</li\>
\<li\>Put focus on a fact or facts tab\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 100%;font-weight: bold"\>
AT1 - Add probate fact with citation.\<BR\>
\<span style="color:Red"\>
AT2 - Add death fact with probate citation.\<BR\>
\<span style="color:Green"\>
AT3 - Add residence fact with probate citation\<BR\>
\</span\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsProbate]

InstructionsSchool


# Author: Alan
# Description: Instructions on how to use the templates.
#
# Change History         Reason for change
# ------------------     ------------------------------------------------------------------
# 1/06/2024              Initial creation
#              
#
# Usage: [lib.InstructionsSchool]
#


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing fact.\<BR\>
\<span style="color:Green"\>
AT2 - Add fact with citation\<BR\>


[lib.ErrorMessageDisplay]

InstructionsServices

[=:Start:InstructionsServices]
# Author: Alan
# Description: Instructions on how to use the templates.

# Change History     Reason for change
# --------------     -----------------------------------------------------------------------
# 24/02/2024         Initial Creation


# Usage: [lib.InstructionsServices]
#
\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>Check Service No.\</li\>
\<li\>Check address.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Fuchsia;font-size: 80%;font-weight: bold"\>
AT1 - Add fact & create citation & create history citation\<BR\>
\<span style="color:Red"\>
AT2 - Update fact with new citation\<BR\>
\<span style="color:Green"\>
AT3 - Update history citation\<BR\>
\<span style="color:Blue"\>
AT4 - W.I.P.\<BR\>
\<span style="color:Black"\>
AT5 - W.I.P.\<BR\>
\<span style="color:Red"\>
AT6 - W.I.P.\<BR\>
\<span style="color:Green"\>
AT7 - W.I.P.\<BR\>
\</span\>

[lib.ErrorMessageDisplay]

[=:End:InstructionsServices]

InstructionsUKBMD


# Author: Alan
# Description: Instructions on how to use the templates for UKBMD.
#              NB. It is not possible to preempt whether its Birth, Marriage or Death as it depends
#                  on the type of selection that is used.

# Change History      Reason for change
# -----------------   -------------------------------------------------------------------
# 318/05/2024 BETA4   Creation.

# Usage: [lib.InstructionsUKBMD]
#

[lib.UKBMD_Type]

\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
#\<li\>AT1 - Put focus on [BMD Type] fact.\</li\>
#\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing [BMD Type].\<BR\>
\<span style="color:Green"\>
AT2 - Add [BMD Type] fact with citation\<BR\>
\</span\>

# Error display area
[lib.ErrorMessageDisplay]


InstructionsWorkhouse


# Author: Alan
# Description: Instructions on how to use the templates.
#
# Change History         Reason for change
# ------------------     ------------------------------------------------------------------
# 15/06/2024 BETA6_9     Initial creation
#              
#
# Usage: [lib.InstructionsWorkhouse]
#


\<ul style=“list-style-type:square”\>
\<span style="color:Black;font-size: 100%;font-weight: bold"\>
WORKHOUSE READ ME FIRST\<BR\>
\</span\>
\<span style="color:Black;font-size: 80%;font-weight: bold"\>
\<li\>AT1 - Put focus on fact.\</li\>
\<li\>AT2 - Put focus on Facts tab.\</li\>
\<li\>Save image before start (it's quicker)\</li\>
\</ul\>
\</span\>
\<span style="color:Red"\>
AT1 - Add citation to existing fact.\<BR\>
\<span style="color:Green"\>
AT2 - Add fact with citation\<BR\>


[lib.ErrorMessageDisplay]

Newspaper_BMD

[=:Start:Newspaper_BMD]
#
# Author: Alan
# 
# Description: Create citation only for newspaper from British Newspaper Archive.
# Usage: [lib.Newspaper_BNA_v2]
#
# Change History     Reason for change
# --------------     ----------------------------------------------------------------------
# 29/09/2023         Initial Creation
# 20/11/2023         Changed sequence of tabs processed - Citation, Media. Text from Source
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
# 21/05/2024 BETA6   {TAB} after Repository needed.
# 12/06/2024 BETA7   Source Template "Newspaper" Item updates to remove field [Pages_etc].

[=:Debug:1]

# Execution speed
{slow}
#
# Add citation============================================================
[lib.Add_FH_Citation:Newspaper Item]

<[Newspaper]|[Paper]>{TAB}
#[lib.SetNewsItemType:News Item Type]
[var.zNewsItemType]{TAB}

#[lib.SetNewsAnnounceType:News Announcement Type]
[var.zEvent]{TAB}

# Publication Issue date
<[Date]|[Publication Date:split: :2] [Publication Date:split: :3] [Publication Date:split: :4]>{tab}

# Page
[Page]{TAB}

# Column
[Column]{TAB}

# Event Date
<[?:Event Date=nk][=:Event Date:]|[Event Date]>
{TAB}

# Pricipal 1 & Pricipal 2
<
[?:var.zParts>1]
[Name:split:&:1]
{TAB}
[Name:split:&:2]
{TAB}
|
[Name]
{TAB*2}
>

# Skip publisher and location
{TAB*2}

# Repository
[lib.SetRepository]{TAB}

# Collection
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Quality Assessment
[lib.SetAssessment:P]{TAB}



# Fix/workround due to problem with FH not returning back to correct tab when adding citation.
# Not needed now because putting in Media first and then Text from Source.
[lib.SetSourceCitation]


# Move to Media tab from Citation tab.
{Ctrl+TAB*3}

{slow}

# Insert media, if any...
[lib.GetMedia]

# Move back to Text from Source tab from Media tab
{Shift+Ctrl+TAB*2}

# Insert Text from Source template.
[lib.InsertTextfromSource:Newspaper]



#***********
<[?:Debug=0]
#***********


## Do Nothing
>
[=:End:Newspaper_BMD]

Newspaper_BNA_v2

[=:Start:Newspaper_BNA_v2]
#
# Author: Alan
# 
# Description: Create citation only for newspaper from British Newspaper Archive.
# Usage: [lib.Newspaper_BNA_v2]
#
# Change History     Reason for change
# --------------     ----------------------------------------------------------------------
# 29/09/2023         Initial Creation
# 20/11/2023         Changed sequence of tabs processed - Citation, Media. Text from Source
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
# 21/05/2024 BETA6   {TAB} after Repository needed.
# 12/06/2024 BETA7   Source Template "Newspaper" Item updates to remove field [Pages_etc].

[=:Debug:1]

# Execution speed
{slow}
#
# Add citation============================================================
[lib.Add_FH_Citation:Newspaper Item]

[var.zNewspaper]{TAB}

[var.zNewsItemType]{TAB}

#[lib.SetNewsAnnounceType:News Announcement Type]
[var.zEvent]{TAB}

# Publication Issue date
[var.zPublicationDate]{TAB}

# Page
[Page]{TAB}

# Column
<[?:Column=nk]|[Column]>{TAB}

# Event Date
[var.zEventDate]{TAB}

# Pricipal 1
[var.zGivenName] [var.zSurname]{TAB}

# Pricipal 2
<[var.zSpouseGiven] [var.zSpouseSurname]>{TAB}

# Skip publisher and location
{TAB*2}

# Repository
[lib.SetRepository]{TAB}

# Collection
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Quality Assessment
[lib.SetAssessment:P]{TAB}



# Fix/workround due to problem with FH not returning back to correct tab when adding citation.
# Not needed now because putting in Media first and then Text from Source.
[lib.SetSourceCitation]


# Move to Media tab from Citation tab.
{Ctrl+TAB*3}

{slow}

# Insert media, if any...
[lib.GetMedia]

# Move back to Text from Source tab from Media tab
{Shift+Ctrl+TAB*2}

# Insert Text from Source template.
[lib.InsertTextfromSource:Newspaper]



#***********
<[?:Debug=0]
#***********


## Do Nothing
>
[=:End:Newspaper_BNA_v2]

Newspaper_FMP

[=:Start:Newspaper_FMP]
#
# Author: Alan
#
# Description: Create citation only for newspaper from British Newspaper Archive.
# Usage: [lib.Newspaper_FMP]
#
# Change History     Reason for change
# --------------     -----------------------------------------------------------------
# 29/09/2023         Initial Creation
# 20/09/2023         Changed [Newspaper] to [z_Newspaper] to facilitate the change to
#                    newspaper name to have the suffix "(FMP)" to distinguish from BNA.
# 21/11/2023         Changed [z_Newspaper] to [Newspaper] due to a problem.
#                    Changed sequence of processing tabs.
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
#

[=:Debug:1]

# Execution speed
{slow}
#
# Add citation============================================================
#[lib.Add_FH_Citation:Newspaper Item::Menu]
[lib.Add_FH_Citation:Newspaper Item]

[Newspaper]{tab}
[lib.SetNewsItemType:News Item Type]
[lib.SetNewsAnnounceType:News Announcement Type]
# Publication Issue date
<[?:Publication Date:splitCount: :=4]
[Publication Date:split: :2] [Publication Date:split: :3] [Publication Date:split: :4]
|[Publication Date:split: :1] [Publication Date:split: :2] [Publication Date:split: :3]
>
{tab}
# Page
[Page]{tab}
# Column
[Column]{tab}
# Event Date
<[?:Event Date=nk][=:Event Date:]|[Event Date]>
{tab}

# Pricipal 1 & Pricipal 2
<
[?:Event=Marriage]
[Name:split:&:1]
{tab}
[Name:split:&:2]
{Tab}
|
[Name]
{Tab*2}
>
# Skip publisher and location
{tab*2}
[lib.SetRepository]
# Collection
[Author]{tab}
# URL
<[URL]|[Page.URL]>{tab}
# Research Date
[Page.Access Date]{tab}
# Research Place
[Research Place]
# Quality Assessment
[lib.SetAssessment:P]



# Fix/workround due to problem with FH not returning back to correct tab when adding citation.
# Not used anymore.
[lib.SetSourceCitation]


# Move to Media tab from Citation tab.
{Ctrl+Tab*3}
{slow}


# Insert media, if any...
[lib.GetMedia]

# Move to Text from Source tab Media tab.
{Shift+Ctrl+Tab*2}

# Insert Text from Source template.
# There is a workaround included because after exiting from the Inserted Text, control passes
# back to the focus window and the source citations needs to be relocated. Error reported to
# Calico Pie who rejected it and re-reported as error on 15/09/2023 with ticket #325998
[lib.InsertTextfromSource:Newspaper]


#***********
<[?:Debug=0]
#***********


## Do Nothing
>

[=:End:Newspaper_FMP]

Probate

[=:Start:Probate]
#
# Created: 12/03/2023
# Author: Alan
# Version Date        Description Change
# ----------------    ---------------------------------------------------------
# 12/03/2023 xx:xx    First attempt
# 19/05/2023 10:30    Fixed folderpath issue.
#                     Introduced new SetWindowsUser library to make folder path flexible.
#                     Introduced new SetResearchPlace library so not continually prompter.
# 01/09/2023          Rewritten to handle Ancestry and Findmypast.
# 03/02/2024          Change [var.z_*] to [var.z*].
# 06/04/2024          Changed [lib.SetResearchPlace] to [Research Place].
# 27/07/2024 BETA9_4  Replaced [Page.ServiceName] with [SetRepository]{TAB}**FH FAULT**

#
# Collection: England & Wales Government Probate Death Index 1858-2019
#             Scotland, National Probate Index (Calendar of Confirmations and Inventories) 1876-1936
#
# Usage: [lib.Probate]
#
# Input variable : None
#
# Parameters : None
#

[==:var.Debug:1]


#Execute code at fastest speed
{slow}
# Add Probate fact.
{Ctrl+I}Probate{Enter}{Tab}



# Probate Date
[var.zProbateDate]{Tab}

# Probate Registry
[var.zProbateRegistry]{Enter}

# Validate Registry
#[lib.ValidatePlace:zRegistry]


# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# Cursor/focus must be in the Facts tab within the Property box of FH.

[lib.Add_FH_Citation:Probate England & Wales]

# Move focus to the Source pane.
#{Ctrl+U}

# Add "New Source from Template" citation.
#{Ctrl+I}{Down*2}{Enter}

# Select Source Template "Probate England & Wales".
#{Ctrl+D}Probate England & Wales{F6}{Space}{Enter}

#Execute code at this speed
{fast}

# Fill in source template "Probate England & Wales".

# Deceased name
[var.zGivenName] [var.zSurname]{Tab}

# Condition - bachelor, spinster, married, widow, widower
[Condition]{Tab}

# Maiden name
[Maiden name]{Tab}

# Probate Date
[var.zProbateDate]{Tab}

# Probate Registry
[var.zProbateRegistry]{Tab}

# Death Date
[var.zDeathDate]{Tab}

# Death Place
<[?:var.zDeathPlace=nk]|[lib.ValidatePlace:var.zDeathPlace][var.zDeathPlace]>
{Tab}

# Residence Place
<[?:=nk]|[lib.ValidatePlace:var.zResidencePlace][var.zResidencePlace]>
{Tab}

# URL
<[URL]|[Page.URL]>{Tab}

# Collection ID
[var.zCollectionID]{Tab}

# Collection Name
[var.zCollection]{Tab}

# Repository
[Page.ServiceName]{Tab}
#[lib.SetRepository]{TAB}

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]{Tab}

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]

#-------------------------------------------------Media Tab

# Fix/workround due to problem with FH not returning back to correct tab when adding citation.
# [lib.SetSourceCitation]
{Ctrl+Tab*3}

# Insert media, if any...
[lib.GetMedia]

#-------------------------------------------------Text from Source Tab
# Move to Text from Source tab from Media tab.
{Shift+Ctrl+Tab*2}


# Insert Text from Source template.
[lib.InsertTextfromSource:Probate]




#***********
<[?:var.Debug=0]
#***********

## Do nothing
>

[=:End:Probate]

School_Admission

#[=:Start:School_Admission]

# Usage: [lib.School_Admission]
#
# Author: Alan
# Version Date           Description Change
# ----------------       -------------------------------------------------------------------
# 10/05/2023 15:45       First attempt - add citation only
# 19/05/2023 10:30       Fixed folderpath issue.
#                        Introduced new SetWindowsUser library to make folder path flexible.
#                        Introduced new SetResearchPlace library so not continually prompter.
# 30/04/2024 BETA2_13    Changed [lib.SetResearchPlace] to [Research Place].
# 10/04/2024 BETA7_3     Include FACT paramter to add FACT and using var.z* fields.     
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}


# School
[var.zSchool]{TAB}

# Admission date
[var.zAdmissionDate]{TAB*2}

# School location
[var.zSchoolLocation]
{TAB*2}
<[Notes]>
{TAB}
>

# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:School Admission]


#Execute code at this speed
{FAST}

# Fill in source template...

# School Name (FMP - [School name]; ANC - [School])
[var.zSchool]{TAB}

# School Location
[var.zSchoolLocation]{TAB}

# Name
[var.zFullname]{TAB}

# Address
[var.zResidence]{TAB}

# Birth Date
[var.zBirthDate]{TAB}

# Admission No.
[var.zAdmissionNo]{TAB}

# Admission date
[var.zAdmissionDate]{TAB}

# Parent or Guardian --> This is the first names and not SURNAME (ANC - [Father]; FMP - )
[var.zParentGuardian]{TAB}

# Withdrawal date
{TAB}

# Withdrawal Reason
{TAB}

# Archive / Records Office (ANC - [Source.Part1]; FMP - [Archive])
[var.zArchive]{TAB}

# Archive Reference (ANC - [Source.Title]; FMP - 
[var.zArchiveReference]{TAB}

# Page Number
[var.zPage]{TAB}

# Collection (FMP - [Record set]; ANC - [Source.Title])
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Record ID
[var.zRecordID]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment
[lib.SetAssessment:P]{Tab}


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactFolder]
{ENTER}


<[?:var.Debug=0]
## DO NOTHING
>


#[=:End:School_Admission]

SCI_Birth

#
# Author: Alan
# Description: 
# Usage: [lib.SCI_Birth:Fact]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 20/03/2023 15:00   First attempt
# 28/03/2023 05:35   Year not appearing with insert file
# 01/04/2023 13:40   Fixed issue of Repository type filed not being selected
# 19/05/2023 10:30   Fixed folderpath issue.
#                    Introduced new SetWindowsUser library to make folder path flexible.
#                    Introduced new SetResearchPlace library so not continually prompter.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 30/03/2024         Added check for civil reg changeover from paper to digital online (1984)
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
#                    Replaced insert media section with [lib.SCI_Media].
# 07/04/2024         New fields and re-sequnced fields to handle post 1984 civil registration.
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add birth fact.
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{TAB*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFactType=Death]{TAB*3}|{TAB*2}>


# Add reference to Notes field and tab across to Source box
[lib.SetGRORefNote]
{tab}

>

# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:SCI Birth]


#Execute code at this speed
{FAST}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Mother's maiden name
<[var.zMothersMaidenName]>{TAB}

# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Quarter
[var.zCivilRegQtr]{TAB}

# Registration Month
[var.zCivilRegMonth]{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
[var.zCivilRegDistrictNumber]{TAB}

# Volume
[var.zVolume]{TAB}

# Page
[var.zPage]{TAB}

# Register Number
[var.zCivilRegisterNumber]{TAB}

# Registration Entry Number
[var.zCivilRegEntryNumber]{TAB}

# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No.
[var.zRecordNo]{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Research Qtr/Month
{TAB}

# No images for civil reg from 1984 as system was online.
[lib.SCI_Media]


<[?:var.Debug=0]

## Do nothing
>

SCI_Death

#
# Author: Alan
# Description: 
# Usage: [lib.SCI_Death:Fact]

# Parameters:        {1} = Fact --> create fact


# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 20/03/2023 15:00   First attempt
# 28/03/2023 05:35   Year not appearing with insert file
# 01/04/2023 13:40   Fixed issue of Repository type filed not being selected
# 19/05/2023 10:30   Fixed folderpath issue.
#                    Introduced new SetWindowsUser library to make folder path flexible.
#                    Introduced new SetResearchPlace library so not continually prompter.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 04/02/2024         New system parameter [var.ConfigSourceType] to use generic or templated source.
# 09/02/2024         Do not add notes on death fact - comment out [lib.SetGRORefNote]
# 29/02/2024         Register number and entry number introduced in 1990s to replace volume and page.
# 30/03/2024         Added check for civil reg changeover from paper to digital online (1984)
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
#                    Replaced insert media section with [lib.SCI_Media].
# 07/04/2024         New fields and resequenced fields.


[==:var.debug:1]


[=:p1.Fact:{1}]

# ===============Add Fact=============================================================

<
[?:p1.Fact=Fact]
# Add birth fact.
{Ctrl+I}[var.zFact]{Enter}
{Tab}

#Execute code at this speed
#{fast}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{Tab*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFact=Death]{tab*3}|{tab*2}>


# Add reference to Notes field and tab across to Source box
#[lib.SetGRORefNote]
{tab}

# End of Death fact insertion
>

# ===============Add Citation=============================================================

# Fill in generic source template "SCI Death".
<[?:var.ConfigSourceType=generic][lib.Add_FH_Citation:None][lib.WriteDeath]>

# Select Source Template.
[lib.Add_FH_Citation:SCI Death]


#Execute code at this speed
#{fast}



#Execute code at this speed
{fast}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Age at Death
<[var.zAgeAtDeath]>{TAB}

# Birth Date (introduced in 2nd Qtr of 1969)
<[var.zBirthDate]>{TAB}

# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Quarter
[var.zCivilRegQtr]{TAB}

# Registration Month (from 1984)
<[var.zCivilRegMonth]>{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
<[var.zVolume]>{TAB}
# Page
<[var.zPage]>{TAB}

# Register number and entry number introduced in 1984 to replace volume and page
<[var.zCivilRegisterNumber]>{TAB}
<[var.zCivilRegEntryNumber]>{TAB}


# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No.
[var.zRecordNo]{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}


# No images for civil reg from 1984 as system was online.
[lib.SCI_Media]


<[?:var.Debug=0]
## Do nothing
>

SCI_Marriage

#
# Author: Alan
# Description: 
# Usage: [lib.SCI_Marriage:Fact]
# Called by:
#      ANC, FMP
# Calls:
#      [lib.ErrorMessage]

# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 20/03/2023 15:00   First attempt
# 28/03/2023 05:35   Year not appearing with insert file
# 01/04/2023 13:40   Fixed issue of Repository type filed not being selected
# 19/05/2023 10:30   Fixed folderpath issue.
#                    Introduced new SetWindowsUser library to make folder path flexible.
#                    Introduced new SetResearchPlace library so not continually prompter.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 21/02/2024         Change [var.zFactType] to [var.zFact].
# 02/03/2024         (ANC) Check for [Spouse].
# 03/03/2024         Added {tab} after inserting groom's media file.
# 30/03/2024         Added check for civil reg changeover from paper to digital online (1984)
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
# 07/04/2024         New fields and re-sequenced fields for post 1984 civil registration changes.

[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================

<[?:Param1=Fact]


# Add birth fact.
{Ctrl+I}[var.zFact]{ENTER}


<
[?:var.zFact=Marriage]
<
[?:Wife number=1]|
[?:Wife number=2]{DOWN}|
[?:Wife number=3]{DOWN*2}|
[?:Wife number=4]{DOWN*3}|
[?:Wife number=5]{DOWN*4}
>
{ENTER}
>
{TAB}

#Execute code at this speed
#{FAST}

# Reg Qtr & Year
c. [var.zCivilRegQtr] [var.zCivilRegYear]
{TAB*2}

# Registration District
[var.zCivilRegDistrict]

# Extra tab required for cause of death.
<[?:var.zFactType=Death]{TAB*3}|{TAB*2}>


# Add reference to Notes field and tab across to Source box
[lib.SetGRORefNote]
{TAB}

>


# ===============Add Citation=============================================================

<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Generic source
[?:var.ConfigSourceType=Generic]

# Select Source Template.
[lib.Add_FH_Citation:None]

#Execute code at this speed
#{FAST}


# Fill in source template "SCI Marriage".
[lib.WriteMarriage]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Templated source

# Select Source Template.
[lib.Add_FH_Citation:SCI Marriage]


#Execute code at this speed
{SLOW}




# Following conditions added 7/7/2023
<[?:Records on Page]

<
[?:Records on Page:splitCount:,=1]
[=:Spouse:[Records on Page]]
|
[lib.ErrorMessage:Records on Page has not been updated]
>

|
[?:Other Records]

<
[?:Other Records:splitCount:,=1]
[=:Spouse:[Other Records]]
|
[lib.ErrorMessage:Other Records has not been updated]
>

|
[?:MarriageFinder™]
<
[?:MarriageFinder™/married/]
[lib.ErrorMessage:MarriageFinder™ has not been updated]
|
[=:Spouse:[MarriageFinder™]]
>

|
[?:Spouse]
[=:Spouse:[Spouse]]

|
[?:Spouse's last name]
[=:Spouse:[Spouse's last name]]
>






# Fill in source template "SCI Marriage".
# Early SCI Marriages spouse is not known...
<[?:Spouse][=:Principal2 Name:[Spouse]]|[==:Principal2 Name]]>


# This only works if Male is selected. Its a problem if putting in Female.
<[?:var.zGender=m][=:WifesName:[Principal2 Name]]>
<[?:var.zGender=f][=:HusbandsName:[Principal2 Name]]>
<[?:var.zGender=m][=:HusbandsName:[var.zFullName]]>
<[?:var.zGender=f][=:WifesName:[var.zFullName]]>




# Principal 1 is the record being processed
# Husband's surname
[HusbandsName:nameSurname]{TAB}

# Husband's given name(s)
[HusbandsName:nameGiven]{TAB}

# Wife's surname
[WifesName:nameSurname]{TAB}

# Wife's given name(s)
[WifesName:nameGiven]{TAB}


# Registration Year
[var.zCivilRegYear]{TAB}

# Registration Qtr
[var.zCivilRegQtr]{TAB}

# Registration Month
<[var.zCivilRegMonth]>{TAB}

# Registration District
[var.zCivilRegDistrict]{TAB}

# Registration District Number
<[var.zCivilRegDistrictNumber]>{TAB}

# Volume
[var.zVolume]{TAB}

# Page
[var.zPage]{TAB}

# Registration Register Number
<[var.zCivilRegisterNumber]>{TAB}

# Registration Entry Number
<[var.zCivilRegEntryNumber]>{TAB}

# Collection
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL Husband
<[?:var.zGender=m]<[URL]|[Page.URL]>>{TAB}

# URL Wife
<[?:var.zGender=f]<[URL]|[Page.URL]>>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Record No.
[var.zRecordNo]{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}



# No images for civil reg from 1984 as system was online.
<
[?:var.zCivilRegYear>=1984]

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]
{TAB}
Civil Registration online from 1984 and therefore no images.

|

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]
{TAB}

# Move to Media tab.
{CTRL+TAB*3}


{SLOW}
# Insert from File for Husband
{CTRL+I}{DOWN}{ENTER}{ENTER}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource1]
{ENTER}

# Add file to FH folder
[var.zFactFolder]
{ENTER}
{TAB}

# Insert from File for Wife
{Ctrl+I}{Down}{ENTER}{ENTER}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource2]
{ENTER}


# Add file to FH folder
[var.zFactFolder]
{ENTER}

>


#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++End of source type checks

>


#######################################################################################
<[?:var.Debug=0]
#######################################################################################

## Do nothing
>

SCI_Media

#
# Author: Alan
# Description: 
# Usage: [lib.SCI_Media]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Called by SCI Birth and Death

# No images for civil reg from 1984 as system was online.
<
[?:var.zCivilRegYear>=1984]

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{TAB}
Civil Registration online from 1984 and therefore no images.
|

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]{TAB}


# Move to Media tab.
{CTRL+TAB*3}

{SLOW}
# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

# Slight pause so path can be entered correctly.
{1000}

# Windows Folder where media is opened from.
[var.zMediaSource]
{ENTER}

# Add to FH folder
[var.zFactFolder]
{ENTER}

>

Services Media Name

# Description: Set up media name.
#

# Usage: [lib.Services Media Name]

# Change History  Reason for change
# --------------  ---------------------------------------------------------------------------------
# 24/02/2024      Initial creation

[==:var.zMediaName:[var.zServicesEvent]]
[==:var.zMediaName:[var.zMediaName:append:[zSeparator]:append:[var.zYearRange]]]
[==:var.zMediaName:[var.zMediaName:append:[zSeparator]:append:[var.zSurname]:append: ]]
[==:var.zMediaName:[var.zMediaName:append:[var.zGivenName]]]
<
[?:var.zServiceNumber]
[==:var.zMediaName:[var.zMediaName:append:[zSeparator]:append:[var.zServiceNumber]]]
>

Services_ANC

# Description: Based on Collection Name set up record type, source citation title and media name.
#

# Usage: [lib.Services_ANC]

# Change History  Reason for change
# --------------  ---------------------------------------------------------------------------------
# 24/02/2024      Initial creation




<
[?:Service number=nk]
[==:var.zServiceNumber:]
|
[lib.ValidateInputField:Service number]
[==:var.zServiceNumber:[Service number]]
>

<
[?:Muster Year][==:var.zYearRange:[Muster Year]]
|
[?:Document Year][==:var.zYearRange:[Document Year:dateYear]]
|
[?:Year][==:var.zYearRange:[Year]]
|
[?:Military Year]
<
[?:Military Year/-/][==:var.zYearRange:[Military Year]]
|
[==:var.zYearRange:[Military Year:dateYear]]
>
|
[?:Military Date][==:var.zYearRange:[Military Date:dateYear]]
|
[?:Desertion Date][==:var.zYearRange:[Desertion Date:dateYear]]
|
[?:Service Date][==:var.zYearRange:[Service Date:dateYear]]
|
[?:Service Year][==:var.zYearRange:[Service Year]]
|
[?:First Service Date]
[==:var.zYearRange:[First Service Date:dateYear]]
<
[?:Last Service Date]
[==:var.zYearRange:[var.zYearRange:append:-:append:[Last Service Date:dateYear]]]
>
|
[?:Capture Date][==:var.zYearRange:[Capture Date:dateYear]]
|
[?:Event Date][==:var.zYearRange:[Event Date:dateYear]]
|
[?:Birth Date][==:var.zYearRange:[Birth Date:dateYear]]
|
[?:Birth Year][==:var.zYearRange:[Birth Year:dateYear]]
|
[?:Death Year][==:var.zYearRange:[Death Year]]
|
[?:Death Date][==:var.zYearRange:[Death Date:dateYear]]
>

[=:zSeparator:, ]



<
[?:Collection Name]
<
# A

# B
[?:Collection Name=UK, British Army Records and Lists, 1882-1962]
[==:var.zServicesEvent:Army List]
[lib.Services Media Name]

|


# C

# D

# E

# F


# G
[?:Collection Name=Global, Find a Grave® Index for Burials at Sea and other Select Burial Locations, 1300s-Current]
[==:var.zServicesEvent:Burial]
[lib.Services Media Name]
|

# H


# I
[?:Collection Name=Indian Army Quarterly List for 1 January 1912]
[==:var.zServicesEvent:Army List]
[lib.Services Media Name]
|


# J

#K


#L

# N

# P


# R
[?:Collection Name=Royal Air Force Airmen Records, 1918-1940]
[==:var.zServicesEvent:RAF Service]
[lib.Services Media Name]
|
[?:Collection Name=Royal Navy Registers of Seamen's Services, 1848-1939]
[==:var.zServicesEvent:Navy Service]
[lib.Services Media Name]
|


# S
[?:Collection Name=Soldiers Died in the Great War, 1914-1919]
[==:var.zServicesEvent:Deaths]
[lib.Services Media Name]
|


# U
[?:Collection Name=UK and Allied Countries, World War II Liberated Prisoner of War Questionnaires, 1945-1946]
[==:var.zServicesEvent:POW Questionnaire]
[lib.Services Media Name]
|
[?:Collection Name=UK, Army Registers of Soldiers' Effects, 1901-1929]
[==:var.zServicesEvent:Army Effects]
[lib.Services Media Name]
|
[?:Collection Name=UK, British Army Records and Lists, 1882-1962]
[==:var.zServicesEvent:Army Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, British Army World War I Medal Rolls Index Cards, 1914-1920][==:var.zServicesEvent:Army Medal]
[lib.Services Media Name]
|
[?:Collection Name=UK, British Army World War I Pension Records 1914-1920]
[==:var.zServicesEvent:Army Pension]
[lib.Services Media Name]
|
[?:Collection Name=UK, British Army World War I Service Records, 1914-1920]
[==:var.zServicesEvent:Army Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, De Ruvigny's Roll of Honour, 1914-1919]
[==:var.zServicesEvent:Honour]
[lib.Services Media Name]
|
[?:Collection Name=UK, Military Deserters, 1812-1927]
[==:var.zServicesEvent:Deserters]
[lib.Services Media Name]
|
[?:Collection Name=UK, Naval Medal and Award Rolls, 1793-1972]
[==:var.zServicesEvent:Navy Medal]
[lib.Services Media Name]
|
[?:Collection Name=UK, Naval Officer and Rating Service Records, 1802-1919]
[==:var.zServicesEvent:Navy Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, Navy Lists, 1888-1970]
[==:var.zServicesEvent:Navy List]
[lib.Services Media Name]
|
[?:Collection Name=UK, Roll of the Indian Medical Service, 1615 -1930]
[==:var.zServicesEvent:Army Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, Royal Air Force Airmen Records, 1918-1940]
[==:var.zServicesEvent:RAF Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, Royal Navy Registers of Seamen's Services, 1848-1939]
[==:var.zServicesEvent:Navy Service]
[lib.Services Media Name]
|
[?:Collection Name=UK, Soldiers Died in the Great War, 1914-1919]
[==:var.zServicesEvent:Death]
[lib.Services Media Name]
|
[?:Collection Name=UK, World War I Pension Ledgers and Index Cards, 1914-1923][==:var.zServicesEvent:Pension]
[lib.Services Media Name]
|
[?:Collection Name=UK, World War I Service Medal and Award Rolls, 1914-1920]
[==:var.zServicesEvent:Medal]
[lib.Services Media Name]
|

# W
[?:Collection Name=Web: UK, Royal Naval Seamen Index, 1853 -1872]
[==:var.zServicesEvent:Navy Index]
[lib.Services Media Name]
|
[?:Collection Name=World War I Pension Ledgers and Index Cards, 1914-1923]
[==:var.zServicesEvent:Pension]
[lib.Services Media Name]
|

# Error
[lib.ErrorMessage:No record type assign]
>
>

Services_FMP

# Description: Based on Collection Name set up record type, source citation title and media name.
#

# Usage: [lib.Services_FMP]

# Change History  Reason for change
# --------------  ---------------------------------------------------------------------------------
# 24/02/2024      Initial creation


<
#-----------------------------------------------------------------------Service number
[?:Service number]
<
[?:Service number=nk]
[==:var.zServiceNumber:]
|
[lib.ValidateInputField:Service number]
[==:var.zServiceNumber:[Service number]]
>
|
#-----------------------------------------------------------------------Soldier number
[?:Soldier number][==:var.zServiceNumber:[Soldier number]]
>

<
[?:Muster Year][==:var.zYearRange:[Muster Year]]
|
[?:Military Year][==:var.zYearRange:[Military Year:dateYear]]
|
[?:Date range][==:var.zYearRange:[Date range]]
|
[?:Enlistment year][==:var.zYearRange:[Enlistment year]]
|
[?:Event Date]
<
[?:Event Date/\?/][==:var.zYearRange:[Event date:extract:([0-9]+)]]
|
[==:var.zYearRange:[Event Date:dateYear]]
>
|
[?:Event Year][==:var.zYearRange:[Event Year]]
|
[?:Attestation year][==:var.zYearRange:[Attestation year]]
|
[?:Birth year][==:var.zYearRange:[Birth year]]
|
[?:Death year][==:var.zYearRange:[Death year]]
|
[?:Year][==:var.zYearRange:[Year]]
>

[=:zSeparator:, ]
<
[?:Collection Name]
<
# A

# B
[?:Collection Name=Britain, Campaign, Gallantry & Long Service Medals & Awards]
[==:var.zServicesEvent:Medal]
[lib.Services Media Name]
|
[?:Collection Name=British Armed Forces Soldiers' Wills 1850-1986]
[==:var.zServicesEvent:Army Will]
[lib.Services Media Name]
|
[?:Collection Name=British Army, Local Armed Forces' Enrolment Forms, Anglo-Boer War 1899-1902]
[==:var.zServicesEvent:Service]
[lib.Services Media Name]
|
[?:Collection Name=British Army Service Records]
[==:var.zServicesEvent:Army Service]
[lib.Services Media Name]
|
[?:Collection Name=British Army, Royal Artillery Officers 1716-1899]
[==:var.zServicesEvent:Army Officer]
[lib.Services Media Name]
|
[?:Collection Name=British Army, Royal Engineers 1900-1949]
[==:var.zServicesEvent:Army Engineer]
[lib.Services Media Name]
|
[?:Collection Name=British Royal Air Force, Airmen's Service Records 1912-1939]
[==:var.zServicesEvent:RAF Service]
[lib.Services Media Name]
|
[?:Collection Name=British Royal Navy Seamen 1899-1924]
[==:var.zServicesEvent:Navy Seamen]
[lib.Services Media Name]
|
[?:Collection Name=British Royal Navy, Ships' Musters]
[==:var.zServicesEvent:Navy Musters]
[lib.Services Media Name]

|


# C
[?:Collection Name=Commonwealth War Graves Commission Debt Of Honour]
[==:var.zServicesEvent:CWGC Death]
[lib.Services Media Name]
|

# D

# E
[?:Collection Name=Easter Rising & Ireland Under Martial Law 1916-1921]
[==:var.zServicesEvent:Inquiry]
[lib.Services Media Name]
|


# F


# G

# H
[?:Collection Name=Harts Army List 1888]
[==:var.zServicesEvent:Army List]
[lib.Services Media Name]
|


# I


# J


#K


#L
[?:Collection Name=Lives Of The First World War 1914-1918]
[==:var.zServicesEvent:Death]
[lib.Services Media Name]
|



# N

# P
[?:Collection Name=Prisoners Of War 1715-1945]
[==:var.zServicesEvent:POW]
[lib.Services Media Name]
|


# R


# S
[?:Collection Name=Scotland, Jacobite Rebellions 1715 And 1745]
[==:var.zServicesEvent:List]
[lib.Services Media Name]
|
[?:Collection Name=Soldiers Died In The Great War 1914-1919]
[==:var.zServicesEvent:Death]
[lib.Services Media Name]
|




# U

# W

# Error
[lib.ErrorMessage:No record type assigned]
>
>

Services_FS

# Description: Based on Collection Name set up record type, source citation title and media name.
#

# Usage: [lib.Services_ANC]

# Change History  Reason for change
# --------------  ---------------------------------------------------------------------------------
# 24/02/2024      Initial creation




<
[?:Service number=nk]
[==:var.zServiceNumber:]
|
[lib.ValidateInputField:Service number]
[==:var.zServiceNumber:[Service number]]
>

<
[?:Muster Year][==:var.zYearRange:[Muster Year]]
|
[?:Document Year][==:var.zYearRange:[Document Year:dateYear]]
|
[?:Year][==:var.zYearRange:[Year]]
|
[?:Military Year]
<
[?:Military Year/-/][==:var.zYearRange:[Military Year]]
|
[==:var.zYearRange:[Military Year:dateYear]]
>
|
[?:Military Date][==:var.zYearRange:[Military Date:dateYear]]
|
[?:Desertion Date][==:var.zYearRange:[Desertion Date:dateYear]]
|
[?:Service Date][==:var.zYearRange:[Service Date:dateYear]]
|
[?:Service Year][==:var.zYearRange:[Service Year]]
|
[?:First Service Date]
[==:var.zYearRange:[First Service Date:dateYear]]
<
[?:Last Service Date]
[==:var.zYearRange:[var.zYearRange:append:-:append:[Last Service Date:dateYear]]]
>
|
[?:Event Date][==:var.zYearRange:[Event Date:dateYear]]
|
[?:Birth Date][==:var.zYearRange:[Birth Date:dateYear]]
|
[?:Birth Year][==:var.zYearRange:[Birth Year:dateYear]]
|
[?:Death Year][==:var.zYearRange:[Death Year]]
|
[?:Death Date][==:var.zYearRange:[Death Date:dateYear]]
>

[=:zSeparator:, ]



<
[?:Collection Name]
<
# A

# B

# C

# D

# E

# F


# G

# H


# I


# J

# K


# L

# N

# P


# R


# S


# U
[?:Collection Name=United Kingdom, World War I Service Records, 1914-1920]
[==:var.zServicesEvent:Army Service]
[lib.Services Media Name]

# W
|

# Error
[lib.ErrorMessage:No record type assign]
>
>

SetAncestryImportFlag

[=:Start:SetAncestryImportFlag]
#
# author : Alan
# updated 13 Jun 2023
#
# Description: Ancestry Import flag is used to mark an individual that has been import by
#              the Family Tree Person suite of scripts. This flag is used in the Charts so that
#              it tells us that it requires further detail and source citations is to be added.
#              Once all relevant information has been added then this flag can be deactivated.
#
#
# usage : [lib.SetAncestryImportFlag]

# Execution speed
{fast}
# Move to Property box
{Alt+Enter}
# Move to flags temp from Main tab
{Ctrl+Tab}{Ctrl+Tab}
# Tab down to Ancestry Import flag
{Tab*8}
# Switch on Ancestry Import Flag
{space}
{Ctrl+Shift+Tab}{Ctrl+Shift+Tab}
[=:End:SetAncestryImportFlag]

SetAssessment


# Author : Alan inspired by Paul Tanner-Tremaine
#
# Usage : [lib.SetAssessment:x]
# 
# Enter the assessment Check.
[=:Assessment_U_Q_S_P:{1}]
#Unreliable U
<[?:Assessment_U_Q_S_P=U]{down*2}>
#Questionable Q
<[?:Assessment_U_Q_S_P=Q]{down*3}>
#Secondary S
<[?:Assessment_U_Q_S_P=S]{down*4}>
#Primary P
<[?:Assessment_U_Q_S_P=P]{down*5}>

SetCensusCountry


# Author: Alan
# Description: Method to pick up first character of country from the UK to be selected for
#              Ancestral Sources.

# Version Date         Reason for change
# ------------         --------------------------------------------------------------
# 12 Sep 2023          Initial Creation
# 17/10/2023 1.0       Conversion of persistent variables into variances.
# 13/07/2024 BETA8_5   Added record type "US Federal Census".


# Usage: [lib.SetCensusCountry]

# Called by: [lib.Find_AS_ID]

[=:var.Debug:1]

#[var.zFullAddress:split:,:[var.zFullAddress:splitCount:,]:substring:1:1]
[==:var.zCensusCountry:[var.zFullAddress:split:,:-1:substring:1:1]]
[var.zCensusCountry]
<[?:var.Debug=0]
## Do nothing!
>

SetFolderPathDisplay


\<span style="color:Black;font-size: 80%;font-weight: bold"\>

# Display folderpath in Text Template so it can be used for saving files
# Author: Alan
#
# Usage: [lib.SetFolderPathDisplay:Record Type:B/G]

# Parameters:
#              {1} Predefined record type
#              {2} Print marriage for (G)room or (B)ride

# 

# Change History       Reason for change
# --------------       ---------------------------------------------------------------------------
# 19/01/2024           Initial creation
# 30/01/2024           Moved [lib.SetRecordTypeFolder] to new [lib.SetRecordType]
#                      Introduced new parameter for Record Type in case [lib.SetRecordType] could not
#                      find record type. It meant swappping parameter 2 {1} to {2}.
# 01/02/2024           Empty parameter shown as paramater number between {}.
# 06/02/2024           Reset [var.z_ErrorMessage] to empty.
# 24/02/2024           New record type "Services".
# 01/03/2024           Fixed media name - Replaced [var.zMotherMaidenName] with [var.zMothersMaidenName].
# 24/04/2024           Enhanced Newspapers to also check for Newspaper.com
# 12/05/2024 BETA4     Deleted duplicate reset error message.
# 25/05/2024 BETA6     Simplified method of setting up folders path for storage of media by user.
# 10/06/2024 BETA7_3   Added new record type "School Admission".
# 13/06/2024 BETA6_8   Record Type "Newspaper" - updated to handle a multiple name field
# 13/06/2024 BETA6_8   Record Type "Newspaper Item" - updated to handle a multiple name field
# 15/06/2024 BETA6_8   Added new record type "Workhouse Admission".
# 16/06/2024 BETA7     Added new record type "FreeBMD Birth".
# 15/06/2024 BETA6_8   New field [var.zImageFormat] for record types Newspaper and Newspaper Item.
# 19/06/2024 BETA7     Added new record type "Directory".
# 22/06/2024 BETA7     Added record type "DNA Match".
# 26/06/2024 BETA7_12  Added record type "Funeral Notice".
# 12/07/2024 BETA8_4   Added record type "Marriage Banns".
# 13/07/2024 BETA8_5   Added record type "US Federal Census".
# 24/07/2024 BETA9_8   Added record type "Canada Federal Census".


# Reset error message
#[==:var.z_ErrorMessage:]

[==:var.Debug:1]


# If no record type is supplied as a parameter then clear [var.zRecordType].
[=:RecordType:{1}]
<[?:RecordType/\{/][==:Var.zRecordType:]|[==:Var.zRecordType:{1}]>





# Set up common field values
[lib.InitVars]

# SCI Marriage Print Type
[==:var.zSCIMarriagePrintType:{2}]


# Set up media folder
# --> In BETA6 this line replaced by [lib.SetWindowsPath] and moved to the bottom.
#BETA6 [==:var.FolderPath:[var.FolderPath:replace:\\:\\\\\\\\::replace:%MediaFolder%:[var.zFactFolder]]]


# Set up image format --> default is JPG but can be used for any type such as PDF/PNG, etc.
# NB. The field [Image Format] should be set up in the Service collection as a Text Template.
# NB. If not part of an existing collection it is possible to add the field [Image Format]
#     manually in the ORA Panel.


<[?:Image Format][==:var.zImageFormat:[Image Format]]|[==:var.zImageFormat:JPG]>
[==:var.zImageFormat:[var.zImageFormat:prepend:.]]

# Set up image name based on record/source type...

<

# 1939 Register
[?:var.zRecordType=1939 Register][==:var.zMediaName:[var.zSurname:prepend:1939 Register, :append: :append:[var.zGivenName]:append:.jpg]]

|
# Banns
[?:var.zRecordType=Banns][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]

|
# Baptism
<
[?:var.zRecordType=Baptism][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# Baptism BT
<
[?:var.zRecordType=Baptism BT][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# Baptism NC
<
[?:var.zRecordType=Baptism NC][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# Baptism RC
<
[?:var.zRecordType=Baptism RC][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>


|
# Burial
[?:var.zRecordType=Burial][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Burial BT
## 27/09/2023 [?:var.zRecordType=Burial BT][==:var.zMediaName:[var.zRecordType:append: :append:[var.zRegisterType]:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
[?:var.zRecordType=Burial BT][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Burial NC
## 27/09/2023 [?:var.zRecordType=Burial NC][==:var.zMediaName:[var.zRecordType:append: :append:[var.zRegisterType]:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
[?:var.zRecordType=Burial NC][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Burial (Cemetery)
[?:var.zRecordType=Cemetery][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Census
[?:var.zRecordType=Census][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Canada Federal Census
[?:var.zRecordType=Canada Federal Census][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Directory
[?:var.zRecordType=Directory]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# DNA Match
[?:var.zRecordType=DNA Match]

|
# Electoral Register
[?:var.zRecordType=Electoral Register][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# FreeBMD Birth
[?:var.zRecordType=FreeBMD Birth]
<
[?:var.zMothersMaidenName]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: - mother :append:[var.zMothersMaidenName:uppercase]:append:.jpg]] 
|
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]] 
>

|
# FreeBMD Death
[?:var.zRecordType=FreeBMD Death]
<[?:var.zAgeAtDeath]
[?:var.zRecordType=FreeBMD Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: - age :append:[var.zAgeAtDeath]:append:.jpg]]
|
[?:var.zRecordType=FreeBMD Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# FreeBMD Marriage
[?:var.zRecordType=FreeBMD Marriage]

<[?:Gender=F][lib.ErrorMessage:Marriage Gender error - Groom has a girl's name]>

<
[?:var.zSCIMarriagePrintType=G]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaSource1:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName1:[var.zMediaName]]
|
[?:var.zSCIMarriagePrintType=B]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append: & :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
[==:var.zMediaSource2:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName2:[var.zMediaName]]
|
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaName1:[var.zMediaName]]
>

|
# Funeral Notice
[?:var.zRecordType=Funeral Notice][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Gravestone
[?:var.zRecordType=Gravestone][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# GRO Birth
[?:var.zRecordType=GRO Birth][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:[var.zNameSuffix]:append:.jpg]] 

|
# GRO Death
[?:var.zRecordType=GRO Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:[var.zNameSuffix]:append:.jpg]] 

|
# Marriage
[?:var.zRecordType=Marriage][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]

|
# Marriage Banns
[?:var.zRecordType=Marriage Banns]

<[?:Gender=F][lib.ErrorMessage:Marriage Gender error - Groom has a girl's name]>

<
[?:var.zSCIMarriagePrintType=1]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaSource1:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName1:[var.zMediaName]]
|
[?:var.zSCIMarriagePrintType=2]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append: & :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
[==:var.zMediaSource2:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName2:[var.zMediaName]]
>

|
# Marriage BT
[?:var.zRecordType=Marriage BT][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]

|
# Marriage Licence
[?:var.zRecordType=Marriage Licence][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]

|
# Marriage NC
[?:var.zRecordType=Marriage NC][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]


|
# Marriage PR
[?:var.zRecordType=Marriage PR][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]

|
# Newspaper
[?:var.zRecordType=Newspaper]

# Check for couple using [var.zParts] or [var.zEvent]
<[?:var.zParts>1][=:Couple:1]|[?:var.zEvent=Marriage][=:Couple:1]|[=:Couple:0]>

<
[?:Couple=1]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append: (:append:[var.zEventType]:append:), :append:[var.zNewspaper]:append:[var.zImageFormat]]]

|
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: (:append:[var.zEventType]:append:), :append:[var.zNewspaper]:append:[var.zImageFormat]]]
>

|
# Newspaper Item
[?:var.zRecordType=Newspaper Item]

<
[?:var.zParts>1]
[==:var.zMediaName:[var.zRecordType:split: :1:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append: (:append:[var.zEventType]:append:), :append:[var.zNewspaper]:append:[var.zImageFormat]]]
|
[==:var.zMediaName:[var.zRecordType:split: :1:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: (:append:[var.zEventType]:append:), :append:[var.zNewspaper]:append:[var.zImageFormat]]]
>
|
# Probate
[?:var.zRecordType=Probate]
<
[?:Source.Title/Scotland/]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: (Scotland).jpg]]
|
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# Sschool Admission
[?:var.zRecordType=School Admission]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# SCI Birth
[?:var.zRecordType=SCI Birth]
<[?:var.zMothersMaidenName]
[?:var.zRecordType=SCI Birth][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: - mother :append:[var.zMothersMaidenName:uppercase]:append:.jpg]] 
|
[?:var.zRecordType=SCI Birth][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]] 
>

|
# SCI Death
[?:var.zRecordType=SCI Death]
<[?:var.zAgeAtDeath]
[?:var.zRecordType=SCI Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: - age :append:[var.zAgeAtDeath]:append:.jpg]]
|
[?:var.zRecordType=SCI Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# SCI Marriage
[?:var.zRecordType=SCI Marriage]

<[?:Gender=F][lib.ErrorMessage:Marriage Gender error - Groom has a girl's name]>

<
[?:var.zSCIMarriagePrintType=G]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaSource1:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName1:[var.zMediaName]]
|
[?:var.zSCIMarriagePrintType=B]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append: & :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
[==:var.zMediaSource2:[var.FolderPath:append:[var.zMediaName]]]
[==:var.zMediaName2:[var.zMediaName]]
|
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaName1:[var.zMediaName]]
>


|
# Services - Army, Royal Air Force, Merchant Navy, Royal Navy
[?:var.zRecordType=Services]
[==:var.zMediaName:[var.zMediaName:append:.jpg]]



|
# Trade Diretory
[?:var.zRecordType=Trade Directory][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# TRX Marriage
[?:var.zRecordType=TRX Marriage]

[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaName1:[var.zMediaName]]

|
# TRX Death - was looking at using this as a generic transaction!!!
[?:var.zRecordType=TRX Death]
<[?:var.zAgeAtDeath]
[?:var.zRecordType=TRX Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: - age :append:[var.zAgeAtDeath]:append:.jpg]]
|
[?:var.zRecordType=TRX Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]
>

|
# UKBMD Birth
[?:var.zRecordType=UKBMD Birth][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:[var.zNameSuffix]:append:.jpg]] 

|
# UKBMD Death
[?:var.zRecordType=UKBMD Death][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:[var.zNameSuffix]:append:.jpg]] 

|
# UKBMD Marriage
[?:var.zRecordType=UKBMD Marriage]

[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]:append:.jpg]]
[==:var.zMediaName1:[var.zMediaName]]

|
# US Federal Census
[?:var.zRecordType=US Federal Census][==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

|
# Workhouse Admission
[?:var.zRecordType=Workhouse Admission]
[==:var.zMediaName:[var.zRecordType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]:append:.jpg]]

>

#BETA6 [var.FolderPath:replace:\\\\:\\::append:[var.zMediaName]]
#BETA6 [==:var.zMediaSource:[var.FolderPath:append:[var.zMediaName]]]


[lib.SetWindowsPath]


#***********
<[?:var.Debug=0]
## Do nothing
>

SetGraveType

[=:Start:SetGraveType]
#
# Author : Alan
# Description: Sets up the different parameters...
#              G - (G)ravestone
#              M - (M)emorial
#              I - Memorial (I)nscription

# Change History     Reason for change
# ---------------    ---------------------------------------------------------------------
# 12/08/2023         Initial creation
# 22/05/2024 BETA6   Converted to Bare Bones system.

#
# Usage : [lib.SetGraveType:x]
# 
# Grace Types...
[==:var.zGraveType:{1}]
# (G)ravestone
<
[?:var.zGraveType=G]{down*2}
|
# (M)emorial
[?:var.zGraveType=M]{down*3}
|
# Memorial (I)nscription
[?:var.zGraveType=I]{down*4}
>

{tab}

[=:End:SetGraveType]

SetGRORef


#
# Author: Alan
# Description: Add reference to Notes field and tab across to Source box
#
# Change History        Reason for change
# 16/09/2023 08:45      Due to issues with GRO scripts repeatedly calling ORA checks needed to 
#                       change [District] to [Reg District].
#

# Usage: [lib.SetGRORef]
# 

<
#=Ancestry=======================================================================================
[?:Page.ServiceName=Ancestry]
Ref: [Reg District], <[?:Birth quarter=1]Jan|[?:Birth quarter=2]Apr|[?:Birth quarter=3]Jul|[?:Birth quarter=4]Oct>, Qtr: [Birth year], Vol: [Volume], Page: [Page]

|

#=Findmypast=====================================================================================
[?:Page.ServiceName=Findmypast]
Ref: [Reg District:split:,:1], <[?:Birth quarter=1]Jan|[?:Birth quarter=2]Apr|[?:Birth quarter=3]Jul|[?:Birth quarter=4]Oct>, Qtr: [Birth year], Vol: [Volume], Page: [Page]

|
#===GRO UK=======================================================================================

[?:Page.ServiceName=GRO UK]
Ref: [Reg District:split:,:1], Qtr: <[?:Registration Quarter=Q1]Jan|[?:Registration Quarter=Q2]Apr|[?:Registration Quarter=Q3]Jul|[?:Registration Quarter=Q4]Oct>, Reg Year: [Registration Year], 
 Vol: [Volume], Page: [Page]

>

#================================================================================================

SetGRORef_v2

[=:Start:SetGRORef_v2]
#
# Author: Alan
# Description: Add reference to Notes field and tab across to Source box
#
# Change History     Reason for change
# ----------------   -------------------------------------------------------------------------
# 16/09/2023 08:45   Due to issues with GRO scripts repeatedly calling ORA checks needed to 
#                    change [District] to [Reg District].
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#                    Total rewrite to consolidate all GRO Refs in following library templates...
#                    [lib.Amend_SCI_Birth_ANC], [lib.Amend_SCI_Birth_FMP]
#                    [lib.Amend_SCI_Marriage_ANC], [lib.Amend_SCI_Marriage_FMP]
#                    [lib.Amend_SCI_Death_ANC], [lib.Amend_SCI_Death_FMP]
#                    [lib.Amend_GRO_Birth], [lib.Amend_GRO_Death]
# 16/052024 BETA4    Changed [var.z_*] to [var.z*].

# Usage: [lib.SetGRORef_v2]
# 

<
#=Ancestry=======================================================================================
[?:Page.ServiceName=Ancestry]

# Determine Civil Registration Type
<
# Record ID 8912 (pre 1915) and 8782 (post 1915)
[?:Source.Title/Birth/][==:var.zCivilRegType:Birth]
|
# Record ID 8913 (pre 1915) and 8753 (post 1915)
[?:Source.Title/Marriage/][==:var.zCivilRegType:Marriage]
|
# Record ID 8914 (pre 1915) and 7579 (post 1915)
[?:Source.Title/Death/][==:var.zCivilRegType:Death]
>


# Get quarter month abbreviation
<
[?:Quarter of the Year][==:var.zCivilRegQtr:[Quarter of the Year:substring:1:3]]
|
[?:Registration Quarter][==:var.zCivilRegQtr:[Registration Quarter:substring:1:3]]
>

[==:var.zCivilRegYr:[Registration Date:dateYear]]


<
[?:Volume][==:var.zCivilRegVolume:[Volume]]
|
[?:Volume number][==:var.zCivilRegVolume:[Volume number]]
>

<
[?:Page][==:var.zCivilRegPage:[Page]]
|
[?:Page number][==:var.zCivilRegPage:[Page number]]
>



# Get Full Registration Place - uses [District] as input variable and [DistrictCounty] as output
<
[?:Registration Place][=:District:[Registration Place:split:,:1]]
|
[?:Registration district][=:District:[Registration district]]
|
[?:Death Registration Place][=:District:[Death Registration Place:split:,:1]]
>
# Input [District]; Output [DistrictCounty]
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]

|

#=Findmypast=====================================================================================
[?:Page.ServiceName=Findmypast]
# Determine Civil Registration Type
<
[?:Birth Quarter][==:var.zCivilRegType:Birth]
|
[?:Marriage Quarter][==:var.zCivilRegType:Marriage]
|
[?:Death Quarter][==:var.zCivilRegType:Death]
>

# Get quarter month abbreviation
[=:CivilRegQtrNo:[^var.zCivilRegType:append: Quarter]]
<
[?:CivilRegQtrNo=1][==:var.zCivilRegQtr:Jan]
|
[?:CivilRegQtrNo=2][==:var.zCivilRegQtr:Apr]
|
[?:CivilRegQtrNo=3][==:var.zCivilRegQtr:Jul]
|
[?:CivilRegQtrNo=4][==:var.zCivilRegQtr:Oct]
>

[==:var.zCivilRegYr:[^var.zCivilRegType:append: Year]]

<
[?:Volume][==:var.zCivilRegVolume:[Volume]]
|
[?:Volume number][==:var.zCivilRegVolume:[Volume number]]
>

<
[?:Page][==:var.zCivilRegPage:[Page]]
|
[?:Page number][==:var.zCivilRegPage:[Page number]]
>


# Get Full Registration Place - uses [District] as input variable and [DistrictCounty] as output
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]


|
#===GRO UK=======================================================================================

[?:Page.ServiceName=GRO UK]

# Determine Civil Registration Type
<
[?:Birth Year][==:var.zCivilRegType:Birth]
|
[?:Death Year][==:var.zCivilRegType:Death]
>


# Get quarter month abbreviation
[=:zCivilRegQtrNo:[Registration Quarter:substring:2:2]]
<
[?:zCivilRegQtrNo=1][==:var.zCivilRegQtr:Jan]
|
[?:zCivilRegQtrNo=2][==:var.zCivilRegQtr:Apr]
|
[?:zCivilRegQtrNo=3][==:var.zCivilRegQtr:Jul]
|
[?:zCivilRegQtrNo=4][==:var.zCivilRegQtr:Oct]
>


[==:var.zCivilRegYr:[Registration Year]]

<
[?:Volume][==:var.zCivilRegVolume:[Volume]]
|
[?:Volume number][==:var.zCivilRegVolume:[Volume number]]
>

<
[?:Page][==:var.zCivilRegPage:[Page]]
|
[?:Page number][==:var.zCivilRegPage:[Page number]]
>


<[?:District Code][==:var.zCivilRegDistrictCode:[District Code]]>

<[?:Entry Number][==:var.zCivilRegEntryNumber:[Entry Number]]>

# Get Full Registration Place - uses [District] as input variable and [DistrictCounty] as output
[lib.Get_GRO_DistrictCounty]
[==:var.zCivilRegDistrict:[DistrictCounty]]


>

#================================================================================================


[=:End:SetGRORef_v2]

SetGRORefNote

# Usage: [lib.SetGRORefNote]

# Author: Alan
# Description: Put GRO reference into focus field
# Usage: [lib.SetGRORefNote]
# Change History     Reason for change
# --------------     ------------------------------------------------------------------------
# 17/10/2023 1.0     Conversion of persistent variables into variances.


Ref: [var.zCivilRegType], [var.zCivilRegDistrict], Qtr: [var.zCivilRegQtr], Year: [var.zCivilRegYear], <Vol: [var.zVolume],> <Page: [var.zPage]><District Code: [var.zCivilRegDistrictCode],> <Entry Number: [var.zCivilRegEntryNumber]>

SetMarriageType

[=:Start:SetMarriageType]
# Author Alan
# Description: Set up Marriage Type for Ancestral Sources

# Change History     Reason for change
# ---------------    ---------------------------------------------------------------------
# 27/07/2023         Initial Creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 19/02/2024         Replace [z_* with [z*.


 
# Usage: [lib.SetMarriageType]
# Parameters: none
# Input variables: [Marriage Type]
# Output variables: [var.zMarriage Type]
#

# Check that an entry has been made in the field [Marriage Type]
[lib.ValidateInputField:Marriage Type - After Banns-Banns-Licence]

# Set Marriage Type to its full description
<
[?:Marriage Type=a][=:var.zMarriage Type:After Banns]
|
[?:Marriage Type=l][=:var.zMarriage Type:By Licence]
|
[?:Marriage Type=b][=:var.zMarriage Type:By Banns]
|
[?:Marriage Type=nk][=:var.zMarriage Type: ]
|
[lib.ErrorMessage:ERROR - Marriage Type should be a, b or l OR nk]
>

[var.zMarriage Type]



[=:End:SetMarriageType]

SetNewsAnnounceType

[=:Start:SetNewsAnnounceType]
#
# author : Alan
# 
# Description: 
# Usage: [lib.SetNewsAnnounceType:x]
#
# Change History         Reason for change
# --------------         -------------------------------
# 02/03/2023             Replaced error variable with [lib.ErrorMessage]
#
# 
# {1} - News Item Types
#
# (B)irth | (M)arriage | (D)eath
#
# Set up the News Announcement Type.
[=:NewsAnnounceType:[{1}]]

<
# B - Birth
[?:NewsAnnounceType=B]{down*2}[==:zNewsAnnouncementType:Birth]|
# M - Marriage
[?:NewsAnnounceType=M]{down*3}[==:zNewsAnnouncementType:Marriage]|
# D - Death
[?:NewsAnnounceType=D]{down*4}[==:zNewsAnnouncementType:Death]|
# Unknown news announcement type
[lib.ErrorMessage:News Announcement Type unknown:{1}]
>
{tab}
[=:End:SetNewsAnnounceType]

SetNewsItemType

[=:Start:SetNewsItemType]
#
# author : Alan
# 
# Description: 
# Usage: [lib.SetNewsItemType:x]
# 
# {1} - News Item Types
#
# (N)ews Item | (A)nnouncement | (O)bituary | Ad(v)ertisement
#
#
# Change History         Reason for change
# --------------         -------------------------------
# 02/03/2023             Replaced error variable with [lib.ErrorMessage]
#


# Set up the News Item Type.
[=:NewsItemType:[{1}]]

<[?:NewsItemType:length=1][=:nit:[NewsItemType]]>

<
[?:nit/A|N|O|R|V/]|
[?:News Item Type/(Advertisement/Announcment|News Item|Obituary|Report)/]|
[lib.ErrorMessage:SetNewsItemType - Invalid News Item Type]
>



<
# C - Confirmation
[?:NewsItemType=N]{down*2}[==:var.zNewsItemType:News Item]|
# A - Announcement
[?:NewsItemType=A]{down*3}[==:var.zNewsItemType:Announcement]|
# O - Obituary
[?:NewsItemType=O]{down*4}[==:var.zNewsItemType:Obituary]|
# R - Report
[?:NewsItemType=R][==:var.zNewsItemType:Report]|
# v - Advertisement
[?:NewsItemType=v]{down*5}[==:var.zNewsItemType:Advertisement]|
# Unknown news item type
[lib.ErrorMessage:News Item Type unknown:{1}]
>
{tab}
[=:End:SetNewsItemType]

SetRecordType

# Usage: [lib.SetRecordType]
# Called by:
#      [lib.InitVars]
# Calls:
#      [lib.SetRecordType]
#      [lib.ErrorMessage]

# Description: [lib.SetFolderPathDisplay] can set a predefined record type. If a predefined record type
#              is present this routine will set the field [var.zFact]. If a predefined record type
#              NOT present then the service is checked and specific service record type processes will
#              be called.
#              Once [zRecordType] is set the process [lib.SetRecordTypeFolder] is run to set up the 
#              folder where the media files are saved.

# Change Date          Reason for change
# -----------          ------------------------------------------------
# 30/01/2024           Initial creation.
# 02/02/2024           Added check for undeclared Record Type in [lib.SetFolderPathDisplay]
# 25/02/2024           New record type "Services".
# 29/02/2024           Record type check for Baptism was showing Baptisms incorrectly.
# 30/04/2024           BETA2_15 Added record type Burial NC.
# 06/05/2024           Check for register type being Bishops Transcript.
# 12/05/2024 BETA4     Added record type "TRX Marriage".
# 16/05/2024 BETA4     Added record type "Gravestone".
# 10/06/2024 BETA7_3   Added record type "School Admission".
# 12/06/2024 BETA7_6   Added record type "Newspaper Item".
# 15/06/2024 BETA6_9   Added record type "Workhouse Admission".
# 22/06/2024 BETA7     Added record type "DNA Match".
# 26/06/2024 BETA7_12  Added record type "Funeral Notice".
# 12/07/2024 BETA8_4   Added record type "Marriage Banns".
# 13/07/2024 BETA8_5   Added record type "US Federal Census".
# 24/07/2024 BETA9_8   Added record type "Canada Federal Census".


# Check for register type being Bishops Transcript or Non-Conformist
<
# Ancestry
[?:Register Type/^Bishop/][==:Var.zRecordType:[Var.zRecordType:append: BT]]
|
# Ancestry
[?:Source.Title/Catholic/][==:Var.zRecordType:[Var.zRecordType:append: RC]]
|
# Findmypast
[?:Record set/Catholic/][==:Var.zRecordType:[Var.zRecordType:append: RC]]

>


<
[?:var.zRecordType]
# Record Type is prefined in process SetFolderPathDisplay.
<
[?:Var.zRecordType=1939 Register][==:var.zFact:Census]|
[?:Var.zRecordType=Baptism][==:var.zFact:Baptism]|
[?:Var.zRecordType=Baptism BT][==:var.zFact:Baptism]|
[?:Var.zRecordType=Baptism RC][==:var.zFact:Baptism]|
[?:Var.zRecordType=Burial][==:var.zFact:Burial]|
[?:Var.zRecordType=Burial BT][==:var.zFact:Burial]|
[?:Var.zRecordType=Burial NC][==:var.zFact:Burial]|
[?:Var.zRecordType=Canada Federal Census][==:var.zFact:Census]|
[?:Var.zRecordType=Census][==:var.zFact:Census]|
[?:Var.zRecordType=Death][==:var.zFact:Death]|
[?:Var.zRecordType=DNA Match][==:var.zFact:DNA Match]|
[?:Var.zRecordType=Electoral Register][==:var.zFact:Census]|
[?:Var.zRecordType=FreeBMD Birth][==:var.zFact:Birth]|
[?:Var.zRecordType=FreeBMD Death][==:var.zFact:Death]|
[?:Var.zRecordType=FreeBMD Marriage][==:var.zFact:Marriage]|
[?:Var.zRecordType=Funeral Notice][==:var.zFact:[Event]]|
[?:Var.zRecordType=Gravestone][==:var.zFact:Burial]|
[?:Var.zRecordType=GRO Birth][==:var.zFact:Birth]|
[?:Var.zRecordType=GRO Death][==:var.zFact:Death]|
[?:Var.zRecordType=Marriage][==:var.zFact:Marriage]|
[?:Var.zRecordType=Marriage Banns][==:var.zFact:Marriage Banns]|
[?:Var.zRecordType=Marriage BT][==:var.zFact:Marriage]|
[?:Var.zRecordType=Newspaper]|
[?:Var.zRecordType=Newspaper Item]|
[?:Var.zRecordType=Prison Register][==:var.zFact:Prison]|
[?:Var.zRecordType=Probate][==:var.zFact:Probate]|
[?:Var.zRecordType=School Admission][==:var.zFact:Education]|
[?:Var.zRecordType=SCI Birth][==:var.zFact:Birth]|
[?:Var.zRecordType=SCI Death][==:var.zFact:Death]|
[?:Var.zRecordType=SCI Marriage][==:var.zFact:Marriage]|
[?:Var.zRecordType=Services][==:var.zFact:Service Enlistment]|
[?:Var.zRecordType=TRX Baptism][==:var.zFact:Baptism]|
[?:Var.zRecordType=TRX Birth][==:var.zFact:Birth]|
[?:Var.zRecordType=TRX Burial][==:var.zFact:Burial]|
[?:Var.zRecordType=TRX Death][==:var.zFact:Death]|
[?:Var.zRecordType=TRX Marriage][==:var.zFact:Marriage]|
[?:Var.zRecordType=UKBMD Birth][==:var.zFact:Birth]|
[?:Var.zRecordType=UKBMD Death][==:var.zFact:Death]|
[?:Var.zRecordType=UKBMD Marriage][==:var.zFact:Marriage]|
[?:Var.zRecordType=US Federal Census][==:var.zFact:Census]|
[?:Var.zRecordType=Will][==:var.zFact:Death]|
[?:Var.zRecordType=Workhouse Admission][==:var.zFact:Residence]|
[lib.ErrorMessage:SetRecordType - undeclared RECORD TYPE]
>


|
# Record Type is not set up. So not added as a parameter in [lib.SetFolderPathDisplay].


[?:Page.ServiceName=Ancestry][lib.SetRecordType_ANC]|
[?:Page.ServiceName=Findmypast][lib.SetRecordType_FMP]|
[?:Page.ServiceName=GRO UK][lib.SetRecordType_GRO]|
[?:Page.ServiceName/^Generic/][lib.SetRecordType_Generic]|
[lib.ErrorMessage:SetRecordType - undeclared Service Name]
>



# Set folder to save image files into.
[lib.SetRecordTypeFolder]

SetRecordType_ANC

# Usage: [lib.SetRecordType_ANC]

<
#-------------------------------------------------------------------------SCI Marriage
[?:Source.Title/England & Wales, Civil Registration Marriage/]
[==:var.zRecordType:SCI Marriage][==:var.zFact:Marriage]
|
#-------------------------------------------------------------------------Error
[lib.ErrorMessage:SETRECORDTYPE_ANC Error - no valid Record Type]
>

#

SetRecordType_FMP

# Usage: [lib.SetRecordType_FMP]


# Start of Record Type checks
<
#-------------------------------------------------------------------------Birth


#-------------------------------------------------------------------------Baptism
<[?:Subcategory/Baptisms/]
<[?:Baptism Date>0][==:Var.zRecordType:Baptism]>>|
#-------------------------------------------------------------------------Banns

#-------------------------------------------------------------------------Burial
[?:Record ID/Burial/]
[==:var.zRecordType:Burial][==:var.zFact:Burial]|
#-------------------------------------------------------------------------Census
[?:Subcategory/Census/]
[==:var.zRecordType:Census][==:var.zFact:Census]|
#-------------------------------------------------------------------------Death
[?:Subcategory/Deaths/]
[==:var.zRecordType:Death][==:var.zFact:Death]|
#-------------------------------------------------------------------------Marriage
[?:Record ID:substring:1:7=GBPRS/M]
[==:var.zRecordType:Marriage][==:var.zFact:Marriage]|
#-------------------------------------------------------------------------Probate
[?:Subcategory/Probate/]
[==:var.zRecordType:Probate][==:var.zFact:Probate]|
#-------------------------------------------------------------------------SCI Birth
[?:Record ID:substring:1:5=BMD/B]
[==:var.zRecordType:SCI Birth][==:var.zFact:Birth]|
#-------------------------------------------------------------------------SCI Death
[?:Record ID:substring:1:5=BMD/D]
[==:var.zRecordType:SCI Death][==:var.zFact:Death]|
#-------------------------------------------------------------------------SCI Marriage
[?:Record ID:substring:1:5=BMD/M]
[==:var.zRecordType:SCI Marriage][==:var.zFact:Marriage]|

#-------------------------------------------------------------------------Other Sets

# A

# E
[?:Record Set=England, Newspaper Death Notices][==:var.zRecordType:Newspaper Death]|
[?:Record Set=England & Wales Deaths 1837-2007][==:var.zRecordType:SCI Death]|
[?:Record Set=England & Wales Government Probate Death Index 1858-2019][==:var.zRecordType:Probate]|
#[?:Record Set=England Births & Baptisms 1538-1975][==:var.zRecordType:Baptism]|
[?:Record Set=England Marriages 1538-1973][==:var.zRecordType:Marreage]|

# H
[?:Record Set=Hampshire, Portsmouth Burials][==:var.zRecordType:Burial]|

# M
[?:Record Set=Middlesex Monumental Inscriptions][==:var.zRecordType:MMI]|


#-------------------------------------------------------------------------Error
[lib.ErrorMessage:SETRECORDTYPE_FMP Error - no valid Record Type]
>
#----------------------------------------------------------

SetRecordType_GENERIC

#
# Author: Alan
# Description: 
#
# Usage: [lib.SetRecordType_GENERIC]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 21/05/2024 BETA6   First attempt.


#-------------------------------------------------------------------------Host Name [*.bmd.org.uk]
<
[?:Page.HostName/bmd.org.uk$/]

[lib.UKBMD_Type]

#-------------------------------------------------------------------------Error
|
[lib.ErrorMessage:SetRecordType_GENERIC Error - no valid Host]

>

SetRecordType_GRO

# Usage: [lib.SetRecordType_GRO]

# [Collection ID]=birth/death; [Collection Name]=Birth/Death
<
#-------------------------------------------------------------------------GRO Birth
[?:Collection Name=Birth]
[==:var.zRecordType:GRO Birth][==:var.zFact:Birth]
|
#-------------------------------------------------------------------------GRO Death
[?:Collection Name=Death]
[==:var.zRecordType:GRO Death][==:var.zFact:Death]
|
#-------------------------------------------------------------------------Error
[lib.ErrorMessage:SetRecordType_GRO Error - no valid Record Type]
>

#

SetRecordTypeFolder


# Description: Set fact folder dependent upon source type. A fact folder can contain one
#              or more source types.
#              Fact Folder BIRTHS can contain types Birth, SCI Birth, GRO Birth, Baptism, etc.
# Author: Alan
#
# Change History       Reason for change
# --------------       -----------------------------------------------------------------------------
# 19/01/2024           Initial creation
# 24/02/2024           New record type "Services".
# 06/05/2024           Added record type Burial BT
# 12/05/2024 BETA4     Added record type "TRX Marriage".
# 10/06/2024 BETA7_3   Added record type "School Admission".
# 12/06/2024 BETA7_6   Added record type "Newspaper Item".
# 15/06/2024 BETA6_9   Added record type "Workhouse Admission".
# 16/06/2024 BETA7     Added record type "FreeBMD Birth/Marriage/Death".
# 22/06/2024 BETA7     Added record type "DNA Match".
# 26/06/2024 BETA7_12  Added record type "Funeral Notice".
# 12/07/2024 BETA8_4   Added record type "Marriage Banns".
# 13/07/2024 BETA8_5   Added record type "US Federal Census".
# 24/07/2024 BETA9_8   Added record type "Canada Federal Census".


# Usage: [lib.SetRecordTypeFolder]

# Parameters...
#      {1} = None
# Input Variables...
#      [var.zRecordType]
#
# Called by:
#      [lib.SetRecordType]
# Calls:
#      [lib.ErrorMessage]



# Folder     Source Type             Fact
# ---------  ---------               ---------------------------------
# Births     Birth                   Birth
# Births     Baptism                 Baptism
# Births     Baptism BT              Baptism
# Births     Baptism PR              Baptism
# Births     GRO Birth               Birth
# Births     UKBMD Birth             Birth
# Deaths     Burial NC               Burial
# Marriages  Marriage                Marriage
# Marriages  UKBMD Marriage          Marriage
# Deaths     Burial                  Burial
# Deaths     Death                   Death
# Deaths     GRO Death               Death
# Deaths     UKBMD Death             Death
# Census     Census                  Census
# Census     Electoral Register      Electoral Register
# Census     1939 Register           1939 Register
# Newspaper  Newspaper               


<
# Births
[?:var.zRecordType=Birth][==:var.zFactFolder:Births]|
[?:var.zRecordType=Birth NC][==:var.zFactFolder:Births]|
[?:var.zRecordType=FreeBMD Birth][==:var.zFactFolder:Births]|
[?:var.zRecordType=GRO Birth][==:var.zFactFolder:Births]|
[?:var.zRecordType=SCI Birth][==:var.zFactFolder:Births]|
[?:var.zRecordType=TRX Birth][==:var.zFactFolder:Births]|
[?:var.zRecordType=UKBMD Birth][==:var.zFactFolder:Births]|

# Baptisms
[?:var.zRecordType=Baptism][==:var.zFactFolder:Births]|
[?:var.zRecordType=Baptism BT][==:var.zFactFolder:Births]|
[?:var.zRecordType=Baptism NC][==:var.zFactFolder:Births]|
[?:var.zRecordType=Baptism PR][==:var.zFactFolder:Births]|
[?:var.zRecordType=Baptism RC][==:var.zFactFolder:Births]|
[?:var.zRecordType=TRX Baptism][==:var.zFactFolder:Births]|

# Burials
[?:var.zRecordType=TRX Burial][==:var.zFactFolder:Deaths]|

# Census
[?:var.zRecordType=1939 Register][==:var.zFactFolder:Census]|
[?:var.zRecordType=Canada Federal Census][==:var.zFactFolder:Census]|
[?:var.zRecordType=Census][==:var.zFactFolder:Census]|
[?:var.zRecordType=Electoral Register][==:var.zFactFolder:Census]|
[?:var.zRecordType=US Federal Census][==:var.zFactFolder:Census]|

# Deaths
[?:var.zRecordType=Burial][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Burial BT][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Burial NC][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Cemetery][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Death][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=FreeBMD Death][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Funeral Notice][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Gravestone][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=GRO Death][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=Probate][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=SCI Death][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=TRX Death][==:var.zFactFolder:Deaths]|
[?:var.zRecordType=UKBMD Death][==:var.zFactFolder:Deaths]|

# Marriages
[?:var.zRecordType=Banns][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Divorce][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=FreeBMD Marriage][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage Banns][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage Bond][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage Licence][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage BT][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage Licence][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage NC][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=Marriage PR][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=SCI Marriage][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=TRX Marriage][==:var.zFactFolder:Marriages]|
[?:var.zRecordType=UKBMD Marriage][==:var.zFactFolder:Marriages]|

# Newspapers
[?:var.zRecordType=Newspaper][==:var.zFactFolder:Newspapers]|
[?:var.zRecordType=Newspaper Item][==:var.zFactFolder:Newspapers]|

# School Admission
[?:var.zRecordType=School Admission][==:var.zFactFolder:Others]|

# Services
[?:var.zRecordType=Services][==:var.zFactFolder:Services]|

# Others
[?:var.zRecordType=Trade Directory][==:var.zFactFolder:Others]|


# Photos
[?:var.zRecordType=Photo][==:var.zFactFolder:Photos]|


# Workhouse Admission
[?:var.zRecordType=Workhouse Admission][==:var.zFactFolder:Others]|

# Error
[lib.ErrorMessage:SetRecordTypeFolder - unrecognised source type]
>

# The source type folder is almost 100% the same as the FH folder where media will be stored.
[==:var.zFHFolder:[var.zFactFolder]]

SetRegisterType

[=:Start:SetRegisterType]
#
# Author : Alan
# Description: Used to fill in source citation template
#
# Change History        Reason for change
# --------------        ---------------------------------------------------------------
#                       Initial creation
#

# Usage : [lib.SetRegisterType:xx]
# 
# Called by:
#
# {1} - Register Types
# 
# Enter the Register Type Check.
[=:Register_Type:{1}]
# BT - Bishop Transcript
<[?:Register_Type=BT]{down*2}>
# NC - Non Conformist
<[?:Register_Type=NC]{down*3}>
# PR - Parish Register
<[?:Register_Type=PR]{down*4}>
{tab}
[=:End:SetRegisterType]

SetRepository

#[=:Start:SetRepository]
# Author: Alan
# Description: Use the ORA servicename as the repository but if it is a Generic service then use 
#              the ORA host name.

# Uage: [lib.SetRepository]

# Change History       Reason for change
# --------------       ---------------------------------------------------------------------
# 2023                 Creation
# 18/05/2024 BETA4     Use host name as the repository if it is a generic service.
# 16/06/2024 BETA7     Added FreeBMD.org.uk but needed to be carefule as UKBMD ends with 
#                       "bmd.org.uk".
# 26/06/2024 BETA8     Added record type "Funeral Notice" --> "funeral-notices.co.uk".


# Usage: [lib.SetRepository]
# Repository - 1st line selects drop down box & 2nd selects the repository
{Space}{Down}{Enter}
{Ctrl+D}

<
[?:Page.ServiceName=Generic Service]
# Use Host name to set up repository
<
[?:Page.Hostname=britishnewspaperarchive.co.uk]British Newspaper Archive
|
[?:Page.Hostname/^FreeBMD/]FreeBMD
|
[?:Page.Hostname/bmd.org.uk$/][Page.Hostname:replace:bmd.org.uk::l:InitialCapital]
|
[?:Page.Hostname=funeral-notices.co.uk]Funeral Notices
>
|
[?:Page.ServiceName=GRO UK]GRO{del}
|
[Page.ServiceName]
>


{F6}{Space}{Enter}
#[=:End:SetRepository]

SetRepositoryAS

[=:Start:SetRepositoryAS]
# Author: Alan
#
# Usage: [lib.SetRepositoryAS]

#
# Change History     Reason for change
# --------------     --------------------------------------------------------------------
# ??/??/2023         Initial creation
# 29/07/2023         Changed lookup method but relies on a dummy repository named "."
# 17/10/2023 1.0     Conversion of persistent variables into variances.

# Inside Repository window check for prefilled parameter
# <[?:Repository Prefilled=y]{tab}>  ---------not needed in version 7.7.8

# Focus is on {CANCEL} button so need to {TAB*2} to reach REPOSITORY field.
#{tab*2}  -----not needed in version 7.7.9

# Repository can only be found by starting at top list and going down. However everything must 
# be in the same place. The top of the list begins with "A". It is possible to start at "F" and 
# this will find FamilySearch and {down*1} will get Findmypast.
# The first record in the list is 0. So {down} will get next Repository after Ancestry.
#
# Current list of Repositories in MEDOWS project...

# A
#   Ancestry
#   Ayrshire Archives
#
# B
#   Billion Graves
#   Borthwick Institute for Archives
#   British Newspaper Archive
#
# C
#   Carlisle Records Office
#
# D
#   Deceased Online
#   Doncaster Family History Society
#
# F
#   FamilySearch
#   Find-A-Grave
#   Findmypast
#   Funeral Notices
#
# G
#   GRO
#   GROS
#
# L
#   London Metropolitan Archives
#
# M
#   Medows Family
#   Mitchell Library, Glasgow
#
# N
#   Northumberland Archives



# AS requires single character to get to start of group and then use
# down arrow to get to required entry...very unreliable

[=:var.Debug:1]


# Start position is Repository field on templated source then move to Repository drop down box (>)
{tab}{Enter}

<
[?:Page.ServiceName=Findmypast].F[lib.SetRepositoryPosition]
|
[?:Page.ServiceName=Ancestry].A[lib.SetRepositoryPosition]
|
[?:Page.ServiceName=FamilySearch].F[lib.SetRepositoryPosition]
>

{tab}
{Enter}

# Move to next field
{tab}


#***********
<[?:var.Debug=0]
#***********
# DO NOTHING
>

[=:End:SetRepositoryAS]

SetRepositoryPosition

#[=:Start:SetRepositoryPosition]
# Author: Alan
# Description: It is not possible to input the exact repository name in Ancestral Sources (AS).
#              With AS you put in the first letter of the repository name and use the mouse or
#              press {DOWN} key to select the correct repository. With multiple projects the
#              position of the Repository could be different.
# Usage: [lib.SetRepositoryPosition]
# Called by: [lib.SetRepositoryAS]
# Parameters:  none
# Input variables: none
#
# Change History     Reason for change
# --------------     --------------------------------------------------------------------
# 06/09/2023         Initial creation
# 20/09/2023         Added project control for user Suzanne - new "Bailey George_EP".
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 08/11/2023         Added position of "FamilySearch" repository for user "Alan" for 
#                    projects "Medows" & "Medows-Lambert_ANC".
# 28/01/2024         New repository starting with "A" added - "Aberdeen & North East Schotland"
#                    which pushes Ancestry down in the list by 1.
# 08/02/2024         Removed list of repositories.
#                    Validated that project has been set up to be used in Ancestral Sources.
#                    Change [z_Project] to project.
# 08/05/2024         Reworked way of finding the repository position in AS by using fields
#                    [var.AS_ANC_Position] and [var.AS_FMP_Position] which are set by user and project
#                    in [lib.SetWindowsUser_xxxx] where xxxx = Windows Username.





[=:var.Debug:1]

# Objects that affect the position of the repository are...
# [Windowsuse]
# [z_Project] (Project is not currently checked.)
# [Page.ServiceName]
#
#
# === Separator between services Ancestry, Findmypast and Familysearch
# +++ Change of user

<
#============================================================================== Ancestry (ANC)
[?:Page.ServiceName=Ancestry]

<
[?:var.AS_ANC_Position=Enter]{Enter}
|
[?:var.AS_ANC_Position=Down1]{Down}
|
[?:var.AS_ANC_Position=Down2]{Down*2}
|
[?:var.AS_ANC_Position=Down3]{Down*3}
|
[?:var.AS_ANC_Position=Down4]{Down*4}
|
[?:var.AS_ANC_Position=Down5]{Down*5}
|
[lib.ErrorMessage:SetRepPos error - no position for project in Ancestry]
>


|
#============================================================================== Findmypast (FMP)
[?:Page.ServiceName=Findmypast]

<
[?:var.AS_FMP_Position=Enter]{Enter}
|
[?:var.AS_FMP_Position=Down1]{Down}
|
[?:var.AS_FMP_Position=Down2]{Down*2}
|
[?:var.AS_FMP_Position=Down3]{Down*3}
|
[?:var.AS_FMP_Position=Down4]{Down*4}
|
[?:var.AS_FMP_Position=Down5]{Down*5}
|
[lib.ErrorMessage:SetRepPos error - no position for project in Findmypast]
>

|
#============================================================================== Familysearch (FS)
[?:Page.ServiceName=FamilySearch]
<
[lib.ErrorMessage:SetRepPos error - no position for project in FamilySearch]
>


#===================================================================== End of services (ANC & FMP & FS)
>

# Debug lines
<[?:var.Debug=0]

# DO NOTHING
>

#[=:End:SetRepositoryPosition]

SetResearchDate

[=:Start:SetResearchDate]
# Usage: [lib.SetResearchDate]
[Page.Access Date]
[=:End:SetResearchDate]

SetSourceCitation

[=:Start:SetSourceCitation]
#
# Author : Alan
#
# Description: This saves the source citation type so it overcomes the problem when trying 
#              to restore the correct source.
#
# Parameters: None
# Input variables: [zSourceType], [zGraveType]
# Output variables: [zSourceCitation]
#
# Usage : [lib.SetSourceCitation]
# 
# Change History     Reason for change
# ---------------    ------------------------------------------------------------------
# 17/08/2023         Initial creation.
# 19/09/2023 09:00   Updated the Source Citation to include the Newspaper name.
# 17/10/2023 1.0     Conversion of persistent variables into variances.
#


<
[?:var.zRecordType=Burial]
# If Grave Type not blank then it is indicative that source is "Find a Grave".
# (G)ravestone
<
[?:var.zGraveType=G][=:SourceCitationType:Gravestone]
|
# (M)emorial
[?:var.zGraveType=M][=:SourceCitationType:Memorial]
|
# Memorial (I)nscription
[?:var.zGraveType=I][=:SourceCitationType:MI]
>
|
[?:var.zRecordType=Newspaper]
[=:SourceCitationType:[var.zNewItemType:prepend:Newspaper :append: of :append:[var.zNewsAnnouncementType]]]

|
[=:SourceCitationType:[var.zRecordType]]


>


# Set Source Citation Name========================================================
[==:var.zSourceCitation:[SourceCitationType:append:, :append:[var.zFactYear]:append:, :append:[var.zSurname]:append: :append:[var.zGivenName]]]

# ...if marriage append spouse name
<[?:var.zSpouseSurname][==:var.zSourceCitation:[var.zSourceCitation:append: & :append:[var.zSpouseSurname]:append: :append:[var.zSpouseGiven]]]>

# ...if Newspaper append newspaper name
<[?:var.zRecordType=Newspaper][==:var.zSourceCitation:[var.zSourceCitation:append:, :append:[var.zNewspaper]]]>



[=:End:SetSourceCitation]

SetSourceType

# Author: Alan
#
# Description: An attempt to provide an alternative source type when there is duplication of a 
#              source collection.
#
# Usage: [lib.SetSourceType]
#
#              Conflicts found so far...
#
#              Collection                      Service        Conflicting Source Types
#              ---------------------------     -------        ------------------------
#              Hampshire Portsmouth Burials    Findmypast     Burial, Cemetery
#                                                             (use Record ID or Register Type)

#
# Change History     Reason for Change
# --------------     -------------------------------------------------------------------
# 17/10/2023         Initial creation
# 17/10/2023 1.0     Conversion of persistent variables into variances.
# 16/05/2024 BETA4   Changed [var.z_*] to [var.z*].



<
#===============================ANCESTRY===================================================
[?:Page.ServiceName=Ancestry]
<
# Baptism----------------------------------------------------------------------------------
[?:Event Type=Baptism][==:var.zSourceType:Baptism]
<[?:Source.Title/Non_conform/][==:var.zRegisterType:NC]>
|
# Burial----------------------------------------------------------------------------------
[?:Event Type=Burial][==:var.zSourceType:Burial]
<[?:Source.Title/Non_conform/][==:var.zRegisterType:NC]>
|
# Census-----------------------------------------------------------------------------------
[?:Source.Title/Census/][==:var.zSourceType:Census]
|
#1939 Register-----------------------------------------------------------------------------
[?:Source.Title/1939/][==:var.zSourceType:1939 Register]
|
# SCI Birth (method 1)---------------------------------------------------------------------
[?:Record ID:split:\::1=8912][==:var.zSourceType:SCI Birth]
|
# SCI Birth (method 2)
[?:Source.Title/Civil Registration Birth Index/][==:var.zSourceType:SCI Birth]
|
# SCI Birth (method 2)
[?:Source.Title/Civil Registration Birth Index/][==:var.zSourceType:SCI Birth]
|
#Probate (method 1)------------------------------------------------------------------------
[?:Collection ID=1904][==:var.zSourceType:Probate]
|
#Probate (method 2)
[?:Collection ID=60558][==:var.zSourceType:Probate]
|
#Probate (method 3)
[?:Source.Title/National Probate/][==:var.zSourceType:Probate]
>

|
#===============================FINDMYPAST==================================================
[?:Page.ServiceName=Findmypast]

# General
<
[?:Record set/Bishop's Transcripts/][==:var.zRegisterType:BT]
|[?:Records set/Bishop's Transcripts/][==:var.zRegisterType:BT]
>



<
# Census
[?:Record set/Census/][==:z_SourceType:Census]
|
# 1939 Register
[?:Archive reference/RG101/][==:z_SourceType:1939 Register]
|
# Cemetery
[?:Record ID/\/CEMETERY\//][==:z_SourceType:Cemetery]
|
# Marriage Banns
[?:Marriage Banns Date][==:var.zSourceType:Marriage Banns]
|
# Marriage
[?:Marriage Date][==:var.zSourceType:Marriage]
>

|
#===============================FAMIYSEARCH================================================
[?:Page.ServiceName=FamilySearch]

# General
<
[?:Record set/Bishop's Transcripts/][==:var.zRegisterType:BT]
|[?:Records set/Bishop's Transcripts/][==:var.zRegisterType:BT]
>



<
# Christening/Baptism
[?:Event Type=Christening][==:z_SourceType:Baptism]
|
# Census
[?:Record set/Census/][==:z_SourceType:Census]
|
# 1939 Register
[?:Archive reference/RG101/][==:z_SourceType:1939 Register]
|
# Cemetery
[?:Record ID/\/CEMETERY\//][==:z_SourceType:Cemetery]
|
# Marriage Banns
[?:Marriage Banns Date][==:var.zSourceType:Marriage Banns]
|
# Marriage
[?:Marriage Date][==:var.zSourceType:Marriage]
>

|
#===============================GRO UK====================================================
[?:Page.ServiceName=GRO UK]
# Determine Civil Registration Type
<
[?:Birth Year]
[==:var.zFactType:Birth]
[==:var.zSourceType:GRO Birth]
|
[?:Death Year]
[==:var.zFactType:Death]
[==:var.zSourceType:GRO Death]
>


#===============================END=======================================================
>

[=:End:SetSourceType]

SetSourceTypeConflicts

[=:Start:SetSourceTypeConflicts]

# Author: Alan
#
# Description: An attempt to provide an alternative source type when there is duplication of a 
#              source collection.
#
# Usage: [lib.SetSourceTypeConflicts]
#
#              Conflicts found so far...
#
#              Collection                      Service        Conflicting Source Types
#              ---------------------------     -------        ------------------------
#              Hampshire Portsmouth Burials    Findmypast     Burial, Cemetery
#                                                             (use Record ID or Register Type)

# Change History...
# Date             Reason for Change
# 11/09/2023       Initial creation


<
[?:Page.ServiceName=Findmypast]


<[?:Record ID/\/CEMETERY\//][==:z_SourceType:Cemetery]>


>

[=:End:SetSourceTypeConflicts]

SetVersion

[=:Start:SetVersion]
# Usage: [lib.SetVersion]
#[==:Version:12/04/2024 22:01 ***WIP*** GE Extra]
#[==:Version:28/04/2024 18:45 ***WIP*** GE BETA 2]
#[==:Version:09/05/2024 22:00 ***WIP*** GE BETA 3]
#[==:Version:20/05/2024 22:00 ***WIP*** GE BETA 4]
#[==:Version:21/05/2024 08:30 ***WIP*** GE BETA 5]
#[==:Version:06/06/2024 12:30 ***WIP*** GE BETA 6]
#[==:Version:22/06/2024 13:30 ***WIP*** GE BETA 7]
#[==:Version:08/07/2024 16:30 ***WIP*** GE BETA 8]
#[==:Version:18/07/2024 17:31 ***WIP*** GE BETA 9]
[==:Version:18/07/2024 17:31 ***WIP*** GE BETA 10]
[=:End:SetVersion]

#-------------------------------------------------------------------------------------------------
# Changes made since 01/02/2024 08:55
# [lib.SetVersion]                      Update of release date with change log.
# [lib.Get_Registry]                    New template.
# [lib.SetVersion]                      New template to show ORA Settings versin release.
# [lib.SetWindowsUser]                  Added [lib.SetVersion].
# [lib.GetGender]                       Added Georgina.
# [lib.SetFolderPathDisplay]            Empty parameter shown as paramater number between {}.
# [lib.SetSourceTypeConflicts]          New template
# [lib.SetSourceTypeConflicts]          Different record types in same collection --> Hampshire
# [lib.Fix_AS_Age]                      Incorporated John Cardinal's code to recognise months and days.
# [lib.ValidatePlace:Place]             Only validate place if not equal "***Enter".
# [lib.InitVars_ANC]                    Updated to use common fields for [lib.Add_AS_Burial]
# [lib.InitVars_FMP]                    Updated to use common fields for [lib.Add_AS_Burial]
# [lib.Add_AS_Burial]                   Updated to use the common fields - [var.zXXXXXXX]
# [lib.Add_AS_Burial]                   If any field = nk (not known) ensure field is blank.
# [lib.Add_AS_Burial_Templated_Source]  Updated to use the common fields - [var.zXXXXXXX]

#-------------------------------------------------------------------------------------------------
# Changes made since 02/02/2024 08:55 --> release date 04/02/2024 11:00
# [lib.Add_Death_cite_Probate]          New template
# [lib.Add_Residence_cite_Probate]      New template
# [lib.Fix_AS_Age]                      Fix to allow 2 time periods such as 14m 11d.
# [lib.GetGender]                       Added Horace, Rhoda, Eusebius, Ayshe.
# [lib.Get_GRO_DistrictCounty]          Added St Saviour Southwark London; Mile End Old Town.
# [lib.Get_GRO_DistrictCounty]          Added Farnham.
# [lib.Get_GRO_DistrictCounty]          Added Battersea.
# [lib.Get_GRO_DistrictCounty]          Added Kingston upon Thames.
# [lib.Get_GRO_DistrictCounty]          Added Brighthelmston RegDist, Sussex, England.
# [lib.Get_GRO_DistrictCounty]          Added Torbay Regdist, Devon, England.
# [lib.Get_GRO_DistrictCounty]          Added Bridge Regdist, Kent, England.
# [lib.Get_GRO_DistrictCounty]          Added Faringdon Regdist, Berkshire, England.
# [lib.Get_Registry]                    New template
# [lib.GetCivilReg]                     Ancestry uses alternative district field for death - [Death Registration Place]
# [lib.GetMedia]                        New template
# [lib.GRO]                             Converted variables fields from var.z_ to var.z.
# [lib.GRO]                             Changed var.zSourceType to var.zRecordType
# [lib.GRO]                             Added {Tab} after [lib.SetResearchPlace].
# [lib.GRO]                             Commented out duplicate call of [lib.Get_GRO_DistrictCounty].
# [lib.InitVars]                        Enabled [lib.InitVars_GRO] to run.
# [lib.InitVars_ANC]                    Added transform "dateYear" to [Registration Date:dateYear]
# [lib.InitVars_ANC]                    Changed [var.DeathAge] to [var.zDeathAge].
# [lib.InitVars_ANC]                    New record type "DNA Match".
# [lib.InitVars_FMP]                    Added [var.zMothersMaidenName] for SCI Birth
# [lib.InitVars_FMP]                    Changed [var.DeathAge] to [var.zDeathAge].
# [lib.InsertTextfromSource:Probate]    New template
# [lib.InstructionsServices]            New record type "Services".
# [lib.Probate]                         New template
# [lib.SCI.Death]                       New option [var.ConfigSourceType] for generic/templated source
# [lib.SetRecordType]                   Check for undeclared Record Type in [lib.SetFolderPathDisplay]
# [lib.SetSourceCitation]               New template
# [lib.SetWindowsUser]                  New option [var.ConfigSourceType] for generic/templated source
# Collection added                      (GRO UK) Birth.
# Collection added                      (GRO UK) Death.
# Collection added                      (FMP) England & Wales Births 1837-2007.
# Collection added                      (FMP) England & Wales Deaths 1837-2007.
# Collection added                      (ANC) England & Wales, Civil Registration Death Index, 1837-1915.
# Collection added                      (ANC) England & Wales, Civil Registration Death Index, 1916-2007.
# Collection added                      (FMP) England & Wales Government Probate Death Index 1858-2019
# Collection added                      (ANC) England & Wales, National Probate Calendar (Index of Wills and Administrations), 1858-1995
#------------------------------------------------------------------------------------------------------
# Changes made since 04/02/2024 11:45 --> release date 04/02/2024 13:50
# [lib.GetCivilReg]                     Ancestry uses alternative district field for birth - [Registration Place]
# [lib.ValidateInputField]              Emergency fix to remove validation of an ORA input field.
# [lib.ValidatePlace]                   Emergency fix to remove validation of a place.
#------------------------------------------------------------------------------------------------------
# Changes made since 04/02/2024 13:50 --> release date 04/02/2024 16:15

# [lib.Get_GRO_DistrictCounty]          Removed the prompt for missing GRO Reg District and replaced with [var.zError].
#------------------------------------------------------------------------------------------------------
# Changes made since 04/02/2024 16:15 --> 07/02/2024 09:00 
# Collection added                      (FMP) England & Wales Marriages 1837-2005
# Collection added                      (ANC) England & Wales, Civil Registration Marriage Index, 1837-1915
# Collection added                      (ANC) England & Wales, Civil Registration Marriage Index, 1916-2005
# Collection added                      (GRO UK) Birth
# [lib.InitVars_GRO]                    Check if [Mother's Maiden Surname] is empty ie. Shows "-" only.
# [lib.ErrorMessage]                    New library to capture error messages.
# [lib.InstructionsGRO:Birth]           Display error messages.
# Many templates                        Change all error messages to use [lib.ErrorMessage].
# Instructions templates                Display error messages using [lib.ErrorMessageDisplay]
# [lib.Add_AS_Baptism_Templated_Source] Amended to output space for fields that have "nk" (not known).
#------------------------------------------------------------------------------------------------------
# Changes made since 07/02/2024 09:00  --> 27/02/2024 09:30
# [lib.Add_AS_1939_Register]            Introduced 1939 functionality
# [lib.Add_AS_1939_Register_Templated_Source] Introduced 1939 functionality
# [lib.Add_AS_Marriage]                 Checked for nk for Spouse Father, Individ Father Occ. and Minister.
# [lib.AS_Reset]                        Fix reset problem not selecting Clear/Reset option.
# [lib.Get_GRO_DistrictCounty]          Added Newington.
# [lib.Get_GRO_DistrictCounty]          Enlarged consolidated list of Reg Districts.
# [lib.GetCivilReg]                     Added [lib.GetGender] check.
# [lib.GetGender]                       Replace prompt for Gender/Gendername with [lib.ErrorMessage:{1}]
# [lib.GetGender]                       Enlarged consolidated list of gender names.
# [lib.InitVars_ANC]                    Check to spouse entered in Other Records.
# [lib.InitVars_ANC]                    Added new record type "Services".
# [lib.InitVars_ANC]                    For SCI Marriage an additional field to be checked - [Registration Date].
# [lib.InitVars_FMP]                    Check to spouse entered in MarriageFinder.
# [lib.InitVars_FMP]                    Added code to handle record type MARRIAGE.
# [lib.InitVars_FMP]                    Used [Archive reference] to set [var.zArchiveReference].
# [lib.InitVars_FMP]                    Added new record type "Services".
# [lib.InstructionsCivilReg]            Made marriage lines for spouse conditional.
# [lib.SCI_Death:Fact]                  Do not add notes on death fact - comment out [lib.SetGRORefNote]
# [lib.Services_ANC]                    New routine to set up service records.
# [lib.Services_FMP]                    New routine to set up service records.
# [lib.Services Media Name]             New outine to set up service records.
# [lib.SetFolderPathDisplay]            New record type "Services".
# [lib.SetMarriageType]                 Replace [z_* with [z*.
# [lib.SetRecordType]                   New record type "Services".
# [lib.SetRecordTypeFolder]             New record type "Services".
# [lib.SetRepositoryPosition]           Removed list of repositories.
# [lib.SetRepositoryPosition]           Validate [Project] has been set up to be used in AS.
# [lib.SetRepositoryPosition]           Change [z_Project] to [Project].
# [lib.SetVersion]                      Latest version number and fix/enhancement details.
# [lib.ValidatePlace:Place]             Reinstate place validation using [lib.ErrorMessage]
# [lib.ValidateInputField]              Reinstate place validation using [lib.ErrorMessage]
# Collection new                        (FMP) Devon Marriages And Banns
# Collection updated                    (FMP) England & Wales Births 1837-2006
# Collection updated                    (ANC) England & Wales, Civil Registration Death Index, 1837-1915
# Collection updated                    (ANC) England & Wales, Civil Registration Death Index, 1916-2007
# Collection updated                    (FMP) England & Wales Deaths 1837-2007
# Collection updated                    (ANC) England & Wales, Civil Registration Marriage Index, 1837-1915
# Collection updated                    (ANC) England & Wales, Civil Registration Marriage Index, 1916-2005
# Collection updated                    (FMP) England & Wales Marriages 1837-2005
# Collection new                        (ANC) De Ruvigny's Roll of Honour, 1914-1919
# Collection new                        (ANC) Global, Find a Grave® Index for Burials at Sea and other Select Burial Locations, 1300s-Current
# Collection new                        (ANC) Indian Army Quarterly List for 1 January 1912
# Collection new                        (ANC) Royal Air Force Airmen Records, 1918-1940
# Collection new                        (ANC) Royal Navy Registers of Seamen's Services, 1848-1939
# Collection new                        (ANC) Soldiers Died in the Great War, 1914-1919
# Collection new                        (ANC) UK and Allied Countries, World War II Liberated Prisoner of War Questionnaires, 1945-1946
# Collection new                        (ANC) UK, Army Registers of Soldiers' Effects, 1901-1929
# Collection new                        (ANC) UK, British Army Records and Lists, 1882-1962
# Collection new                        (ANC) UK, British Army World War I Medal Rolls Index Cards, 1914-1920
# Collection new                        (ANC) UK, British Army World War I Pension Records 1914-1920
# Collection new                        (ANC) UK, British Army World War I Service Records, 1914-1920
# Collection new                        (ANC) UK, Military Deserters, 1812-1927
# Collection new                        (ANC) UK, Naval Medal and Award Rolls, 1793-1972
# Collection new                        (ANC) UK, Naval Officer and Rating Service Records, 1802-1919
# Collection new                        (ANC) UK, Navy Lists, 1888-1970
# Collection new                        (ANC) UK, Roll of the Indian Medical Service, 1615 -1930
# Collection new                        (ANC) UK, Royal Air Force Airmen Records, 1918-1940
# Collection new                        (ANC) UK, Royal Navy Registers of Seamen's Services, 1848-1939
# Collection new                        (ANC) UK, Soldiers Died in the Great War, 1914-1919
# Collection new                        (ANC) UK, World War I Pension Ledgers and Index Cards, 1914-1923
# Collection new                        (ANC) UK, World War I Service Medal and Award Rolls, 1914-1920
# Collection new                        (ANC) Web: UK, Royal Naval Seamen Index, 1853 -1872
# Collection new                        (ANC) World War I Pension Ledgers and Index Cards, 1914-1923
# Collection new                        (FMP) Britain, Campaign, Gallantry & Long Service Medals & Awards
# Collection new                        (FMP) British Armed Forces Soldiers' Wills 1850-1986
# Collection new                        (FMP) British Army Service Records
# Collection new                        (FMP) British Army, Local Armed Forces' Enrolment Forms, Anglo-Boer War 1899-1902
# Collection new                        (FMP) British Army, Royal Artillery Officers 1716-1899
# Collection new                        (FMP) British Army, Royal Engineers 1900-1949
# Collection new                        (FMP) British Royal Air Force, Airmen's Service Records 1912-1939
# Collection new                        (FMP) British Royal Navy Seamen 1899-1924
# Collection new                        (FMP) British Royal Navy, Ships' Musters
# Collection new                        (FMP) Commonwealth War Graves Commission Debt Of Honour
# Collection new                        (FMP) Easter Rising & Ireland Under Martial Law 1916-1921
# Collection new                        (FMP) Harts Army List 1888
# Collection new                        (FMP) Lives Of The First World War 1914-1918
# Collection new                        (FMP) Prisoners Of War 1715-1945
# Collection new                        (FMP) Scotland, Jacobite Rebellions 1715 And 1745
# Collection new                        (FMP) Soldiers Died In The Great War 1914-1919
#------------------------------------------------------------------------------------------------------
# Changes made since 27/02/2024 09:31  --> 27/02/2024 11:30
# [lib.Services Media Name]             New outine to set up service records.
# [lib.SetVersion]                      Latest version number and added missing templates.
#------------------------------------------------------------------------------------------------------
# Changes made since 27/02/2024 11:31  --> 01/03/2024 22:00
# [lib.AS_Reset]                        Change the method of resetting as it was inconsistent.
# [lib.Find_AS_ID]                      Changed method of selecting fact view.
# [lib.GetCivilReg]                     Register number and entry number introduced from Jan 1990s to replace volume and page for SCI Birth and SCI Death.
# [lib.GetGender]                       Added Edgar.
# [lib.Get_GRO_DistrictCounty]          Added Chichester, Sussex, England.
# [lib.Get_GRO_DistrictCounty]          Added "," (comma) missing from field [DistrictCounty].
# [lib.Get_GRO_DistrictCounty]          Added Surrey South Western RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added Hastings and Rother RegDist, Sussex, England.
# [lib.Get_GRO_DistrictCounty]          Added Yarmouth RegDist, Norfolk, England.
# [lib.InitVars_ANC]                    Fixed media name - Replaced [zMothersMaidenName] with [var.zMothersMaidenName].
# [lib.InitVars_ANC]                    Added transform "dateYear" to [Registration Date].
# [lib.InitVars_FMP]                    In SCI Marriage checked for presence of [Spouse's last name]
# [lib.InstructionsBaptism]             Removed lines that were copied from [lib.InstructionsMarriage].
# [lib.SCI_Marriage]                    If [Spouse's last name] present then set Pricipal2
# [lib.SetFolderPathDisplay]            Fixed media name - Replaced [var.zMotherMaidenName] with [var.zMothersMaidenName].
# [lib.SetRecordType]                   Record type check for Baptism was showing Baptisms incorrectly.
# [lib.SetVersion]                      Latest version number 01/03/2024 22:00.
# Ancestral Sources                     Added "No." to Electoral Register template 1945
#------------------------------------------------------------------------------------------------------
# Changes made since 01/03/2024 22:01  --> 05/04/2024 21:45
# [lib.ErrorMessage]                    Introduced 2nd parameter to hold name of field in error.
# [lib.ErrorMessage]                    Error message count introduced.
# [lib.ErrorMessageDisplay]             Font size reduced from 110% to 80%.
# [lib.Get_GRO_DistrictCounty]          Added Chichester, Sussex, England.
# [lib.Get_GRO_DistrictCounty]          Added "," (comma) missing from field [DistrictCounty].
# [lib.Get_GRO_DistrictCounty]          Added Surrey South Western RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added Hastings and Rother RegDist, Sussex, England.
# [lib.Get_GRO_DistrictCounty]          Added Yarmouth RegDist, Norfolk, England.
# [lib.Get_GRO_DistrictCounty]          Added Heywood RegDist, Lancashire, England
# [lib.Get_GRO_DistrictCounty]          Added Littleborough RegDist, Lancashire, England
# [lib.Get_GRO_DistrictCounty]          Added Denbighshire North RegDist, Denbighshire, Wales.
# [lib.Get_GRO_DistrictCounty]          Speeded up search process using 1st letter.
# [lib.Get_GRO_DistrictCounty]          Changed to use [lib.Get_GRO_DistrictCounty_Error].
# [lib.Get_GRO_DistrictCounty]          Added St Martin in the Fields RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added St. Martin in the Fields RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added St Martin RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added Richmond RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added Richmond (Surrey) RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added Wycombe, Buckinghamshire and Oxfordshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Grimsby Regdist, Lincolnshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Doncaster Regdist, Yorkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Oxford RegDist, Oxfordshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Truro RegDist, Cornwall, England.
# [lib.Get_GRO_DistrictCounty]          Added Added Amersham RegDist, Buckinghamshire, England.
# [lib.Get_GRO_DistrictCounty]          Added York RegDist, Yorkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Andover RegDist, Hampshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Wantage RegDist, Berkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Wallingford RegDist, Berkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Witney RegDist, Oxfordshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Chelsea RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added Fulham RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added St George Hanover Square RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added St. George Hanover Square RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added Rochford RegDist, Essex, England.
# [lib.Get_GRO_DistrictCounty]          Added Scunthorpe RegDist, Lincolnshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Romford RegDist, Essex, England.
# [lib.Get_GRO_DistrictCounty]          Added Reading RegDist, Berkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Bridport RegDist, Dorset, England.
# [lib.Get_GRO_DistrictCounty]          Added Weymouth RegDist, Dorset, England.
# [lib.Get_GRO_DistrictCounty]          Added Beaminster RegDist, Dorset, England.
# [lib.Get_GRO_DistrictCounty]          Added Wandsworth RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added Bermondsey RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added Canterbury RegDist, Kent, England.
# [lib.Get_GRO_DistrictCounty]          Added Colchester RegDist, Essex, England.
# [lib.Get_GRO_DistrictCounty]          Added Edmonton RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added Enfield RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added Hounslow RegDist, Middlesex, England.
# [lib.Get_GRO_DistrictCounty]          Added Hungerford RegDist, Berkshire, England.
# [lib.Get_GRO_DistrictCounty]          Added Kingston upon Thames RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added London City RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added Milton City RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added Paddington RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added Richmond upon Thames RegDist, Surrey, England.
# [lib.Get_GRO_DistrictCounty]          Added St Saviour Southwark RegDist, London, England.
# [lib.Get_GRO_DistrictCounty]          Added St Saviour Southwark RegDist, London, England.
# [lib.Get_GRO_DistrictCounty_Error]    *New*
# [lib.GetGender]                       Added Angus, Lee, Lomas, Matthew, Neil.
# [lib.GetGender]                       Speeded up search process using 1st letter.
# [lib.GetGender]                       Changed to use [lib.GetGenderError].
# [lib.GetGenderError]                  *New*
# [lib.GetCivilReg]                     Added field [var.zBirthDate] in Ancestry and Findmypast.
# [lib.GetGender]                       Added Lee.
# [lib.InitVars]                        Clear new [var.zErrorMessageCount]
# [lib.InitVars_ANC]                    Added [Mother] as an alternative maiden name in SCI Birth.
# [lib.InitVars_FMP]                    Registration year not being picked up.
# [lib.InitVars_GRO]                    From ??? the Age At Death was replaced with Birth Year.
# [lib.SCI_Birth]                       Added check for civil reg changeover from paper to digital online (1984)
# [lib.SCI_Death]                       Added check for civil reg changeover from paper to digital online (1984)
# [lib.SCI_Marriage]                    (ANC) Check for [Spouse].
# [lib.SCI_Marriage]                    Added {tab} after inserting groom's media file.
# [lib.SCI_Marriage]                    Added check for civil reg changeover from paper to digital online (1984)
# [lib.SetVersion]                      Latest version number 05/04/2024 21:45.
#---------------------------------------------------------------------------------------------------
# Changes made since 05/04/2024 21:46 --> 12/04/2024 22:00
# [lib.GetCivilReg                      Updated setting of Volume, Page, Register Number and Entry Number.
# [lib.GetGender]                       Added new given names.
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.Add_AS_1939_Register_Templated_Source] Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_Baptism_Templated_Source] Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_Burial_Templated_Source]  Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_Census_Templated_Source]  Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_ElectoralRegister_Templated_Source] Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_Marriage_Templated_Source] Changed [lib.SetResearchPlace] to [Research Place].
# [lib.GRO]                             Changed [lib.SetResearchPlace] to [Research Place].
# [lib.InitVars_FMP]                    Removed word ERROR out of MarriageFinder error message.
# [lib.Newspaper_BNA]                   Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Newspaper_BNA_v2]                Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Newspaper_FMP]                   Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Probate]                         Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SCI_Birth]                       Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SCI.Death]                       Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SCI_Marriage]                    Changed [lib.SetResearchPlace] to [Research Place].
# [lib.WriteBaptism]                    Changed [lib.SetResearchPlace] to [Research Place].
# [lib.WriteBirth]                      Changed [lib.SetResearchPlace] to [Research Place].
# [lib.WriteDeath]                      Changed [lib.SetResearchPlace] to [Research Place].
# [lib.WriteGRO]                        Changed [lib.SetResearchPlace] to [Research Place].
# [lib.WriteMarriage]                   Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SCI_Media]                       Added new library for SCI Birth and Death.
# [lib.SetWindowsUser]                  Added [Research Place].


#---------------------------------------------------------------------------------------------------
# Changes made since 12/04/2024 22:01 --> 28/04/2024 22:00 BETA 2
# Collection new                        (FaG) Memorials
# [lib.InstructionsGravestone]          New
# [lib.InitVars_BG]                     New - BillionGrave
# [lib.InitVars_FAG]                    New - Find a Grave
# [lib.InitVars_FMP]                    Added new record tyes Newspaper and Newspaper Item
# [lib.Find-A-Grave]                    New
# [lib.InitVars_FAG]                    New - Generic - BNA, etc
# [lib.InitVars_Newspapers]             New - Newspapers
# [lib.GetCivilReg_v2]                  New - attempt to test out a replacement routine.
# [lib.SetGraveType]                    New
# [lib.SetResearchDate]                 New
# [lib.SetRegisterType]                 New
# [lib.SetVersion]                      Updated [==:Version:12/04/2024 22:01 ***WIP***]
# Source Template                       Gravestone/Memorial/Monumental Inscription (Miscellaneous)
# Repository                            Find a Grave
# [lib.SetWindowsUser]                  Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Alan]             *New* Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Brian]            *New* Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Graham]           *New* Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Howard]           *New* Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Jenni]            *New* Updated for revamp to include Alan's collections
# [lib.SetWindowsUser_Suzan]            *New* Updated for revamp to include Alan's collections
# Collection                            *New*  Berkshire Baptisms Index
# Collection                            *Updated* London, England, Church of England Marriages
# Collection                            *New* Hampshire, Portsmouth Marriages
# Collection                            *New* Berkshire Burial Index
# Collection                            *New* Lancashire, England, Church of England Marriages and Banns, 1754-1936
# Collection                            *New* Lancashire, England, Church of England Births and Baptisms, 1813-1911
# Collection                            *New* Somerset, England, Church of England Baptisms, 1813-1914
# Collection                            *New* Suffolk Baptism Index 1538-1911
# Collection                            *New* Lancashire Burials
# Collection                            *New* Northumberland Burials
# Collection                            *Updated* Denbighshire Baptisms
# Collection                            *New* Lancashire Baptisms
# Collection                            *New* Lancashire Banns & Marriages
# Collection                            *New* Kent Baptisms
# Collection                            *New* Kent Burials
# Collection                            *New* Warwickshire Burials
# Collection                            *New* Warwickshire Marriages
# Collection                            *New* Yorkshire Banns
# Collection                            *New* Yorkshire Baptisms
# Collection                            *New* Yorkshire Burials
# Collection                            *New* Yorkshire Marriages
# Collection                            *New* Hampshire Baptisms
# Collection                            *New* Hampshire, Portsmouth Burials
# Collection                            *New* West Sussex, England, Church of England Births and Baptisms, 1813-1920
# Collection                            *New* West Sussex, England, Church of England Deaths and Burials, 1813-1995
# Collection                            *New* West Sussex, England, Church of England Marriages and Banns, 1754-1936
# Collection                            *New* West Yorkshire, England, Church of England Births and Baptisms, 1813-1910
# Collection                            *New* West Yorkshire, England, Church of England Marriages and Banns, 1813-1935
# Collection                            *New* West Yorkshire, England, Electoral Registers, 1840-1962
# Collection                            *New* Westminster, London, England, Church of England Marriages and Banns, 1754-1935
# Collection                            *New* York, Yorkshire, England, Church of England Births and Baptisms, 1813-1920
# Collection                            *New* York, Yorkshire, England, Church of England Deaths and Burials, 1813-1995
# Collection                            *New* York, Yorkshire, England, Church of England Marriages, 1754-1936
# Collection                            *New* Surrey, England, Church of England Baptisms, 1813-1921
# Collection                            *New* Surrey, England, Church of England Burials, 1813-1997
# Collection                            *New* Surrey, England, Church of England Marriages and Banns, 1754-1937
# Collection                            *New* Surrey, England, Electoral Registers, 1832-1962
# Collection                            *New* Somerset, England, Church of England Baptisms, 1813-1914
# Collection                            *New* Somerset, England, Marriage Registers, Bonds and Allegations, 1754-1914
# Collection                            *New* Oxfordshire, England, Church of England Marriages and Banns, 1754-1930
# Collection                            *New* Nottinghamshire, England, Church of England Baptisms, 1813-1922
# Collection                            *New* Nottinghamshire, England, Church of England Marriages and Banns, 1754-1937
# Collection                            *New* Norfolk, England, Church of England Births and Baptisms, 1813-1922
# Collection                            *New* North Yorkshire, England, Church of England Baptisms, Marriages and Burials, 1558-1812
# Collection                            *New* North Yorkshire, England, Church of England Marriages and Banns, 1754-1937
# Collection                            *New* London, England, Electoral Registers, 1832-1965
# Collection                            *New* Manchester, England, Baptisms, Marriages and Burials, 1573-1812 (Cathedral)
# Collection                            *New* Manchester, England, Births and Baptisms, 1813-1901 (Cathedral)
# Collection                            *New* Manchester, England, Church of England Baptisms, Marriages and Burials, 1541-1812
# Collection                            *New* Manchester, England, Church of England Births and Baptisms, 1813-1915
# Collection                            *New* Manchester, England, Church of England Deaths and Burials, 1813-1985
# Collection                            *New* Manchester, England, Church of England Marriages and Banns, 1754-1930
# Collection                            *New* Manchester, England, Marriages and Banns, 1754-1930 (Cathedral)
# Collection                            *New* Lancashire, England, Church of England Baptisms, Marriages and Burials, 1538-1812
# Collection                            *New* Lancashire, England, Church of England Births and Baptisms, 1813-1911
# Collection                            *New* Lancashire, England, Electoral Registers, 1832-1939
# Collection                            *New* Liverpool, England, Church of England Baptisms, 1813-1919
# Collection                            *New* Liverpool, England, Electoral Registers, 1832-1970
# Collection                            *New* London, England, School Admissions and Discharges, 1840-1911
# Collection                            *New* Dorset, England, Church of England Baptisms, Marriages and Burials, 1538-1812
# Collection                            *New* Dorset, England, Church of England Births and Baptisms, 1813-1906
# Collection                            *New* Dorset, England, Church of England Deaths and Burials, 1813-2010
# Collection                            *New* Dorset, England, Church of England Marriages and Banns, 1813-1921
# Collection                            *New* DNA
# Collection                            *New* Bristol, England, Church of England Baptisms, 1813-1922
# Collection                            *New* England, Newspaper Death Notices
# Collection                            *New* England, Newspaper Marriage Notices
# Collection                            *New* England & Scotland, Select Cemetery Registers, 1800-2022
# Collection                            *New* Derbyshire, England, Church of England Births and Baptisms, 1813-1916
# Collection                            *New* Derbyshire, England, Church of England Deaths and Burials, 1813-1991
# Collection                            *New* England & Wales, Non-Conformist and Non-Parochial Registers, 1567-1936
# Collection                            *New* England and Wales, Death Index, 1989-2022
# Collection                            *New* Hampshire, England, Church of England Baptisms, 1813-1921
# Collection                            *New* Scotland, National Probate Index (Calendar of Confirmations and Inventories), 1876-1936
# Collection                            *New* Article (Findmypast Newspaper)
# Collection                            *New* Cheshire Diocese Of Chester Bishop's Transcripts Marriages 1576-1906
# Collection                            *New* Cheshire Diocese Of Chester Parish Baptisms 1538-1911
# Collection                            *New* Cheshire Diocese Of Chester Parish Marriages 1538-1910
# Collection                            *New* Cheshire Marriage Licence Bonds And Allegations 1606-1905
# Collection                            *New* England & Wales Non-Conformist Burials
# Collection                            *New* England & Wales Non-Conformist Marriages
# Collection                            *New* England Births & Baptisms 1538-1975
# Collection                            *New* England Marriages 1538-1973
# Collection                            *New* England, Greater Manchester Baptisms 1571-1910
# Collection                            *New* England, Newspaper Death Notices
# Collection                            *New* Hampshire Marriages
# Collection                            *New* Hampshire, Portsmouth Baptisms
# Collection                            *New* Lancashire, Rusholme Road Cemetery, Chorlton Upon Medlock Burial Registers 1821-1933
# Collection                            *New* London, Docklands And East End Baptisms
# Collection                            *New* N Cheshire Memorial Inscriptions
# Collection                            *New* National School Admission Registers & Log-Books 1870-1914
# Collection                            *New* *WIP* Scotland, Modern And Civil Births 1855-2019
# Collection                            *New* Scotland, Parish Births & Baptisms 1564-1929
# Collection                            *New* Scotland, Parish Marriages & Banns 1561-1893
# Collection                            *New* BillionGraves/Graves
# Collection (FS)                       *New* England Births and Christenings, 1538-1975
# Collection (FS)                       *New* Ireland Civil Registration Indexes, 1845-1958
# Collection                            *New* Register | British Newspaper Archive
# Collection                            *New* FreeBMD
# Collection                            *New* Funeral Notices
# Collection                            *New* Lancashire BMD
# Collection                            *New* Newspaper.com/Newspaper Images

#---------------------------------------------------------------------------------------------------

# Changes made since 28/04/2024 22:01 --> 09/05/2024 22:00 BETA 3

# [lib.Add_Banns]                       BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Add_AS_Baptism]                  Check for NK (Not Known) with [Birth Date]
# [lib.Add_AS_Burial]                   Added [var.zArchiveReference].
# [lib.Add_Burial_cite_Cemetery         BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.Burial]                          BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.InitVars_ANC]                    Added Record Type Burial BT.
# [lib.InitVars_ANC]                    Set [var.zRegisterType].
# [lib.InitVars_FMP]                    BETA2_1 Added [Spouse's first name] to Marriage Record Type
# [lib.InitVars_FMP]                    BETA2_15 Added record type Burial NC.
# [lib.Probate2]                        BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.School_Admission]                BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SetRecordType]                   Check for register type being Bishops Transcript.
# [lib.SetRecordType]                   BETA2_15 Added record type Burial NC.
# [lib.SetRecordTypeFolder]             [lib.SetRecordTypeFolder]
# [lib.SetRepositoryPosition]           Reworked way of finding the repository position in AS
# [lib.SourceTemplate_Cemetery]         BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.TRX_Death]                       BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].
# [lib.SetVersion]                      [==:Version:28/04/2024 18:45 ***WIP*** GE BETA 3]
# Collection                            Kent Burials (probem link to Dorset burials)
# Collection                            BETA2_15 England & Wales Non-Conformist Burials
# Collection                            Lancashire, England, Church of England Deaths and Burials, 1813-1986
# Collection                            British Newspaper Archive
# Ancestral Sources                     Autotext - Baptism (STEMPLATE)
# Ancestral Sources                     Autotext - Burial (STEMPLATE)


#---------------------------------------------------------------------------------------------------

# Changes made since 09/05/2024 22:01 --> 20/05/2024 22:00 BETA 4
# [lib.Add_AS_Baptism]                  Check for NK (Not Known) with [var.zResidence]
# [lib.ErrorMessageDisplay]             Added conditional brackets around [var.zErrorMessage].
# [lib.Find_AS_ID]                      R (Register) added to force C (Census) to clear the existing list of census years.
# [lib.GetGender]                       Added new given names.
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.Get_GRO_DistrictCounty]          New project parameter - [PlaceParts]
# [lib.InitVars]                        Changed position of error message clearance.
# [lib.InitVars]                        Created Service Name check for Find a Grave.
# [lib.InitVars]                        Added record type "Baptism RC".
# [lib.InitVars_ANC]                    Added validation to [Place] and used it for [var.zBurialPlace]
# [lib.InitVars_ANC]                    Added [Probate Text] to record type Probate.
# [lib.InitVars_ANC]                    BETA6_9 Added record type "Workhouse Admission".
# [lib.InitVars_FMP]                    Added [Probate Text] to record type Probate.
# [lib.InitVars_FMP]                    Added record type "TRX Marriage".
# [lib.InitVars_FMP]                    Validation to [Place] for Burial was looking at [Burial Place]
# [lib.InitVars_FMP]                    Replace ? in a death and burial dates with nothing.
# [lib.InsertSourceFromText]            Added fields to Autotext Probate.
# [lib.InstructionsMarriage]            Check for TRX record type (Transcription only)
# [lib.SetFolderPathDisplay]            Deleted duplicate reset error message.
# [lib.SetFolderPathDisplay]            Added record type "Baptism RC".
# [lib.SetRecordType]                   Added record type "Baptism RC".
# [lib.SetRecordType]                   Added record type "TRX Marriage".
# [lib.SetRecordType]                   Added record type "Gravestone".
# [lib.SetRecordTypeFolder]             Added record type "Baptism RC".
# [lib.SetRecordTypeFolder]             Added record type "TRX Marriage".
# [lib.SetRecordTypeFolder]             Added record type "Gravestone".
# [SetRepository]                       Allow the use of Host Name as repository when Generic Service.
# [lib.SetVersion]                      [==:Version:20/05/2024 22:00 ***WIP*** GE BETA 4]
# [lib.TRX_Marriage]                    Added record type "TRX Marriage".
# Collection                            Glamorganshire, Wales, Anglican Baptisms, Marriages and Burials, 1570-1994
# Collection (updated TT5-Abode)        London, England, Church of England Deaths and Burials, 1813-2003
# Collection (ANC)                      England & Wales, National Probate Calendar (Index of Wills and Administrations), 1858-1995
# Collection FMP)                       England & Wales Government Probate Death Index 1858-2019
# Collection (ANC)                      Ireland, Catholic Parish Registers, 1655-1915
# Collection (ANC)                      Liverpool, England, Catholic Baptisms, 1741-1919
# Collection (FMP)                      England Roman Catholic Parish Baptisms Transcription
# Collection (FMP)                      Westminster Burials
# Collection (UKBMD)                    Added host "bathbmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "berkshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "cheshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "cumbriabmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "kingstonbmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "lancashirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "northwalesbmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "shropshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "staffordshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "westmidlandsbmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "wiltshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "yorkshirebmd.org.uk" for Generic service.
# Collection (UKBMD)                    Added host "camdex.org.uk" for Generic service.
# [lib.Add_FH_Citation]                 Changed [var.z_*] to [var.z*]
# [lib.Get_Registry]                    Changed [var.z_*] to [var.z*]
# [lib.InsertTextfromSource]            Changed [var.z_*] to [var.z*]
# [lib.SetFolderPathDisplay]            Changed [var.z_*] to [var.z*]
# [lib.SetGRORef_v2]                    Changed [var.z_*] to [var.z*]
# [lib.SetRecordTypeFolder]             Changed [var.z_*] to [var.z*]
# [lib.SetSourceType]                   Changed [var.z_*] to [var.z*]
# [lib.WriteGRO]                        Changed [var.z_*] to [var.z*]
# Autotext (Custom)                     Probate


#---------------------------------------------------------------------------------------------------


# Changes made since 20/05/2024 22:01 --> 21/05/2024 08:30 BETA 5
# [lib.InitVars_FMP]                    BETA5_1  Added check for [Baptism Place] to set [var.zBaptismPlace].
# [lib.InitVars_FMP]                    BETA5_1  Unmatched "[" found in Baptism section.

#---------------------------------------------------------------------------------------------------

# Changes made since 21/05/2024 08:31 --> 06/06/2024 12:30 BETA 6
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.GetGender]                       Added new given names.
# [lib.InitVars_ANC]                    Added record type "Marriage BT".
# [lib.InitVars_FS]                     Added [Abode] for a baptism.
# [lib.InitVars_GENERIC]                Age at death not being set up correctly.
# [lib.InstructionsUKBMD]               Calls [lib.UKBMD_Type]
# [lib.Newspaper_BNA]                   ***DELETE***
# [lib.Newspaper_BNA_v2]                {TAB} after Repository needed.
# [lib.SetRecordType_GENERIC]           Calls [lib.UKBMD_Type]
# [lib.SetWindowsUser]                  New user Liz_G
# [lib.SetWindowsUser_Liz_G]            New user Liz_G
# [lib.SetWindowsUser_Liz_G]            New project parameter - [PlaceParts]
# [lib.UKBMD]                           Called by collection and calls [lib.UKBMD_Type]
# [lib.UKBMD_Tye]                       Called by [lib.UKBMD]
# [lib.ValidatePlace:Place]             New project parameter - [PlaceParts]
# [Collection]                          Birmingham, England, Church of England Marriages and Banns, 1754-1939
# [Collection]                          britishnewspaperarchive.co.uk
# [Collection]                          Newspaper Images
# Generic bmd.org.uk                    Calling new [lib.UKBMD]
# FH Repositories                       bathbmd.org.uk
# FH Repositories                       berkshirebmd.org.uk
# FH Repositories                       cheshirebmd.org.uk
# FH Repositories                       cumbriabmd.org.uk
# FH Repositories                       kingstonbmd.org.uk
# FH Repositories                       lancashirebmd.org.uk
# FH Repositories                       shropshirebmd.org.uk
# FH Repositories                       staffordshirebmd.org.uk
# FH Repositories                       westmidlandsbmd.org.uk
# FH Repositories                       wiltshirebmd.org.uk
# FH Repositories                       yorkshirebmd.org.uk
# FH Source Templates                   UKBMD


#-------------------------------------------------------------------------------------------------

# Changes made since 06/06/2024 12:31 -->  22/06/2024 13:30 BETA 7
# [lib.DNA Match]                       BETA7 New template
# [lib.Find-a-Grave]                    BETA7_4 Updated code for writing fact based on param 1.
# [lib.Find-a-Grave]                    BETA6_11   Remove extra {TAB} before [lib.SetAssessment]
# [lib.FreeBMD_Media]                   BETA7 *New* to handle FreeBMD.
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.GetGender]                       Added new given names.
# [lib.GetNewsType]                     BETA7_8 *NEW*
# [lib.GetNewspaperEvent]               BETA7_8 *NEW*
# [lib.InitVars_ANC]                    BETA7_3 Added new record type "School Admission".
# [lib.InitVars_ANC]                    BETA7 Added new record type "DNA Match".
# [lib.InitVars_FAG]                    BETA7_4 Removed excess colons.
# [lib.InitVars_FMP]                    BETA6_8 Record Type "Newspaper" - updated to handle a multiple name field
# [lib.InitVars_FMP]                    BETA6_8 Record Type "Newspaper Item" - updated to handle a multiple name field
# [lib.InitVars_GENERIC]                BETA7_8 BNA - updated method to handle a multiple name field
# [lib.InsertTextfromSource]            BETA7_8  Added new TfS type - Newspaper
# [lib.InstructionsDeceasedOnline]      BETA6_4 Add new collection
# [lib.InstructionsSchool]              BETA7_3 Added new record type "School Admission".
# [lib.InstructionsWorkhouse]           BETA6_9 Added new record type "Workhouse Admission".
# [lib.Newspaper_BNA_v2]                BETA7 Source Template "Newspaper" Item updates to remove field [Pages_etc].
# [lib.School_Admission]                BETA7_3 Added new record type "School Admission".
# [lib.SetFolderPathDisplay]            BETA7_3 Added new record type "School Admission".
# [lib.SetFolderPathDisplay]            BETA6_8 Record Type "Newspaper" - updated to handle a multiple name field
# [lib.SetFolderPathDisplay]            BETA6_8 Record Type "Newspaper Item" - updated to handle a multiple name field
# [lib.SetFolderPathDisplay]            BETA6_8 New field [var.zImageFormat] for record types Newspaper and Newspaper Item.
# [lib.SetRecordType]                   BETA7_3 Added new record type "School Admission".
# [lib.SetRecordType]                   BETA7_6 Added new record type "Newspaper Item".
# [lib.SetRecordType]                   BETA6_9 Added new record type "Workhouse Admission".
# [lib.SetRecordType]                   BETA6_9 Added new record type "DNA Match".
# [lib.SetRecordTypeFolder]             BETA7_3 Added new record type "School Admission".
# [lib.SetRecordTypeFolder]             BETA6_9 Added new record type "Workhouse Admission".
# [lib.SetRecordTypeFolder]             BETA7_6 Added new record type "Newspaper Item".
# [lib.SetRecordTypeFolder]             BETA7_6 Added new record type "DNA Match".
# [lib.SetWindowsPath]                  Marriage [var.zMediaSource?] picking up wrong [var.zMediaName?]
# [lib.Workhouse_Admission]             BETA6_9 Added new record type "Workhouse Admission".
# [Collection]                          BETA6_4 (P) Web: UK, Burial and Cremation Index, 1576-2014
# [Collection]                          BETA7_3 (P) London, England, School Admissions and Discharges, 1840-1911
# [Collection]                          BETA7_3 (C) National School Admission Registers & Log-Books 1870-1914
# [Collection]                          BETA7_4 Updated param 1 to Fact when inserting Fact.
# [Collection]                          BETA6_9 (P) London, England, Workhouse Admission and Discharge Records, 1764-1921
# [Collection]                          BETA6_8 (C) British Newspaper Birth Notices
# [Collection]                          BETA6_8 (C) British Newspaper Marriage Notices
# [Collection]                          BETA6_8 (C) British Newspaper Death & In Memoriam Notices
# [Collection]                          BETA6_8 (C) England, Newspaper Birth Notices
# [Collection]                          BETA6_8 (C) England, Newspaper Marriage Notices
# [Collection]                          BETA6_8 (C) England, Newspaper Death Notices
# [Collection]                          BETA7 (P) (ANC) DNA Match
# [Repository]                          BETA6_8 *New* British Newspaper Archive
# [Repository]                          BETA6_8 *New* Newspapers.com
# [Query]                               BETA7 Queries for all Source Templates

#-------------------------------------------------------------------------------------------------

# Changes made since 22/06/2024 13:31 -->  08/07/2024 16:30 BETA 8
# [lib.FreeBMD_Birth]                   BETA7_5 Field [var.zRecordNo] did not exist. Surround with <>.
# [lib.FreeBMD_Death]                   BETA7_5 Field [var.zRecordNo] did not exist. Surround with <>.
# [FTP_Add_BirthDeath]                  BETA7_20 Removed [lib.SetAncestryImportFlag].
# [FTP_Add_Child]                       BETA7_20 Removed [lib.SetAncestryImportFlag].
# [FTP_Add_Father]                      BETA7_21 *Del* Amalgamate parent scripts.
# [FTP_Add_Father_mother_exists]        BETA7_21 *Del* Amalgamate parent scripts.
# [FTP_Add_Mother_father_exists]        BETA7_21 *Del* Amalgamate parent scripts.
# [FTP_Add_Mother_no_Parents]           BETA7_21 *Del* Amalgamate parent scripts.
# [FTP_Add_Parent]                      BETA7_21 *New* Amalgamate parent scripts.
# [FTP_Add_Spouse]                      BETA7_20 Removed [lib.SetAncestryImportFlag].
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.GetGender]                       Added new given names.
# [lib.GetServices]                     BETA8 - pepration for future.
# [lib.InsertTextfromSource]            BETA7_12 *New* Funeral Notice.
# [lib.InsertTfS_pos]                   BETA7_12 *New* Funeral Notice.
# [lib.InitVars]                        BETA8  *New* Service --> Trove.  
# [lib.InitVars_FMP]                    BETA7_1   Added [lib.ValidatePlace] to Census [Full  Address].
# [lib.InitVars_FMP]                    BETA7_14  Evaluate the spouse's name from "MarriageFinder"
#                                                 field in the "SCI Marriage" before evaluating
#                                                 the normal Spouse's name.
# [lib.InitVars_FMP]                    BETA7_15  Added [Volume as transcribed] as condition in SCI Marriage.
# [lib.InitVars_GENERIC]                Added transform ":capitalize" to the FreeBMD person names.
# [lib.InitVars_GENERIC]                BETA7_12 *New* Record Type "Funeral Notice".
# [lib.InitVars_Trove]                  BETA8  *New* Service --> Trove.  
# [lib.InsertTexfromSource]             BETA7_18 Check for existence of "nk" in field [var.zDeathPlace].
# [lib.InstructionsFuneralNotice]       BETA7_12 *New* Record type "Funeral Notice".
# [lib.SetFolderPathDisplay]            BETA7_12 *New* Record Type "Funeral Notice".
# [lib.SetRecordType]                   BETA7_12 Added new record type "Funeral Notice".
# [lib.SetRecordTypeFolder]             BETA7_12 Added new record type "Funeral Notice".
# [Collection]                          BETA8 (P) funeral-notices.co.uk
# [Collection]                          BETA8 United Kingdom Deaths 2007-2017 Transcription
# [Collection]                          BETA8 (C) Australia, Newspaper Vital Notices, 1831-2001
# [Collection]                          BETA8 (C) Articles for service Trove.
# [Query]                               BETA7_12 *New* Funeral Notice.
# [Repository]                          BETA6_8 *New* Newspapers.com.
# [Repository]                          BETA8 *New* Trove.
# [Source Template]                     BETA8 Service Attestation - added template category.
# [Source Template]                     BETA7_12 *New* Funeral Notice.
# [Autotext]                            BETA7_12 *New* Funeral Notice.
# [Query]                               BETA7_21 *Updated* Individuals Linked to Source (Alan)
# [Source Template]                     BETA8 Added birth date and birth place to "Service Attestation".
# [Source Template]                     BETA8 Added "Service History" --> copy of "Service Attestation".

#-------------------------------------------------------------------------------------------------

# Changes made since 08/07/2024 16:31 -->  18/07/2024 17:30 BETA 9

# [lib.Add_AS_Marriage_Templated_Source] BETA8_6   Conditionlised [var.zRegisterType] in case field blank.
# [lib.Add_AS_Autotext]                 BETA8_3 Changed {DOWN*14} to {DOWN*15} for Marriage to load custom autotext.
# [lib.Add_AS_Baptism_Templated_Source] BETA8_11 Checked for register type Baptisms and set to PR
# [lib.Get_GRO_DistrictCounty]          Added new registration districts.
# [lib.GetGender]                       Added new given names.
# [lib.InitVars_ANC]                    BETA8_2 Added [lib.ValidatePlace] to place fields in record type "Marriage".
# [lib.InitVars_FMP]                    BETA8_2 Added [lib.ValidatePlace] to place fields in record type "Marriage".
# [lib.InitVars_FMP]                    BETA8_9 Add extra check for Records Office.
# [lib.InitVars_ANC]                    BETA8_6 Update setting of [var.zRegisterType].
# [lib.InitVars_ANC]                    BETA8_2 Added [lib.ValidatePlace] to place fields in record type "Marriage"
# [lib.InitVars_ANC]                    BETA8_4 Added record type "Marriage Banns".
# [lib.SetCensusCountry]                BETA8_5 Added record type "US Federal Census".
# [lib.ValidatePlace]                   BETA8_7 Enhanced error message if NO PLACE found.
# [lib.ValidatePlace]                   BETA8_9 Changed field [PlaceParts] to [var.PlaceParts].

# [Collection]                          BETA8_1 East Sussex, England, Church of England Marriages and Banns, 1754-1936
# [Collection]                          BETA9 West Sussex, England, Church of England Baptisms, Marriages and Burials, 1538-1812
# [Collection]                          BETA8_8 Kent Marriages And Banns


#-------------------------------------------------------------------------------------------------

# Changes made since 18/07/2024 17:31 -->  BETA 10

# [lib.Add_AS_Census_Templated_Source]  BETA9_8 New record type "Canada Federal Census".
# [lib.Add_AS_Census_Templated_Source]  BETA9_7 New parameter to handle duplicate census templates in AS.
# [lib.Add_AS_Census_Templated_Source_USA] BETA9_3 Add US Federal Census for 1850, 1860, 1870 & 1880.
# [lib.Add_AS_Census_USA]               BETA9_3 Add US Federal Census for 1850, 1860, 1870 & 1880.
# [lib.AS-Census-USA]                   BETA9_3 Added US Federal Census for 1850, 1860, 1870 & 1880.
# [lib.AS-Census-USA_1850]              BETA9_3 Added US Federal Census for 1850.
# [lib.AS-Census-USA_1860]              BETA9_3 Added US Federal Census for 1860.
# [lib.AS-Census-USA_1870]              BETA9_3 Added US Federal Census for 1870.
# [lib.AS-Census-USA_1880]              BETA9_3 Added US Federal Census for 1880.
# [lib.Find_AS_ID]                      BETA9_3 Check US Federal Census year due to 1890 missing.
# [lib.Find_AS_ID]                      BETA9_8 New record type "Canada Federal Census".
# [lib.Get_Registry]                    BETA9_15 New entry - Chichester.
# [lib.GetNewspaperEvent]               BETA9_1 New event types "Shipwreck", "Tribute".
# [lib.Probate]                         BETA9_4 Replaced [Page.ServiceName] with [SetRepository]
# [lib.SetFolderPathDisplay]            BETA9_8 Added record type "Canada Federal Census".
# [lib.SetRecordType]                   BETA9_8 Added record type "Canada Federal Census".
# [lib.SetWindowsUser]                  BETA9_7 New parameter to handle duplicate census

# Deleted templates
# [lib.Probate2]                        BETA9_5 *DELETE*
# [lib.SetWindowsUser_Alan_pre_BETA6]   BETA9_6 *DELETE*

# Collections
# [Collection]                          BETA9_2 TROVE/Articles
# [Collection]                          BETA9_2 FMP/British Newspaper Birth Notices
# [Collection]                          BETA9_2 FMP/British Newspaper Death & In Memoriam Notices
# [Collection]                          BETA9_2 FMP/British Newspaper Marriage Notices
# [Collection]                          BETA9_2 FMP/England, Newspaper Birth Notices
# [Collection]                          BETA9_2 FMP/England, Newspaper Marriage Notices
# [Collection]                          BETA10 (C) California, Death Record Index, 1940-1997 Transcription
# [Collection]                          BETA9_3 (C) 1850 United States Federal Census
# [Collection]                          BETA9_3 (C) 1860 United States Federal Census
# [Collection]                          BETA9_3 (C) 1870 United States Federal Census
# [Collection]                          BETA9_3 (C) 1880 United States Federal Census
# [Collection]                          BETA9_3 (P) 1900 United States Federal Census

# [Collection]                          BETA9_10 (C) Surrey, England, Church of England Baptisms, Marriages and Burials, 1538-1812


#-------------------------------------------------------------------------------------------------

SetWindowsPath

# Usage: [lib.SetWindowsPath]
# Called by: [lib.SetFolderPathDisplay]

# Change History       Reason for change
# --------------       --------------------------------------------------------------------------
# 25/05/2024 BETA6     Simplified method of setting up folders path for storage of media by user.
#                      NB. Media is copied from the folders path into folders within the Project.
#                      All [lib.SetWindowsUser_xxxx] where xxxx is username are changed.
# 07/06/2024 BETA7_1   Marriage [var.zMediaSource?] picking up wrong [var.zMediaName?]

[==:var.zFolderPath:[var.FolderPath:replace:\\:\\\\::replace:%WINDOWSUSER%:[WindowsUser]]]
[==:var.zFolderPath:[var.zFolderPath:replace:\\:\\\\::replace:%PROJECT%:[Project]]]
[==:var.zFolderPath:[var.zFolderPath:replace:\\:\\\\::replace:%MEDIAFOLDER%:[var.zFactFolder]]]
#<
#[?:var.InitialLetter]
[==:var.zFolderPath:[var.zFolderPath:replace:\\:\\\\::replace:%INITIALLETTER%:[var.zSurname:substring:1:1]]]
#[=:Person folder]
[==:var.zFolderPath:[var.zFolderPath:replace:\\:\\\\::replace:%INITIALLETTERFOLDER%:[Person folder]]]
#>




#[==:var.zFolderPath:[var.zFolderPath:replace:\\:\\\\]]


[==:var.zMediaSource:[var.zFolderPath:append:[var.zMediaName]:replace:\\:\\\\]]
<[==:var.zMediaSource1:[var.zFolderPath:append:[var.zMediaName1]:replace:\\:\\\\]]>
<[==:var.zMediaSource2:[var.zFolderPath:append:[var.zMediaName2]:replace:\\:\\\\]]>

[var.zFolderPath]
[var.zMediaName]

SetWindowsUser

# Usage: [lib.SetWindowsUser]

# Change History      Reason for change
# --------------      --------------------------------------------------------------------------
# 19/01/2024          Created for Graham.
# 06/04/2024          Included Research Place into SetWindowsUser to make it easier to change.
# 27/04/2024          Split [lib.SetWindowsUser] by Windows user.
# 23/05/2024          New User Liz_G
# 24/07/2024          New User Paul
# 24/07/2024 BETA9_7  New parameter to handle duplicate census templates in AS.
#                     Parameter [var.ASCensusSources] holds the number of census in Ancestral
#                     Sources. Currently, it is possible to have 2 - US and UK. US comes first and
#                     this means this parameter is checked in
#                     [lib.Add_AS_Census_Templated_Source].

[==:var.debug:1]



[==:WindowsUser:Alan]
#[==:WindowsUser:Brian]
#[==:WindowsUser:Graham]
# Admin (Howard)
#[==:WindowsUser:Admin]
#[==:WindowsUser:Jenni]
#[==:WindowsUser:Paul]
#[==:WindowsUser:Suzan]
# User (Liz G)
#[==:WindowsUser:User]

######################################## Validate and call User library
<
[?:WindowsUser=Alan][lib.SetWindowsUser_Alan][==:var.ASCensusSources:2]

|
[?:WindowsUser=Admin][lib.SetWindowsUser_Howard][==:var.ASCensusSources:1]

|
[?:WindowsUser=bsmin][lib.SetWindowsUser_Brian][==:var.ASCensusSources:1]

|
[?:WindowsUser=Graham][lib.SetWindowsUser_Graham][==:var.ASCensusSources:1]

|
[?:WindowsUser=Jenni][lib.SetWindowsUser_Jenni][==:var.ASCensusSources:1]

|
[?:WindowsUser=psbma][lib.SetWindowsUser_Paul][==:var.ASCensusSources:1]

|
[?:WindowsUser=Suzan][lib.SetWindowsUser_Suzan][==:var.ASCensusSources:1]

|
[?:WindowsUser=User][lib.SetWindowsUser_Liz_G][==:var.ASCensusSources:1]

|



[lib.ErrorMessage:Error - User not set up]
#--------------------------------------------------------END OF USERS
>


######################################## Set up folder path based on User and Project settings
# Before using the transform REPLACE the backward "\" has to have an escape character of "\" - 2 slashes
# After using the 1st transform REPLACE the backward slash has to have 2 more slashes - 4 slashes
# After using the 2nd transform REPLACE the backward slash has to have 2 more slashes - 8 slashes

#[==:var.FolderPath:[var.FolderPath:replace:%WINDOWSUSER%:[WindowsUser]::replace:%Project%:[Project]]]


[lib.SetVersion]

<[?:var.Debug=0]
## Do nothing
>

SetWindowsUser_Alan

# Usage: [lib.SetWindowsUser_Alan]
# Called by: [lib.SetWindowsUser]

# Change History      Reason for change
# --------------      --------------------------------------------------------------------------
# 27/04/2024          Split [lib.SetWindowsUser] by Windows user.
# 25/05/2024 BETA6    Simplified method of setting up folders path for storage of media.
#                     NB. Media is copied from the folders path into folders within the Project.
#



#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Alan
#-------------------------------------------------------Project
#[==:Project:Appleby]
#[==:Project:Appleby Test]
#[==:Project:Bare Bones]
#[==:Project:Bramley Tree]
#[==:Project:Graham]
#[==:Project:Howard]
#[==:Project:Lambert]
#[==:Project:Lambert Sandbox]
#[==:Project:Medows]
#[==:Project:Medows-Lambert_ANC]
[==:Project:Medows Sandbox]
#[==:Project:Minns]
#[==:Project:White]
#[==:Project:White Sandbox (Liz G)]
#[==:Project:White 2024 (Liz G)]
#[==:Project:White & Ruane]
#[==:Project:White & Ruane Sandbox]
#[==:Project:White (2022)]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Place
[==:Research Place:9 Haddington Road, Whitley Bay]
#[==:Research Place:Low Hedgeley, Powburn]
#[==:Research Place:Brandon Ford, Powburn]
#[==:Research Place:Brookfields Farm, Harmby]
#[==:Project:White & Ruane Family (2024-04-09)]
#[==:Research Place:Hall Croft CL, Ilkley]
#[==:Research Place:Homefields Farm Park CL, Sutton St James]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>


<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - Appleby
# This is where the images are saved and used to import images into the project.
[?:Project=Appleby]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\Marriages
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - Appleby Test
# This is where the images are saved and used to import images into the project.
[?:Project=Appleby Test]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\Marriages
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - Lambert
# This is where the images are saved and used to import images into the project.
[?:Project=Lambert]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\Marriages
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - Medows
# This is where the images are saved and used to import images into the project.
[?:Project=Medows]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\Marriages
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - Medows-Lambert
# Images are stored directly into the project for testing purposes.
[?:Project=Medows-Lambert_ANC]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:DOWN4]
[==:var.AS_FMP_Position:DOWN5]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - Medows Sandbox
# This is where the images are saved and used to import images into the project.
[?:Project=Medows Sandbox]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\Marriages
# Ancestral Sources repository position --> ANC=Ancestry; FMP=Findmypast --> [lib.SetRepositoryPosition]
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - Graham
[?:Project=Graham]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - Howard
[?:Project=Howard]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - Minns
[?:Project=Minns]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:0]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - White & Ruane
[?:Project=White & Ruane Family (2024)]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:5]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - White Liz G
#[?:Project=White Sandbox (Liz G)]
#[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\FHLIZ\\People\\%INITIALLETTER%\\%INITIALLETTERFOLDER%\\%MEDIAFOLDER%\\]

[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]

# C:\Users\alan\OneDrive\FHLIZ\People
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.InitialLetter:[Project]]
[==:var.PlaceParts:5]


|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - White Liz G
[?:Project=White 2024 (Liz G)]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]

#[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\FHLIZ\\People\\%InitialLetter%\\%MEDIAFOLDER%\\]
#[==:var.Test:C:/Users/%WINDOWSUSER%/OneDrive/FHLIZ/People/%InitialLetter%/%MEDIAFOLDER%/]

# C:\Users\alan\OneDrive\FHLIZ\People
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.InitialLetter:[Project]]
[==:var.PlaceParts:5]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up for Alan]
>

SetWindowsUser_Brian

# Usage: [lib.SetWindowsUser_Brian]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 27/04/2024         Split [lib.SetWindowsUser] by Windows user.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Brian
#-------------------------------------------------------Projects
#[==:Project:Minns]
[==:Project:Minns Live]
#[==:Project:Minns Sandbox]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Brian has no valid project]>

#-------------------------------------------------------Research Place
#[==:Research Place:At Home, Bicester]
#[==:Research Place:3 Overstrand Close, Bicester]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Brian has no valid research place]>



#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Project folder setup
#-------------------------------------------------------Project
<
[?:Project=Minns]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
[?:Project=Minns Sandbox]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
[?:Project=Minns Live]
[==:var.FolderPath:D:\\My Drive\\Family  Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]
# D:\My Drive\Family Historian Projects\MlNNS LIVE\MINNS \MINNS LIVE.fhdata\Media\

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up]
>

SetWindowsUser_Graham

# Usage: [lib.SetWindowsUser_Graham]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 19/01/2024         Created for Graham - WindowsUser:Graham
# 06/04/2024         Included Research Place into SetWindowsUser to make it easier to change.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Set up project and research
#-------------------------------------------------------Projects
#FHZG - Template Test
[==:Project:Test]  

# Eyre Master File  
#[==:Project:Eyre 2024]
  
#Eyre General Test file 
#[==:Project:Eyre T2024]   
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Graham has no valid project]>

#-------------------------------------------------------Research Place
[==:Research Place:The Anchorage, Leverington]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Graham has no valid research place]>





#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Set up project folders
<
#------------------------------------------------------------------------Project - Eyre Test
[?:Project=Test]
[==:var.FolderPath:F:\\Family Historian Projects 2024\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: F:\Family Historian Projects 2024\Eyre Test\Eyre Test.fh_data\Media
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#------------------------------------------------------------------------Project - Eyre 2024
[?:Project=Eyre 2024]
[==:var.FolderPath:F:\\Family Historian Projects 2024\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: F:\Family Historian Projects 2024\Eyre 2024\Eyre T2024.fh_data\Media
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#------------------------------------------------------------------------Project - Eyre T2024
[?:Project=Eyre T2024]
[==:var.FolderPath:F:\\Family Historian Projects 2024\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: F:\Family Historian Projects 2024\Eyre T2024\Eyre T2024.fh_data\Media
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up]
>

SetWindowsUser_Howard

# Usage: [lib.SetWindowsUser_Howard]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 19/01/2024         Created for Graham.
# 06/04/2024         Included Research Place into SetWindowsUser to make it easier to change.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Set up projects and research

#W indows User - Admin (Howard)
#-------------------------------------------------------Projects
#[==:Project:Howard Hoveman Family Tree]
#[==:Project:Howard Hoveman Family Tree Sandbox]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Places
#[==:Research Place:Barbican,City of London]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>






#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Set up project folders

<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Howard Hoveman Family Tree
[?:Project=Howard Hoveman Family Tree]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: C:\Users\Admin\OneDrive\Documents\Family Historian Projects\Howard Hoveman Family Tree\Howard Hoveman Family Tree.fh_data\Media
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ward Hoveman Family Tree Sandbox
[?:Project=Howard Hoveman Family Tree Sandbox]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: C:\Users\Admin\OneDrive\Documents\Family Historian Projects\Howard Hoveman Family Tree Sandbox\Howard Hoveman Family Tree Sandbox.fh_data\Media
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up]
>

SetWindowsUser_Jenni

# Usage: [lib.SetWindowsUser_Jenni]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 27/04/2024         Split [lib.SetWindowsUser] by Windows user.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Jenni
#-------------------------------------------------------Projects
[==:Project:Lambert]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Places
[==:Research Place:At home, Whitley Bay]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>





#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Set up project folders
#-------------------------------------------------------Project (Live)
# This is where the images are saved and used to import images into the project.
<
[?:Project=Lambert]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# C:\Users\jenni\OneDrive\Documents\Genealogy\Medows-Lambert\Pictures\Marriages
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#-------------------------------------------------------Project (Test)
# Images are stored directly into the project for testing purposes.
[?:Project=LambertTest]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: C:\Users\Admin\OneDrive\Documents\Family Historian Projects\Howard Hoveman Family Tree Sandbox\Howard Hoveman Family Tree Sandbox.fh_data\Media\Births
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up]
>

SetWindowsUser_Liz_G

# Usage: [lib.SetWindowsUser_Liz_G]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 23/05/2024         New Windows user.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]
[==:var.PlaceParts:5]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Alan
#-------------------------------------------------------Project
#[==:Project:White]
[==:Project:White Sandbox (Liz G)]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Place
[==:Research Place:9 Haddington Road, Whitley Bay]
#[==:Research Place:Low Hedgeley, Powburn]
#[==:Research Place:Brandon Ford, Powburn]
#[==:Research Place:Brookfields Farm, Harmby]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>


<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - White Sandbox
[?:Project=White Sandbox (Liz G)]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\FHLIZ\\People\\%INITIALLETTER%\\%INITIALLETTERFOLDER%\\%MEDIAFOLDER%\\]

# C:\Users\alan\OneDrive\FHLIZ\People
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.InitialLetter:[Project]]
[==:var.PlaceParts:5]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - White
[?:Project=White 26_02_2024 (Liz G]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:5]


#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up for Alan]
>

SetWindowsUser_Paul

# Usage: [lib.SetWindowsUser_Brian]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 24/07/2024         New user.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Paul
#-------------------------------------------------------Projects
[==:Project:Bramley Tree]
#[==:Project:Bramley Tree Sandbox]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Place
[==:Research Place:At Home, Seaton Sluice]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>



#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Project folder setup
#-------------------------------------------------------Project
<
[?:Project=Bramley Tree]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:0]

|
[?:Project=Bramley Tree Sandbox]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:0]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up]
>

SetWindowsUser_Sioban

# Usage: [lib.SetWindowsUser_Sioban]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------
# 23/05/2024         New Windows user.

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]
[==:var.PlaceParts:5]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Alan
#-------------------------------------------------------Project
#[==:Project:White & Ruane]
#[==:Project:White Sandbox]
#[==:Project:White (2022)]
<[?:Project]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid project]>

#-------------------------------------------------------Research Place
[==:Research Place:9 Haddington Road, Whitley Bay]
#[==:Research Place:Low Hedgeley, Powburn]
#[==:Research Place:Brandon Ford, Powburn]
#[==:Research Place:Brookfields Farm, Harmby]
<[?:Research Place]|[lib.ErrorMessage:SetWindowsUser_Alan has no valid research place]>


<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Test project - White Sandbox
[?:Project=White & Ruane Sandbox]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:5]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Live project - White & Ruane
[?:Project=White & Ruane Family]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Genealogy\\Family Historian\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
[==:var.AS_ANC_Position:ENTER]
[==:var.AS_FMP_Position:ENTER]
[==:var.PlaceParts:5]


#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up for Alan]
>

SetWindowsUser_Suzan

# Usage: [lib.SetWindowsUser_Suzan]
# Called by: [lib.SetWindowsUser]

# Change History     Reason for change
# --------------     --------------------------------------------------------------------------

#----------------------------------------------------------------------System defaults
[==:var.ConfigSourceType:Templated]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Windows User - Alan
# WindowsUser:Suzan
#-------------------------------------------------------Projects
[==:Project:Appleby]
#-------------------------------------------------------Research Places
[==:Research Place:9 Haddington Road, Whitley Bay]
#[==:Research Place:Low Hedgeley, Powburn]
#[==:Research Place:Brandon Ford, Powburn]





#-------------------------------------------------------------------------Set up project folders
<
#-------------------------------------------------------Project (Live)
# This is where the images are saved and used to import images into the project.
[?:Project=Appleby]
[=:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Genealogy\\Genealogy\\Medows-Lambert\\Pictures\\%MEDIAFOLDER%\\]
# Sample: C:\Users\Suzan\OneDrive\Documents\Genealogy\Medows-Lambert\Pictures\Births
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

|
#-------------------------------------------------------Project (Test)
# Images are stored directly into the project for testing purposes.
[?:Project=ApplebyTest]
[==:var.FolderPath:C:\\Users\\%WINDOWSUSER%\\OneDrive\\Documents\\Family Historian Projects\\%PROJECT%\\%PROJECT%.fh_data\\Media\\%MEDIAFOLDER%\\]
# Sample: C:\Users\Suzan\OneDrive\Documents\Family Historian Projects\ApplebyTest\ApplebyTest.fh_data\Media\Births
[==:var.AS_ANC_Position:DOWN1]
[==:var.AS_FMP_Position:DOWN2]
[==:var.PlaceParts:0]

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END OF PROJECTS
|
[lib.ErrorMessage:Error - Project not set up for Suzan]
>

SourceTemplate_Cemetery

[=:Start:SourceTemplate_Cemetery]

# Author: Alan
# Description: Cemetery Source record to be used directly with Family Historian.
#              [Field names] are those set up by [lib.SetFieldName] or in some case fields
#              shown on the Findmypast collection.
#              If an Ancestry collection is to be used for this source then [Field Names] would
#              have to be updated and possibly included into [lib.SetFieldName].
#              NB. Most of the [Field Names] are specified without "z_" because this was the 
#              first cemetery source created and was made worse that the same source collection
#              was used for Burials and Cemeteries. They could only distinguished by the 
#              Record ID. Therefore a special [lib.SetSourceTypeConflicts] needs to be called at
#              start of [lib.SetFieldName].
#

# Usage: [lib.SourceTemplate_Cemetery]

# Collections: Findmypast      Hampshire, Portsmouth Burials

# Change Date          Reason For Change
# ----------------     -------------------------------------------------------------------------
# 12/09/2023 09:15     Initial creation
# 13/09/2023 13:30     Added [lib.ValidateInputField:Minister], [lib.ValidateInputField:Page]
# 30/04/2024 BETA2_13  Changed [lib.SetResearchPlace] to [Research Place].


#

# Cemetery
[Burial place:split:,:1]{tab}

# Burial Place
[Burial place]
[lib.ValidatePlace:Burial Place]{tab}

# Deceased name
[zFullname]{Tab}

# Age At Death
[Age]{Tab}

# Death Place
[Death Place]
# ...Validate
[lib.ValidatePlace:Death Place]
{Tab}

# Burial Date
[Burial Date]{Tab}

# Rank / Profession
[Occupation]{Tab}

# Burial Location within cemetery
[Plot]{Tab}

# Consecrated / Unconsecrated
<[?:Ground=C]Consecrated
|[?:Ground=U]Unconsecrated>
{tab}

# Minister
[lib.ValidateInputField:Minister]
[Minister]{tab}

# Death Date
{tab}

# Page
[lib.ValidateInputField:Page]
[Page]{tab}

# Entry No
[Entry No]{tab}

# Record Office
[Archive]{tab}

# Collection Name
[Record set]{Tab}

# Archive Reference
[Archive reference]{Tab}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{Tab}

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]{TAB}


[=:End:SourceTemplate_Cemetery]

TRX_Baptism

#
# Created: 30/04/2024
# Author: Alan
# Usage: [lib.TRX_Baptism:Fact]
# {1} = Fact --> Add fact type

# Change History      Reason for change
# --------------      -------------------------------------------------------------------------
# 27/03/2024          Initial Creation
# 30/04/2024          BETA2_16 New transaction TRX_Birth

#

[==:var.debug:1]


[=:Parameter1:{1}]

# ===============Add Fact=============================================================

<[?:Parameter1=Fact]


# Add fact.
{Ctrl+I}[var.zFact]{Enter}{Tab}

#Execute code at this speed
{fast}

# Date
[var.zBaptismDate]{TAB}

# Place
[var.zResidence]{TAB}

>

# ===============Add Citation=============================================================

# Select Source Template.
[lib.Add_FH_Citation:TRX Baptism]

#Execute code at this speed
{fast}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Gender
{DOWN}
<[?:var.zGender=Female]{DOWN}
|[?:var.zGender=Male]{DOWN*2}>
{TAB}

# Age at Death
<[var.zAgeAtDeath]>{TAB}

# Birth Date
<[var.zBirthDate]>{TAB}

# Death Date
<[var.zDeathDate]>{TAB}

# Last Residence
[var.zResidence]{TAB}

# Postal Code
<[var.zPostalCodeDistrict]>{TAB}

# Records Office
<[var.zRecordsOffice]>{TAB}

# Collection
[var.zCollection]{TAB}

# Collection ID
[var.zRecordNo]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{TAB}



<[?:var.Debug=0]
## Do nothing
>

TRX_Birth

#
# Created: 30/04/2024
# Author: Alan
# Usage: [lib.TRX_Birth:Fact]
# {1} = Fact --> Add fact type

# Change History      Reason for change
# --------------      -------------------------------------------------------------------------
# 27/03/2024          Initial Creation
# 30/04/2024          BETA2_16 New transaction TRX_Birth

#

[==:var.debug:1]


[=:Parameter1:{1}]

# ===============Add Fact=============================================================

<[?:Parameter1=Fact]


# Add fact.
{Ctrl+I}[var.zFact]{Enter}{Tab}

#Execute code at this speed
{fast}

# Date
[var.zDeathDate]{TAB}

# Age
[var.zAgeAtDeath]{TAB}

# Place
[var.zResidence]{TAB}

>

# ===============Add Citation=============================================================

# Select Source Template.
[lib.Add_FH_Citation:TRX Birth]

#Execute code at this speed
{fast}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Gender
{DOWN}
<[?:var.zGender=Female]{DOWN}
|[?:var.zGender=Male]{DOWN*2}>
{TAB}

# Age at Death
<[var.zAgeAtDeath]>{TAB}

# Birth Date
<[var.zBirthDate]>{TAB}

# Death Date
<[var.zDeathDate]>{TAB}

# Last Residence
[var.zResidence]{TAB}

# Postal Code
<[var.zPostalCodeDistrict]>{TAB}

# Records Office
<[var.zRecordsOffice]>{TAB}

# Collection
[var.zCollection]{TAB}

# Collection ID
[var.zRecordNo]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{TAB}



<[?:var.Debug=0]
## Do nothing
>

TRX_Death

#
# Created: 27/03/2024
# Author: Alan
# Usage: [lib.TRX_Death:Fact]
# {1} = Fact --> Add fact type

# Change History      Reason for change
# --------------      -------------------------------------------------------------------------
# 27/03/2024          Initial Creation
# 30/04/2024          BETA2_13 Changed [lib.SetResearchPlace] to [Research Place].

#

[==:var.debug:1]


[=:Parameter1:{1}]

# ===============Add Fact=============================================================

<[?:Parameter1=Fact]


# Add fact.
{Ctrl+I}[var.zFact]{Enter}{Tab}

#Execute code at this speed
{fast}

# Date
[var.zDeathDate]{TAB}

# Age
[var.zAgeAtDeath]{TAB}

# Place
[var.zResidence]{TAB}

>

# ===============Add Citation=============================================================

# Select Source Template.
[lib.Add_FH_Citation:TRX Death]

#Execute code at this speed
{fast}

# Fill in source template.

# Child's surname
[var.zSurname]{TAB}

# Child's given name(s)
[var.zGivenName]{TAB}

# Gender
#[var.zGender:substring:1:1]
#<[?:var.zGender:substring:1:1=F]{down*2]|{down*3}>
<[?:Gender=Famale]{down}|{down*2}>
{TAB}

# Age at Death
<[var.zAgeAtDeath]>{TAB}

# Birth Date
<[var.zBirthDate]>{TAB}

# Death Date
<[var.zDeathDate]>{TAB}

# Last Residence
[var.zResidence]{TAB}

# Postal Code
<[var.zPostalCode]>{TAB}

# Records Office
<[var.zRecordsOffice]>{TAB}

# Collection ID
[var.zCollectionID]{TAB}

# Collection
[var.zCollection]{TAB}

# Record ID
[var.zRecordID]{TAB}

# Repository
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{TAB}




<[?:var.Debug=0]
## Do nothing
>

TRX_Marriage

#
# Author: Alan
# Description: 
# Usage: [lib.TRX_Marriage:Fact]

# Change History     Reason for change
# ----------------   -----------------------------------------------------------------------------
# 10/05/2024         First attempt

[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================

<[?:Param1=Fact]


# Add fact.
{Ctrl+I}[var.zFact]{ENTER}


<
[?:var.zFact=Marriage]
<
[?:Wife number=1]|
[?:Wife number=2]{DOWN}|
[?:Wife number=3]{DOWN*2}|
[?:Wife number=4]{DOWN*3}|
[?:Wife number=5]{DOWN*4}
>
{ENTER}
>
{TAB}

#Execute code at this speed
#{FAST}

# Reg Qtr & Year
<[Marriage Date]|[Marriage Year]>
{TAB*2}

# Place
<[Place]>



>


# ===============Add Citation=============================================================

<
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Generic source
[?:var.ConfigSourceType=Generic]

# Select Source Template.
[lib.Add_FH_Citation:None]

#Execute code at this speed
#{FAST}


# Fill in source template "TRX Marriage".
[lib.WriteMarriage]

|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Templated source

# Select Source Template.
[lib.Add_FH_Citation:TRX Marriage]


#Execute code at this speed
{SLOW}

# Reg Type
{TAB}


# Husband's surname
[var.zSurname]{TAB}

# Husband's given name 
[var.zGivenName]{TAB}

[var.zSpouseSurname]{TAB}

[var.zSpouseGiven]{TAB}

<[Marriage Date]|[Marriage Year]>{TAB}

# Marriage Place
[Place]{TAB}

# Records Office or the Family History Society who performed transcription.
[Records Office]{TAB} 

# Collection Name
[Collection Name]{TAB} 

# Collection ID
[Collection ID]{TAB} 

# Record No.
[Record ID]{TAB} 

# Repository 
[lib.SetRepository]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]
{TAB}

# No images for transcription.
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++End of source type checks

>


#######################################################################################
<[?:var.Debug=0]
#######################################################################################

## Do nothing
>

UKBMD

#
# Author: Alan
# Description: Local Births, Marriages and Deaths (source of GRO Civil Registrations)
#
# Usage: [lib.UKBMD:Fact]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 21/05/2024 BETA6   First attempt.

[==:var.Debug:1]


# UKBMD Record Type
[lib.UKBMD_Type]

<
[?:var.zUKBMDType=UKBMD Birth][lib.UKBMD Birth:{1}]
|
[?:var.zUKBMDType=UKBMD Death][lib.UKBMD Death:{1}]
|
[?:var.zUKBMDType=UKBMD Marriage][lib.UKBMD Marriage:{1}]
>



<[?:var.Debug=0]
## DO NOTHING
>

UKBMD Birth


#
# Author: Alan
# Description: Local Births, Marriages and Deaths (source of GRO Civil Registrations)
#
# Usage: [lib.UKBMD Birth:Fact]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 18/05/2024 BETA4   First attempt.

[==:var.Debug:1]

[=:Parameter1:{1}]

# ============================== ADD FACT==============================================

<
[?:Parameter1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}{TAB}

#Execute code speed
{SLOW}

# Get Local Registration Year
[var.zRegYear]{TAB}

# Age at Death
{TAB}


# Registration District
[var.zSub-District]
{TAB}

>



# ============================== ADD CITATION==================================

#Execute code at this speed
{SLOW}

# Starting point is the birth fact in the Facts tab in the Property box.
<
[?:var.zRecordType=UKBMD Birth][lib.Add_FH_Citation:UKBMD Birth]
|
[?:var.zRecordType=UKBMD Death][lib.Add_FH_Citation:UKBMD Death]
>

#Execute code at this speed
{FAST}

# Fill in source template.

# Surname
[var.zSurname]{TAB}

# Given name(s)
[var.zGivenName]{TAB}

# Mother's maiden name
<[var.zMothersMaidenName]>{TAB}

# Registration Year
[var.zRegYear]{TAB}

# Registration District 
[var.zSub-District]{TAB}

# Region
[var.zRegion]{TAB}

# Registers At
[var.zRegistersAt]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Archive Reference
[var.zArchiveReference]{TAB}

# Collection ID
[Collection ID]{TAB}

# Collection Name
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactType]s
{ENTER}


<[?:var.Debug=0]
## DO NOTHING
>

UKBMD Death


#
# Author: Alan
# Description: Local Births, Marriages and Deaths (source of GRO Civil Registrations)
#
# Usage: [lib.UKBMD Death:Fact]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 18/05/2024 BETA4   First attempt.

[==:var.Debug:1]

[=:Parameter1:{1}]

# ============================== ADD FACT==============================================

<
[?:Parameter1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}{TAB}

#Execute code speed
{SLOW}

# Get Local Registration Year
[var.zRegYear]{TAB}

# Age at Death
[var.zAgeAtDeath]{TAB}


# Registration Sub-District
[var.zSub-District]
{TAB}

>



# ============================== ADD CITATION==================================

#Execute code at this speed
{SLOW}

# Starting point is the birth fact in the Facts tab in the Property box.
<
[?:var.zRecordType=UKBMD Birth][lib.Add_FH_Citation:UKBMD Birth]
|
[?:var.zRecordType=UKBMD Death][lib.Add_FH_Citation:UKBMD Death]
>

#Execute code at this speed
{FAST}

# Fill in source template.

# Surname
[var.zSurname]{TAB}

# Given name(s)
[var.zGivenName]{TAB}

# Age at Death
[var.zAgeAtDeath]{TAB}

# Birth Date / Birth Year
<[var.zBirthDate]>{TAB}

# Registration Year
[var.zRegYear]{TAB}

# Registration District 
[var.zSub-District]{TAB}

# Region
[var.zRegion]{TAB}

# Registers At
[var.zRegistersAt]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Archive Reference
[var.zArchiveReference]{TAB}

# Collection ID
[Collection ID]{TAB}

# Collection Name
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactType]s
{ENTER}


<[?:var.Debug=0]
## DO NOTHING
>

UKBMD Marriage


#
# Author: Alan
# Description: Local Births, Marriages and Deaths (source of GRO Civil Registrations)
#
# Usage: [lib.UKBMD Marriage:Fact]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 18/05/2024 BETA4   First attempt.

[==:var.Debug:1]

[=:Parameter1:{1}]

# ============================== ADD FACT==============================================

<
[?:Parameter1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}{TAB}



# Add fact.
{Ctrl+I}[var.zFact]{ENTER}

<
[?:var.zFact=Marriage]
<
[?:Wife=1]|
[?:Wife=2]{DOWN}|
[?:Wife=3]{DOWN*2}|
[?:Wife=4]{DOWN*3}|
[?:Wife=5]{DOWN*4}
>
{ENTER}
>
{TAB}




#Execute code speed
{SLOW}

# Get Local Registration Year
[var.zRegYear]{TAB}

# Age at Death
{TAB}


# Registration District
[Var.zChurchRegOffice], [var.zRegion]
{TAB}

>


# ============================== ADD CITATION==================================

#Execute code at this speed
{SLOW}

# Starting point is the marriage fact in the Facts tab in the Property box.
[?:var.zRecordType=UKBMD Marriage][lib.Add_FH_Citation:UKBMD Marriage]


#Execute code at this speed
{FAST}

# Fill in source template.

# Surname
[var.zSurname]{TAB}

# Given name(s)
[var.zGivenName]{TAB}

# Spouse's Surname
[var.zSpouseSurname]{TAB}

# Spouse's Given name(s)
[var.zSpouseGiven]{TAB}

# Registration Year
[var.zFactYear]{TAB}

# Church Register Office
[var.zChurchRegOffice]{TAB}

# Registration District 
[var.zRegion]{TAB}

# Registers At
[var.zRegistersAt]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Archive Reference
[var.zArchiveReference]{TAB}

# Collection ID
[Collection ID]{TAB}

# Collection Name
[Collection Name]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}


# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactType]s
{ENTER}


<[?:var.Debug=0]
## DO NOTHING
>

UKBMD_display

Service Name=[Page.Servicename]\<BR\>
Host Name=[Page.Hostname]\<BR\>
Collection Name=[Collection Name]\<BR\>
Collection ID=[Collection ID]\<BR\>
Source Title=[Source.Title]\<BR\>
Description=[Source.Description]\<BR\>
URL=[Page.URL]\<BR\>
# Record Type
<
[?:Spouse's Surname]UKBMD Marriage
|
[?:Age]UKBMD Death
|
[?:Age at Death or Year of Birth]UKBMD Death
|
# Sometimes Mother's Maiden Name is not available so this is the default Record Type
UKBMD Birth
>

\<BR\>\<BR\>

<
# Marriage
[?:Spouse's Surname]
\<span style="color:Green"\>Marriages\<BR\>
Surname=[Surname]\<BR\>
First name(s)=[First Name(s)]\<BR\>
Spouse Surname=[Spouse's Surname]\<BR\>
Spouse First name(s)=[First Name(s)]\<BR\>
Year=[Year]\<BR\>
Church Register Office=[Church   Register Office]\<BR\>
Region=[Region]\<BR\>
Repository=[Registers At]\<BR\>
Reference=[Reference]\<BR\>
\</span\>\<BR\>

|
# Death
[?:Age at Death or Year of Birth]
\<span style="color:Blue"\>Deaths\<BR\>
Surname=[Surname]\<BR\>
First name(s)=<[First Name(s)]|[Forename(s)]>\<BR\>
<Death age or Birth Year=[Age at Death or Year of Birth]\<BR\>>
Reference=[Reference]\<BR\>
Region=[Region]\<BR\>
Repository=[Registers At]\<BR\>
\</span\>\<BR\>

|
# Death
[?:Age]
\<span style="color:Blue"\>Deaths\<BR\>
Surname=[Surname]\<BR\>
First name(s)=<[First Name(s)]|[Forename(s)]>\<BR\>
<Death age or Birth Year=[Age at Death or Year of Birth]\<BR\>>
Reference=[Reference]\<BR\>
Region=[Region]\<BR\>
Repository=[Registers At]\<BR\>
\</span\>\<BR\>


|

\<span style="color:Red"\>Births>\<BR\>
Surname=[Surname]\<BR\>
First name(s)=<[First Name(s)]|[Forename(s)]>\<BR\>
<Mother's Maiden Name=[Mother's Maiden Name]\<BR\>>
Reference=[Reference]\<BR\>
Region=[Region]\<BR\>
Repository=[Registers At]\<BR\>
\</span\>\<BR\>

UKBMD_Type

#
# Author: Alan
# Description: Local Births, Marriages and Deaths (source of GRO Civil Registrations)
#
# Usage: [lib.UKBMD_Type]
#
# Change History     Reason for change
# ----------------   ------------------------------------------------------------------------
# 21/05/2024 BETA6   First attempt.

[==:var.Debug:1]

# UKBMD Record Type
<
[?:Spouse's Surname][==:var.zUKBMDType:UKBMD Marriage][==:var.zFact:Marriage]
|
[?:Surname 2][==:var.zUKBMDType:UKBMD Marriage][==:var.zFact:Marriage]
|
[?:Age][==:var.zUKBMDType:UKBMD Death][==:var.zFact:Death]
|
[?:Age at Death or Year of Birth][==:var.zUKBMDType:UKBMD Death][==:var.zFact:Death]
|
[?:Age or Date of Birth][==:var.zUKBMDType:UKBMD Death][==:var.zFact:Death]
|
[==:var.zUKBMDType:UKBMD Birth][==:var.zFact:Birth]
>

[==:var.zRecordType:[var.zUKBMDType]]

#[lib.ErrorMessage:UKBMD - unknown source type]

<[?:var.Debug=0]
## DO NOTHING
>

ValidateFieldValue

[=:Start:ValidateFieldValue]
# Author: Alan
# Created: 23 Jun 2023
#
# Usage [lib.ValidateFieldValue:Input Field:Valid Values]
# {1} - name of input field to be validated
# {2} - valid values of input field

<[?:{1}/[^{2}]/][lib.ErrorMessage:Invalid value]>

[=:End:ValidateFieldValue]

ValidateInputField

# Description: Checks to see if fields have been entered.

# Usage [lib.ValidateInputField:Input Field:Validation Type]
# Parameters: 
# {1} - Field name
# {2} - Validation type --> N=Numeric.....not used at present 7/7/2023


# Change History  Reason for change
# --------------  ---------------------------------------------------------------------------------------
# 04/02/2024      Constant checks were too annoying so will use debug to bypass all caode.
# 07/02/2024      Reinstate place validation using [lib.ErrorMessage]

[==:var.debug:1]


# If input field starts with "***Enter" then the Input Field has not been updated...

#  testing for any param{1} that starts "***Enter" which means no data entered

[=:CompareString:[{1}:substring:1:8]]

<
[?:CompareString=***Enter]
[lib.ErrorMessage:INPUT_FIELD_ERROR - update field {1}]
>

# Parameter 2 - If N then validate for numerics
[=:Parameter2:{2}]

# Condition 1 Start
<
[?:{2}=N]
# Condition 2 Start
<
[?:{1}/\D/][lib.ErrorMessage:Field {1} contains non numeric characters]
>
# Condition 2 End
>
# Condition 1 End



<[?:var.debug=0]
## Do nothing
>

ValidatePlace

# Usage [lib.ValidatePlace:Place]

# Change History    Reason for change
# --------------     -------------------------------------------------------------------------------
# 01/02/2024         When ORA starts it was always running this check before user has had time to change it.
# 04/02/2024         Constant checks were too annoying so will use debug to bypass all caode.
# 07/02/2024         Reinstate place validation due to using [lib.ErrorMessage]
# 23/05/2024 BETA6   New system parameter - [PlaceParts]
# 13/07/2024 BETA8_7 Enhanced error message if NO PLACE found.
# 15/07/2024 BETA8_9 Changed field [PlaceParts] to [var.PlaceParts].

[==:var.debug:1]

# firstly, work out how many place parts and store the value in PlaceCount
# Don't validate if the field has not been update ie. Still shows ***Enter

[=:Param1:[{1}]]

<
[?:Param1:substring:1:8=***Enter]
[lib.ErrorMessage:PLACE_ERROR - No place entered for {1}]

|

[=:PlaceCount:[{1}:splitcount:,]]

#  testing for any param{1} that has less than three place parts and stop autotype template with error

<
[?:var.PlaceParts]
<
[?:PlaceCount<[var.PlaceParts]][lib.ErrorMessage:PLACE_ERROR - {1} has too few commas]
>


|
[?:PlaceCount<3][lib.ErrorMessage:PLACE_ERROR - {1} has too few address lines]
>



>


<[?:var.debug=0]
## Do nothing
>

Workhouse_Admission

#[=:Start:Workhouse_Admission]

# Usage: [lib.Workhouse_Admission]
#
# Author: Alan
# Version Date           Description Change
# ----------------       -------------------------------------------------------------------
# 15/06/2024 BETA6_9     New records/source type     
#


[==:var.debug:1]


[=:Param1:{1}]

# ===============Add Fact=============================================================
<
[?:Param1=Fact]

# Add fact.
{Ctrl+I}[var.zFact]{ENTER}
{TAB}

#Execute code at this speed
#{FAST}

# Admission date
[var.zAdmissionDate]{TAB*2}

# Workhouse Name & Location
[var.zWorkhouseName], [var.zWorkhouseLocation]
{TAB*2}
<[Notes]>
{TAB}
>

# ===============Add Citation=============================================================

# Templated Source
[lib.Add_FH_Citation:Workhouse Admission]


#Execute code at this speed
{FAST}

# Fill in source template...

# Workhouse Name (FMP - [Workhouse name]; ANC - [Workhouse])
[var.zWorkhouseName]{TAB}

# Workhouse Location
[var.zWorkhouseLocation]{TAB}

# Name
[var.zFullname]{TAB}

# Address
[var.zResidence]{TAB}

# Birth Date
[var.zBirthDate]{TAB}

# Admission No.
[var.zAdmissionNo]{TAB}

# Admission date
[var.zAdmissionDate]{TAB}

# Occupation
[var.zOccupation]{TAB}

# From which parish was person admitted from
[var.zFromParish]{TAB}

# Archive / Records Office (ANC - [Source.Part1]; FMP - [Archive])
[var.zArchive]{TAB}

# Archive Reference (ANC - [Source.Title]; FMP - 
[var.zArchiveReference]{TAB}

# Page Number
[var.zPage]{TAB}

# Collection (FMP - [Record set]; ANC - [Source.Title])
[var.zCollection]{TAB}

# Repository
[lib.SetRepository]{TAB}

# Record ID
[var.zRecordID]{TAB}

# URL
<[URL]|[Page.URL]>{TAB}

# Research Date
[Page.Access Date]{TAB}

# Research Place
[Research Place]{TAB}

# Data Quality Assessment
[lib.SetAssessment:P]{Tab}


# Move to Media tab.
{CTRL+TAB*3}

#Execute code at this speed
{SLOW}

# Insert from File
{CTRL+I}{DOWN}{ENTER}{ENTER}

{750}

# Windows Folder where media is opened from.
[var.zMediaSource]{ENTER}

# Add
[var.zFactFolder]
{ENTER}

# If occupation is present then add fact for occupation using existing source.
<
[?:var.zOccupation]


# Exit media tab 
{Alt+F4}

# Put focus on first fact in Property Box.
{Alt+Enter}


#Execute code at this speed
{FAST}


#...Add Occupation fact
{Ctrl+I}Occupation{ENTER}{TAB}
[var.zOccupation]{TAB}
[var.zAdmissionDate]{TAB}

#...Add existing citation
[lib.Add_FH_Citation:Workhouse Admission:EXIST]

#Execute code at this speed
{FAST}

#...Add Data Quality Assessment
{TAB*18}
[lib.SetAssessment:P]{Tab}
>

<[?:var.Debug=0]
## DO NOTHING
>


#[=:End:Workhouse_Admission]

WriteBaptism

#
# Author: Alan
# Description: 
# Usage: [lib.WriteBaptism]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].


[var.Debug=1]
#---------------------------------------------------------Source fields
# Title
[var.zRecordType], [var.zFactYear], [var.zSurname] [var.zGivenName]{tab}
# Generic Type
Baptism{tab*5}
# Repository
[lib.SetRepository]
{tab*2}


#---------------------------------------------------------Citation fields

# Research Date
[Page.Access Date]{Tab}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{Tab}

# Where Within
<[URL]|[Page.URL]>{Tab}

# Text form Source
{Tab}


# Note
{Fast}
Source: [var.zMediaName:split:.:1]{Enter}
Record Type: [var.ZRecordType]{Enter}
Fact Year: [var.zFactYear]{Enter}
Denomination:   [var.zDenomination]{Enter}
Name:           [var.zGivenName] [var.zSurname]{Enter}
<Gender:        [var.zGender]{Enter}>
<Birth:          [var.zBirth]{Enter}>
Baptism:	[var.zBaptismDate]{Enter}
Baptism Place:	[var.zBaptismPlace]{Enter}
<Father Name:	[var.zFathersGivenName] [var.zFathersLastname]{Enter}>
<Mother Name:    [var.zMotherGiven] [var.zMotherSurname]{Enter}>
<Father's occupation: [==:var.zFOccupation:]{enter}>
Collection:     [var.zCollectionName]{Enter}
Collection ID:  [var.zCollectionID]{Enter}
Record No.:     [var.zRecordNo]{Enter}
Research Place: [Research Place]
{Slow}

# Move to Media tab.
{Ctrl+Tab*3}

{slow}
# Citation Record - Insert from File for Person
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource]
{Enter}

{tab}

<[?:var.Debug=0]
##### Nothing
>



WriteBirth

#
# Author: Alan
# Description: 
# Usage: [lib.WriteBirth]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].


[var.Debug=1]
#---------------------------------------------------------Source fields
# Title
[var.zRecordType], [var.zFactYear], [var.zSurname] [var.zGivenName]{tab}
# Generic Type
Birth{tab*5}
# Repository
[lib.SetRepository]
{tab*2}


#---------------------------------------------------------Citation fields

# Research Date
[Page.Access Date]{Tab}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{Tab}

# Where Within
<[URL]|[Page.URL]>{Tab}

# Text form Source
{Tab}


# Note
{Fast}
Source: [var.zMediaName:split:.:1]{Enter}
Record Type: [var.ZRecordType]{Enter}
Fact Year: [var.zFactYear]{Enter}
Name:           [var.zGivenName] [var.zSurname]{Enter}
Mother Name:    [var.zMotherGiven] [var.zMotherSurname]{Enter}
Archive Ref:    [var.zArchiveReference]{Enter}
GRO Ref Qtr:    [var.zCivilRegQtr]{Enter}
GRO Ref Yr:     [var.zCivilRegYear]{Enter}
GRO District:   [var.zCivilRegDistrict]{Enter}
GRO Volume:     [var.zVolume]{Enter}
GRO Page:       [var.zPage]{Enter}
Collection:     [var.zCollectionName]{Enter}
Collection ID:  [var.zCollectionID]{Enter}
Record No.:     [var.zRecordNo]{Enter}
Research Place: [Research Place]
{Slow}

# Move to Media tab.
{Ctrl+Tab*3}

{slow}
# Citation Record - Insert from File for Person
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource]
{Enter}

{tab}

<[?:var.Debug=0]
##### Nothing
>

WriteCitation

[=:Start:WriteCitation]
#	*****************  This is still a work in progess and under test *****
# author : Paul Tanner-Tremaine
# www.fhora.tantrem.com
#
# this template defines the Citation Text from Source entry for each collection type
# ensures you are using the same template of info each time
#
# v1.00	Changed 14 Aug 2023	Initial template
# v1.01 updated 29 aug 2023 created FMP Baptism routine
# v1.02 updated 4 Sep 2023  added Ancestry marriage Banns and Contract sections
# v1.03 updated 7 Sep 2023  added Ancestry Burial info
# v1.04 updated 10 Sep 2023 added Marriage Age and Marital status to Ancestry Marriage section
# v1.05 updated 12 Sep 2023 FMP added baptism and marriage section data. FMP have variants within the 
#                   same Record sets for marriages transcribed by different transcription collections!
# v1.06 updated 17 Sep 2023 added test to check if Marriage is first word of eventtype parameter
# v1.07 updated 19 Sep 2023 added FS Christening section
# v1.08 updated 24 Sep 2023 added FreeReg section and Find a Grave section
# v1.09 updated 3 Oct 2023 added Ancestry Probate section
# v1.10 updated 5 Oct 2023 added probate questions and more Marriage template fixes
# v1.11 updated 11 Oct 2023 added Civil Registrations in Ancestry
# v1.12 updated 23 Oct 2023 cosmetic changes
# v1.13 updated 26 Oct 2023 added Civil Reg Marriage section to Findmypast
# v1.14 updated 4 Nov 2023 added more detail to Findagrave burials
#
# v1.15 updated 29 Nov 2023 Split out the sections in new libs per Service
#
# *** parameter driven by var.zEventType set up in InitVars  ****
# usage [lib.WriteCitation:var.zEventType]
# each of the sections per service are effectively determining the output data in a consistent
# uniform method, or creating a template for that source/citation.

# branch depending on Service
# change the running speed to {fast} or {slow}
{fast}

############################################## Ancestry
<[?:o.Service=Ancestry]
[lib.WriteCitationANC:var.zEventType]
>
############################################## FamilySearch
<[?:o.Service=FamilySearch]
[lib.WriteCitationFS:var.zEventType]
>
############################################# FindMyPast
<[?:o.Service=Findmypast]
[lib.WriteCitationFMP:var.zEventType]
>
############################################# FreeReg
<[?:o.Service=FreeReg]
[lib.WriteCitationFRG:var.zEventType]
>
############################################# Find A Grave
<[?:o.Service=Find a Grave]
[lib.WriteCitationFAG:var.zEventType]
>
#####################################
# now add the common items at the end of the citation text
# open the Rich Text editor
{Ctrl+space}{500}
#go to end of existing text and next line
{Ctrl+End}{enter}{250}
[lib.AddRecordLinktoTFS:var.zRecURL:var.zURLhrefdesc]{tab}{enter}
{Ctrl+End}{enter}{250}
<[==:var.zImageURL:[Image Page URL:split:&parent:1]]
[lib.AddImageLinktoTFS:var.zImageURL:var.zImagehrefdesc]{tab}{enter}>

[=:end:WriteCitation]

WriteDeath

#
# Author: Alan
# Description: 
# Usage: [lib.WriteDeath]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].



#---------------------------------------------------------Source fields
# Title
[var.zRecordType], [var.zFactYear], [var.zSurname] [var.zGivenName]{tab}
# Generic Type
Death{tab*5}
# Repository
[lib.SetRepository]
{tab*2}

#---------------------------------------------------------Citation fields

# Research Date
[Page.Access Date]{Tab}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]{Tab}

# Where Within
<[URL]|[Page.URL]>{Tab}

# Text form Source
{Tab}

# Note
{Fast}
Source: [var.zMediaName:split:.:1]{Enter}
Record Type: [var.ZRecordType]{Enter}
Fact Year: [var.zFactYear]{Enter}
Name:           [var.zGivenName] [var.zSurname]{Enter}
Mother Name:    [var.zMotherGiven] [var.zMotherSurname]{Enter}
Archive Ref:    [var.zArchiveReference]{Enter}
GRO Ref Qtr:    [var.zCivilRegQtr]{Enter}
GRO Ref Yr:     [var.zCivilRegYear]{Enter}
GRO District:   [var.zCivilRegDistrict]{Enter}
GRO Volume:     [var.zVolume]{Enter}
GRO Page:       [var.zPage]{Enter}
Collection:     [var.zCollectionName]{Enter}
Collection ID:  [var.zCollectionID]{Enter}
Record No.:     [var.zRecordNo]{Enter}
Research Place: [Research Place]
{Slow}

# Move to Media tab.
{Ctrl+Tab*3}

{slow}
# Citation Record - Insert from File for Person
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource]
{Enter}

{tab}

<[?:var.Debug=0]
##### Nothing
>

WriteGRO

#
# Author: Alan
# Description: 
# Usage: [lib.WriteGRO]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].
# 16/05/2024 BETA4   Changed [var.z_*] to [var.z*].


# Parameters: {1} Template - Write templated source citation
#Execute code at this speed
{fast}
[=:Param1:{1}]

<
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Template Citation
[?:Param1=Template]

# Fill in source citation template.

# Child's surname
[var.zSurname]{Tab}

# Child's given name(s)
[var.zGivenName]{Tab}

<
# Mother's maiden name
[?:var.zRecordType=GRO Birth][var.zMothersMaidenName]
|
# Age at Death - this coud be an age but in later documents it was a birth date - dd mmm yyyy
[?:var.zRecordType=GRO Death][var.zAgeAtDeath]
>
{tab}

# Registration Quarter
[var.zCivilRegQtr]{Tab}

# Registration Year
[var.zCivilRegYear]{Tab}

# Registration District
[var.zCivilRegDistrict]{Tab}

# Volume
[var.zVolume]{Tab}

# Page
[var.zPage]{Tab}

# District Code
[var.zCivilRegDistrictCode]{Tab}

# Entry Number
[var.zCivilRegEntryNumber]{Tab}

# Repository
[lib.SetRepository]

# Research Date
[Page.Access Date]{Tab}

# Research Place
[Research Place]{tab}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]

|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Generic Citation
#---------------------------------------------------------Source fields
# Title
[var.zRecordType], [var.zFactYear], [var.zSurname] [var.zGivenName]{tab}
# Generic Type
[var.zFactType]{tab*5}
# Repository
[lib.SetRepository]


#---------------------------------------------------------Citation fields

# Research Date
[Page.Access Date]{Tab}

# Where Within
<[URL]|[Page.URL]>{Tab}

# Data Quality Assessment --> S = Secondary
[lib.SetAssessment:S]

# Note
# Split removes ".JPG" from [var.zMediaName]
Source: [var.zMediaName:split:.:1]{Enter}
Record Type: [var.ZRecordType]{Enter}
Fact Year: [var.zFactYear]{Enter}
Individual:     [var.zGivenName] [var.zSurname]{Enter}
Gender:         [var.zGender]{Enter}
<Mother's Maiden Name: [var.zMothersMaidenName]>
<Age At Death: [var.zAgeAtDeath]>
GRO Ref Qtr:    [var.zCivilRegQtr]{Enter}
GRO Ref Yr:     [var.zCivilRegYear]{Enter}
GRO District:   [var.zCivilRegDistrict]{Enter}
GRO Volume:     [var.zVolume]{Enter}
GRO Page:       [var.zPage]{Enter}
Collection:     [var.zCollectionName]{Enter}
Collection ID:  [var.zCollectionID]{Enter}
Research Place: [Research Place]


>


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Common Citation
# Complete common parts for a source or generic source citation

# Move to Media tab.
{Ctrl+Tab*3}

#Execute code at this speed
{slow}

# Citation Record - Insert from File
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource]
{Enter}

WriteMarriage

#
# Author: Alan
# Description: 
# Usage: [lib.WriteMarriage]

# Change History     Reason for change 
# ----------------   -----------------------------------------------------------------------------
# 06/04/2024         Changed [lib.SetResearchPlace] to [Research Place].


# Early SCI Marriages spouse is not known...
# Need a way to fix this!!!

#---------------------------------------------------------Source fields
# Title
[var.zRecordType], [var.zFactYear], [var.zSurname] [var.zGivenName] & [var.SpouseSurname] [var.zSpouseGiven]{tab}
# Generic Type
Marriage{tab*5}
# Repository
[lib.SetRepository]


#---------------------------------------------------------Citation fields

# Research Date
[Page.Access Date]{Tab}

# Where Within
<[URL]|[Page.URL]>{Tab}

# Data Quality Assessment --> P = Primary
[lib.SetAssessment:P]

# Note
Source: [var.zMediaName1:split:.:1]{Enter}
Record Type: [var.ZRecordType]{Enter}
Fact Year: [var.zFactYear]{Enter}
Husband:        [var.zGivenName] [var.zSurname]{Enter}
Wife:           [var.zSpouseGiven] [var.zSpouseSurname]{Enter}
Archive Ref:    [var.zArchiveReference]{Enter}
GRO Ref Qtr:    [var.zCivilRegQtr]{Enter}
GRO Ref Yr:     [var.zCivilRegYear]{Enter}
GRO District:   [var.zCivilRegDistrict]{Enter}
GRO Volume:     [var.zVolume]{Enter}
GRO Page:       [var.zPage]{Enter}
Collection:     [var.zCollectionName]{Enter}
Collection ID:  [var.zCollectionID]{Enter}
Record No.:     [var.zRecordNo]{Enter}
Research Place: [Research Place]


# Move to Media tab.
{Ctrl+Tab*3}

{slow}
# Citation Record - Insert from File for Husband
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource1]
{Enter}

{tab}

# Citation Record - Insert from File for Wife
{Ctrl+I}{Down*2}{Enter}{Enter}

# Windows Folder where media is opened from.
{750}
[var.zMediaSource2]
{Enter}