ORA Template Library Report

6 August 2023 - 06:52:36

Add_AS_1939_Register

[=:Start:Add_AS_1939_Register]
#
#
# Author: Alan
# Version Date        Description Change
# 15/05/2023 07:00    Created
#
# [lib.Add_AS_1939_Register]

{target=ancestral sources}

# Execution speed
{fast}

# Set up common fields
[lib.SetFieldName:1939 Register]

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


# Place - use to allow Geocoding
[z_Full Address]
{Tab}

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

# Ref ID 
[z_ArchiveReference]
{Tab}

# Other Info
{Ctrl+A}{Del}
ED: [z_Enumeration District]


[=:End:Add_AS_1939_Register]

Add_AS_1939_Register_Templated_Source

[=:Start: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        Description Change
# 17/05/2023 14:00    Created
#

# Service       Collection
# Ancestry      
# Findmypast    
#
{Target=Ancestral Sources}
# 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*15}


# Repository
[lib.SetRepositoryAS]


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

# URL
{tab}[Page.URL]
{Tab}

# URL dropdown box
{Tab}

# Resource Date
#[lib.SetResearchDate]
{tab*2}

# Research Place
{tab}[lib.SetResearchPlace]
{tab*2}
# OK
{Enter}


# Save record
#{ALT+F,S}
[=:End:Add_AS_1939_Register_Templated_Source]

Add_AS_Autotext

[=:Start:Add_AS_Autotext]
# Usage: [lib.Add_AS_Autotext]
{Target=Ancestral Sources}
# Execution speed
{fast}
# Select Autotext option
{Ctrl+Shift+u}

# Select Autotext template by [z_FactType]

<
# 1939 Register
[?:z_FactType=1939 Register]{down}

|
# Baptism
[?:z_FactType=Baptism]
# ... Parish Registers 1813-(England/Wales)
<
[?:z_FactYear>=1813]{down*9}
|
# ... Parish Registers 1813-(England/Wales)
[?:z_FactYear<=1812]{down*6}
>

|
# Census
[?:z_FactType=Census]{down}

|
# Electoral Register
[?:z_FactType=Electoral Register]{down}

|
# Marriage
[?:z_FactType=Marriage]
# ... year
<
[?:z_FactYear>=1837]{down*14}
|
[?:z_FactYear>=1812]{down*12}
|
[?:z_FactYear>=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
# Version Date        Description Change
# 15/05/2023 07:00    Created
# 03/07/2023          New AS7.7.7 uses Control keys to move to different tabs

# 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
#
{Target=Ancestral Sources}


# Execution speed
{fast}

#
[lib.SetFieldName:Baptism]

#-------------------------------------------------------
# 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
<[Parish]|[Baptism Place]|[Place]>{Tab*3}

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

# Father's Name
#[Father's Name]
{tab*4}

# Mother's Name
#[Mother's Name:nameGiven]{space}[Mother's Name:nameSurname:uppercase]
{tab*3}

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

<[?:BirthDate=nk][=:BirthDate:]>
<[Birth Date]|[BirthDate]>{Tab}

<[?:Occupation=nk][=:Occupation: ]>
[Occupation]
[lib.ValidateInputField:Occupation]
{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
<[?:Abode=nk][=:Abode:]>
[Abode]
[lib.ValidateInputField:Abode]
{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
<[Reference Number]|[Source.Reference Number]>{Tab}

# Other info
{Tab}

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


[=: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
#

# 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}
# 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}

{Tab*27}

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

# Entry no
{tab}[lib.ValidateInputField:Entry no]
<[?:Entry no=nk][=: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]>>
>
{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}

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

# URL
{tab}[URL]{tab}

# URL dropdown box
{Tab}

# Resource Date
{Tab*2}

# Research Place
{tab}[lib.SetResearchPlace]


# OK
{Enter}

[=: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        Description Change
# 08/07/2023          Created
# 03/07/2023          New AS7.7.7 uses Control keys to move to different tabs

# 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], >[Burial Place]{Tab*3}

[Burial Date]{Tab*3}

# Issue with ages in Ancestral Sources
[lib.Fix_AS_Age:Age]
{Tab*5}

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

# Occupation
{Del}{tab*2}

[Death Date]



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

{tab*8}

# Individual Residence Place
[lib.ValidateInputField:Input Field:Residence]
[lib.ValidatePlace:Residence]
[Residence]

#--------------------------------------------------------
# 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}
<[Archive reference]: ><Cemetery Section: [Cemetery Section], ><Interrment Number: [Interment Number]>{Tab}

# Other info
{Tab}

# Minister
{CtrL+A}{Del}
<[Minister]|[==: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
#

# Service       Collection
# Ancestry      England & Scotland, Select Cemetery Registers, 1800-2016
#
{target=ancestral sources}
# 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}

{Tab*27}

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

# Entry no
{tab}[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]>>
>
{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}

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

# URL
{tab}[URL]{tab}

# URL dropdown box
{Tab}

# Resource Date
{Tab*2}

# Research Place
{tab}[lib.SetResearchPlace]


# OK
{Enter}

[=:End:Add_AS_Burial_Templated_Source]

Add_AS_Census

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

#
#
# Author: Alan
# Version Date        Description 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]

# 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
[lib.SetFieldName:Census]

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

# 1841-----------------------------------------------------------
<
[?:z_CensusYear=1841]
[z_CensusClass]
/
[z_Piece]
/
[z_Book]
/
[z_Folio]
/
[z_Page]
|
# 1851-----------------------------------------------------------
[?:z_CensusYear=1851]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1861-----------------------------------------------------------
[?:z_CensusYear=1861]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1871-----------------------------------------------------------
[?:z_CensusYear=1871]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1881-----------------------------------------------------------
[?:z_CensusYear=1881]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1891-----------------------------------------------------------
[?:z_CensusYear=1891]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1901-----------------------------------------------------------
[?:z_CensusYear=1901]
[z_CensusClass]/[z_Piece]/[z_Folio]/[z_Page]/[z_Schedule]
|
# 1911-----------------------------------------------------------
[?:z_CensusYear=1911]
[z_CensusClass]/[z_Piece]/[z_Schedule]
|
# 1921-----------------------------------------------------------
[?:z_CensusYear=1921]
[z_CensusClass]/[z_Piece]/[z_Schedule]
>

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

RD: <[z_Registration district], >
SD: <[z_Sub district], >
ED: <[z_Enumeration district]>

[=:End:Add_AS_Census]

Add_AS_Census_Templated_Source

[=:Start:Add_AS_Census_Templated_Source]
{target=ancestral sources}
# Author: Alan
# Created: 2023
# 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]
# Parameter: E (Electoral Register)
#            space (Census)

# 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*15}

# 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
[lib.SetResearchPlace]

{tab*2}
# OK
{Enter}

[=:End:Add_AS_Census_Templated_Source]

Add_AS_ElectoralRegister

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

#
#
# Author: Alan
# Version Date        Description Change
# 02/08/2023 08:50    Created


# Usage: [lib.Add_AS_ElectoralRegister]

# Execution speed
{fast}

# Set up common fields
[=:z_FactType:Electoral Register]
[lib.SetFieldName]

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

{Tab}

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


[=:End:Add_AS_ElectoralRegister]

Add_AS_ElectoralRegister_Templated_Source

[=:Start:Add_AS_ElectoralRegister_Templated_Source]
{target=ancestral sources}
# Author: Alan
# Created: 02 Aug 2023
# 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_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*15}

# 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
[lib.SetResearchPlace]

{tab*2}
# OK
{Enter}

[=:End:Add_AS_ElectoralRegister_Templated_Source]

Add_AS_Image

[=:Start:Add_AS_Image]
# Usage: [lib.Add_AS_Image]
#
# Information needed...
# Folder to save in
# Fact Type
# Fact Year
# Full Name
#
{target=ancestral sources}
# Usage: [lib.Add_AS_Image]
# Execution speed
{1000}
# Start media insert
{Ctrl+Shift+i}
{1000}
# Find image file
{Alt+f}

# Execution speed
{slow}


# Get RG Class in order to determine Fact Type
# RG101 = 1939 Register ; <> RG101 = Census
[lib.Get_RG_Class]


# Create media folder name - Census - HOxxx, RGxx; !939 - RG101; Record Type Baptism - Births

<
[?:RG_Class:substring:1:2=HO][lib.SetFolderPath:Census]
|
[?:RG_Class:substring:1:2=RG][lib.SetFolderPath:Census]
|
[?:Record Type=Baptism][lib.SetFolderPath:Births]
|
[?:Baptism Date:dateYear][lib.SetFolderPath:Births]
|
[?:Record Type=Burial][lib.SetFolderPath:Deaths]
|

# Findmypast
[?:Register Type=Baptism][lib.SetFolderPath:Births]
|
[?:Register Type=Baptisms][lib.SetFolderPath:Births]
|
[?:Marriage Date:dateYear!=][lib.SetFolderPath:Marriages]
|
[?:Electoral District!=][lib.SetFolderPath:Census]
>

# Set Fact_Type
<
[?:RG_Class=RG101][=:Fact_Type:1939 Register]
|
[?:RG_Class:substring:1:2=HO][=:Fact_Type:Census]
|
[?:RG_Class:substring:1:2=RG][=:Fact_Type:Census]
|
[?:Record Type=Baptism][=:Fact_Type:Baptism]
|
[?:Baptism Date:dateYear][=:Fact_Type:Baptism]
|
[?:Record Type=Burial][=:Fact_Type:Burial]
|
[?:Marriage Date:dateYear!=][=:Fact_Type:Marriage]
|
# Findmypast
[?:Register Type=Baptism][=:Fact_Type:Baptism]
|
[?:Register Type=Baptisms][=:Fact_Type:Baptism]
|
[?:Baptism Date:dateYear!=][=:Fact_Type:Baptism]
|
[?:Electoral District!=][=:Fact_Type:Electoral Register]
>


# Set up [FullName] depending on service ------------------Ancestry or Findmypast
<[?:Page.ServiceName=Ancestry][=:FullName:[Name:nameSurname:append: :append:[Name:nameGiven]]]>
#<[?:Page.ServiceName=Findmypast][=:FullName:[Last name:append: :append:[First name(s)]]]>
# Attempted fix because FMP changed last name field code for 1939 Register - 02 Jul 2023
<[?:Page.ServiceName=Findmypast]
<
[?:Last name][=:FullName:[Last name:append: :append:[First name(s)]]]
|
[=:FullName:[Last name(s):append: :append:[First name(s)]]]
>
>


# Set up [FactYear] depending on service ------------------Ancestry or Findmypast
<[?:Page.ServiceName=Ancestry][=:FactYear:[Source.Year]]>
<[?:Page.ServiceName=Findmypast][=:FactYear:[Record set:split: :1]]>


<[?:Fact_Type=Baptism][=:FactYear:[Baptism Date:dateYear]]>
<[?:Fact_Type=Burial][=:FactYear:[Burial Date:dateYear]]>
<[?:Fact_Type=Marriage][=:FactYear:[Marriage Date:dateYear]]>
<[?:Fact_Type=Electoral Register][=:FactYear:[Residence Year:dateYear]]>

# Set up image filename dependent upon RG Class...
# --> eg 1939 = 1939 Register, surname first name
# --> eg 1841-1921 =Census, yyyy, surname first name
<
[?:RG_Class=RG101][=:Image_Filename:[FullName:prepend:1939 Register, ]]
|
[?:Fact_Type!=Marriage][=:Image_Filename:[FullName:prepend:, :prepend:[FactYear]:prepend:, :prepend:[Fact_Type]]]
|
[=:Image_Filename:[FullName:prepend:, :prepend:[FactYear]:prepend:, :prepend:Marriage:append: & :append:[Spouse's Name:nameSurname]:append: :append:[Spouse's Name:nameGiven]]]
>
# Windows Folder where media is opened from.
<[?:Register Type=Bishop's Transcripts]
[FolderPath][Image_Filename:replace:Baptism:Baptism BT].jpg
|
[FolderPath][Image_Filename].jpg
>
#[FolderPath][Image_Filename].jpg

# Open file image.
{Enter}

# Execution speed
{1000}

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

# Accept suggested Family Historian folder.
{Enter}

# Exit Image Viewer window
{1000}
{Esc}
[=:End:Add_AS_Image]

Add_AS_Image_v2

{target=ancestral sources}
[=:Start:Add_AS_Image_v2]
# Usage: [lib.Add_AS_Image_v2:Event Folder:Fact Type:Register Type]
# {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)
#
# Information needed...
# Folder to save in
# Fact Type
# Fact Year
# Full Name
#

# Execution speed
{250}

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

# Execution speed
{slow}


# Create media folder name - Census - HOxxx, RGxx; !939 - RG101; Record Type Baptism - Births

[lib.SetFolderPath:{1}]

# Set Fact_Type
[=:z_FactType:{2}]

[lib.SetFieldName:{2}]

# Set up [FullName] ------------------------------------------------------------
[=:FullName:[z_Surname:append: :append:[z_GivenName]]]


# Set up [FactYear] depending on [Fact_Type]------------------------------------
<
[?:z_FactType=Baptism][=:FactYear:[Baptism Date:dateYear]]
|
[?:z_FactType=Burial][=:FactYear:[Burial Date:dateYear]]
|
[?:z_FactType=Marriage]
<
[?:Event Date][=:FactYear:Event Date:dateYear]
|
[=:FactYear:[Source.Year]]
>
|
[?:z_FactType=Electoral Register][=:FactYear:[Residence Year:dateYear]]
>


# Set up image filename---------------------------------------------------------

<
[?:z_FactType=1939][=:Image_Filename:[FullName:prepend:1939 Register, ]]
|
[?:z_FactType!=Marriage][=:Image_Filename:[FullName:prepend:, :prepend:[z_FactYear]:prepend:, :prepend:[z_FactType]]]
|
[=:Image_Filename:[FullName:prepend:, :prepend:[z_FactYear]:prepend:, :prepend:Marriage:append: & :append:[z_SpouseSurname]:append: :append:[z_SpouseGiven]]]
>



# Set up Register Type----------------------------------------------------------
[=:Register Type:{3}]
<
[?:Register Type=BT]|
[?:Register Type=NC]|
[?:Register Type=PR]|
[=:Register Type:]
>

# Set up Windows folder for media------------------------------------------------

# Condition 1 - START
<
[?:Register Type]

# Condition 2 - START
<
[?:z_FactType=Baptism][FolderPath][Image_Filename:replace:Baptism:Baptism {3}].jpg
|
[?:z_FactType=Marriage]
[FolderPath]

# Condition 3 - START
<[?:Register Type][Image_Filename:replace:Marriage:Marriage {3}].jpg
|[Image_Filename:replace:Marriage:Marriage].jpg>
# Condition 3 - END
|
[?:z_FactType=Burial][FolderPath][Image_Filename:replace:Burial:Burial {3}].jpg
>

# Condition 2 - END
|
# Condition 1 - ELSE
[FolderPath][Image_Filename].jpg
>
# Condition 1 - END

# 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}
[=:End:Add_AS_Image_v2]

Add_AS_Marriage

#
# NOT SET UP AS THIS WAS COPY OF ADD_AS_BAPTISM
#
[=:Start:Add_AS_Marriage]
#
# 
# 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.
#
#
# Author: Alan
# Version Date        Description Change
# 28/05/2023 07:00    Created
#

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

# Execution speed
{fast}


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

# Address
{Tab}

# Church drop down
{Tab}

# Marriage Date
<[Event Date]|[Marriage Date]>

# 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]
>
[Individual Marriage Status]
[lib.ValidateInputField: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]
# Skip fields
{tab*16}
# Spouse Father Deceased
<[?:Spouse Father Deceased=y]{Space}>
{tab}
# Spouse Father Occupation
[Spouse Father Occupation]


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

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

# Other info
{Tab}

# Minister
{Ctrl+A}{Del}
[lib.ValidateInputField:Minister]
[Minister]
{Tab}


[=:End:Add_AS_Marriage]

Add_AS_Marriage_Templated_Source

#
# NOT LIVE AS THIS WAS COPIED FROM Add_AS_Baptism_Templated_Source
#
#
# NOT LIVE AS THIS WAS COPIED FROM Add_AS_Baptism_Templated_Source
#
[=:Start:Add_AS_Marriage_Templated_Source]
#
# Usage: [lib.Add_AS_Marriage_Templated_Source]
#
# Author: Alan
# Version Date        Description Change
# 15/05/2023 07:00    Created
#

# 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}

{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>

# 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
[Source.Part1]{tab}

# Reference
{tab}{tab}


# Repository
{Tab}[lib.SetRepositoryAS]

# Collection
{tab}[Source.Title]{tab}

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

# URL dropdown box
{Tab}

# Resource Date
{tab}{tab}

# Research Place
{tab}[lib.SetResearchPlace]

# OK
{Enter}



[=:End:Add_AS_Marriage_Templated_Source]

Add_Banns

[=:Start:Add_Banns]
#
# Author: Alan
# Version Date           Description Change
# 21/05/2023 20:30       First attempt
#
# 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
[lib.SetResearchPlace]
{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_Death_cite_Probate_ANC

[=:Start:Add_Death_cite_Probate_ANC]
#
# Created: 12/03/2023
# Author: Alan
# Version Date         Description Change
# ----------           -----------------------------------------------------
# 12/03/2023           First attempt
#        


#Execute code at fastest speed
{slow}
# Add Death fact.
{Ctrl+I}Death{Enter}{Tab}



# Death Date
# The following line will highlight the death date in control panel if
# the death date is missing the year.
#<[%:Death Date:dateYear]|[Death Date]>
# Sets "d3" to Death Date year so it can be checked whether its present
[=:d3:[Death Date:dateYear]]
# If death date has no year then it sets "yr" to the year of the probate
<[?:Death Date:dateYear]|[=:yr:[Probate Date:dateYear]]>
[Death Date]< [?:Death Date:dateYear]|[yr]>
{Tab}
# Age
{Tab}

# Death Place
[Death Place]{Enter}


# Validate Death Place
<[?:Death Place:splitcount:,>2]|[=:Death Place has incorrect number of address lines - Click cancel]>

# 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}
Probate, [Probate Date:dateYear], [Name:nameSurname] [Name:nameGiven] 
{F6}{Space}{Enter}


[=:End:Add_Death_cite_Probate_ANC]

Add_Death_cite_Probate_FMP

[=:Start:Add_Death_cite_Probate_FMP]
#
# 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.
#
# Collection : England & Wales Government Probate Death Index 1858-2019
#
   


#Execute code at fastest speed
{slow}
# Add Death fact.
{Ctrl+I}Death{Enter}{Tab}



# Death Date
[Death date]{Tab}

# Age
{Tab}

# Death Place
[Residence town], [County], [Country]{Enter}


# 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}
Probate, [Probate year], [Last name] [First name(s)]
{F6}{Space}{Enter}


[=:End:Add_Death_cite_Probate_FMP]

Add_Fact_Education

[=:Start:Add_Fact_Education]
# Add Education Fact

Execute code at fastest speed
{fast}
# Add EDUCATION fact.
{Ctrl+I}Education{Enter}{Tab}

# Education school
# ...Findmypast
[School name]
# ...Ancestry
[School]
{Tab}

# Admission year
# ...Findmypast & Ancestry
[==:Admission date][Admission date]

# Age
# ...Findmypast

# ...Ancestry
[Age]
{Tab}

# Place
# ...Findmypast
[Town]<, [County]><, [Country]>
# ...Ancestry
{Tab}

# Address
{Tab}

# Note
# ...Findmypast
# ...Ancestry
[Notes]
{Tab}

# Add source citation
# [lib.School_Admission]

[=:End:Add_Fact_Education]

Add_FH_Citation

[=:Start:Add_FH_Citation]

#
# Title: Add citation template typically from custom FH7 Custom Sources.
#
# Author: Alan
# Version Date           Description Change
# 31/05/2023 08:15       Initial creation
#
# template usage parameters : ie 
# usage : [lib.Add_FH_Citation:citation template name]
#  {1} is the citation template. ie GRO Birth, SCI Death, PR Baptism, etc


#Execute code at this speed
{fast}

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

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

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

# Select Citation Template.
{Ctrl+D}{1}{F6}{Space}{Enter}

[=:End:Add_FH_Citation]

Add_FH_Fact

# Add_FH_Fact
# Modified version of Paul Tanner-Tremaine
#
[=:start:Add_FH_Fact]
# Generic add a fact.  Starting focus point on Individuals Main Property page in Facts tab.
# 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
{fast}

# 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}]{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
<[?:{1}!=Burial]{Tab}>

# Place
[{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

[=:end:Add_FH_Fact]

Add_Probate_ANC

[=:Start:Add_Probate_ANC]
#
# Created: 12/03/2023
# Author: Alan
# Version Date           Description Change
# 12/03/2023             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.


#Execute code at fastest speed
{slow}
# Add Probate fact.
{Ctrl+I}Probate{Enter}{Tab}


# Probate Date
[Probate Date]{Tab}


# Validate Probate Registry
[lib.ValidatePlacePTT:Probate Registry]
#<[?:Probate Registry:splitcount:,>2]|[=:Probate Registry has incorrect number of address lines - Click cancel]>


# Probate Registry
[Probate Registry]{Enter}

# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# Cursor/focus must be in the Facts tab within the Property box of FH.

# 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
[Name]{Tab}
# Condition - bachelor, spinster, married, widow, widower
[Condition]{Tab}

# Maiden name
[Maiden name]{Tab}

# Probate Date
[Probate Date]{Tab}

# Probate Registry
[Probate Registry]{Tab}

# Death Date - this could be incorrect and should possibly just record what is shown
<[?:Death Date:dateYear]|[=:yr:[Probate Date:dateYear]]>
[Death Date]< [?:Death Date:dateYear]|[yr]>{Tab}


# Validate Death Place
[lib.ValidatePlacePTT:Death Place]
#<[?:Death Place:splitcount:,>2]|[=:Death Place has incorrect number of address lines - Click cancel]>


# Death Place
[Death Place]
{Tab}



# Residence Place
#[==:Residence place at death]
[Residence place at death]{Tab}


# Validate Residence place at death
[lib.ValidatePlacePTT:Residence place at death]
#<[?:Residence place at death:splitcount:,>2]|[=:Residence place at death has incorrect number of address lines - Click cancel]>

# URL
[Page.URL]{Tab}

# Collection ID
[Record ID:split:\::1]{Tab}

# Collection Name
[Source.Title]{Tab}

# Repository
[Page.ServiceName]{Tab}

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

# Research Place
[lib.SetResearchPlace]

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

{Slow}
# Move to Media tab.
{Ctrl+Tab}
# Select AutoText - removed comment from CTRL+I on 25/04/2023
#{Ctrl+I}{Down}{Enter}Custom{Enter}England and Wales Probate{Enter}{Enter}
{Ctrl+Tab}

# Notes
{Ctrl+Tab}

# 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:Deaths]

# Media
# Insert from File
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]Probate, [Probate Date:dateYear], [Name:nameSurname] [Name:nameGiven].jpg{Enter}

# Add file to FH folder
Deaths
{Enter}

[=:End:Add_Probate_ANC]

Add_Probate_FMP

[=:Start:Add_Probate_FMP]
#
# 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.
#
# Collection : England & Wales Government Probate Death Index 1858-2019
#
# Parameters : [==:Residence place at death]
#
#Execute code at fastest speed
{slow}
# Add Probate fact.
{Ctrl+I}Probate{Enter}{Tab}



# Probate Date
[Probate Date]{Tab}

# Probate Registry - in FMP [County] and [Country] are for death and/or residence place
[Registry]{Enter}

# Validate Registry
#[lib.ValidatePlace:Registry]
<[?:Registry:splitcount:,>2]|[=:Registry has incorrect number of address lines - Click cancel]>


# From here downwards is the source citation
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

# Cursor/focus must be in the Facts tab within the Property box of FH.

# 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
[First name(s)] [Last name]{Tab}
# Condition - bachelor, spinster, married, widow, widower
[Condition]{Tab}

# Maiden name
[Maiden name]{Tab}

# Probate Date
[Probate Date]{Tab}

# Probate Registry - in FMP [County] and [Country] are for death and/or residence place
[Registry]{Tab}

# Death Date
[Death Date]{Tab}

# Death Place
<[?:Death Place]|[==:Death Place]>
[Death Place]
# Validate Death Place
#[lib.ValidatePlace:Death Place]
<[?:Death Place:splitcount:,>2]|[=:Death Place has incorrect number of address lines - Click cancel]>
{Tab}



# Residence Place
[Residence town], [County], [Country]{Tab}

# Validate Residence Place
[=:_ResidencePlace:<[Residence town]<, [County]> <, [Country]>>]
[lib.ValidatePlace:_ResidencePlace]
#<[?:_ResidencePlace:splitcount:,>2]|[=:_Residence place at death has incorrect number of address lines - Click cancel]>

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

# Collection ID
{Tab}

# Collection Name
[Record set]{Tab}

# Repository
[Page.ServiceName]{Tab}

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

# Research Place
[lib.SetResearchPlace]

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


# Move to Media tab.
{Ctrl+Tab}
# Select AutoText
#{Ctrl+I}{Down}{Enter}{Enter}
{Ctrl+Tab}

# Notes
{Ctrl+Tab}

# 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:Deaths]

#Execute code at this speed
{slow}

# Media
# Insert from File
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]Probate, [Probate year], [Last name] [First name(s)].jpg{Enter}

# Add file to FH folder
Deaths
{Enter}

[=:Start:Add_Probate_FMP]

Add_Residence_cite_Probate_ANC

[=:Start:Add_Residence_cite_Probate_ANC]
#
# Created: 12/03/2023
# Author: Alan
# Version Date         Description Change
# ----------           -----------------------------------------------------
# 12/03/2023  xx:xx    First attempt
# 


#Execute code at fastest speed
{slow}
# Add Death fact.
{Ctrl+I}Residence{Enter}{Tab}



# Residence date = Death Date
# The following line will highlight the death date in control panel if
# the death date is missing the year.
#<[%:Death Date:dateYear]|[Death Date]>
# Sets "d3" to Death Date year so it can be checked whether its present
[=:d3:[Death Date:dateYear]]
# If death date has no year then it sets "yr" to the year of the probate
<[?:Death Date:dateYear]|[=:yr:[Probate Date:dateYear]]>
[Death Date]< [?:Death Date:dateYear]|[yr]>
{Tab}
# Age
{Tab}

# Residence Place = Death Place
[Residence place at death]{Enter}


# Validate Residence Place
[lib.ValidatePlace:Residence place at death]
#<[?:Residence place at death:splitcount:,>2]|[=:Residence place at death has incorrect number of address lines - Click cancel]>


# 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}
Probate, [Probate Date:dateYear], [Name:nameSurname] [Name:nameGiven] 
{F6}{Space}{Enter}

[=:End:Add_Residence_cite_Probate_ANC]

Amend_GRO_Birth

[=:Start:Amend_GRO_Birth]

#
# Author: Alan
# Version Date           Description 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.
#

# Create field "Assessment" and set it to "S"
[=:Assessment_U_Q_S_P:S]

# 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:Births]

#Execute code at this speed
{slow}

# Starting point is the birth fact in the Facts tab in the Property box.

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

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

# Select Source Template "GRO Birth".
{Ctrl+D}GRO Birth{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "GRO Birth".

# Child's surname
[Surname]{Tab}

# Child's given name(s)
[GivenName]{Tab}

# Mother's maiden name
[Mother's Maiden Surname]{Tab}

# Registration Quarter
<[?:Registration Quarter=Jan-Feb-Mar]Jan|[?:Registration Quarter=Apr-May-Jun]Apr|[?:Registration Quarter=Jul-Aug-Sep]Jul|[?:Registration Quarter=Oct-Nov-Dec]Oct>
<[?:Registration Quarter=Q1]Jan|[?:Registration Quarter=Q2]Apr|[?:Registration Quarter=Q3]Jul|[?:Registration Quarter=Q4]Oct>
{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
#[=:rd1:[Registration Date:split: :1]]
#[=:rd2:[Registration Date:split: :2]]
##<[?:rd1/Q/]|[=:rd2:[rd1]]>
#[rd2]
[Registration Year]
{Tab}

# Registration District
[District]

# Validate Registration District
[lib.ValidatePlace:District]
{Tab}


# Volume
<[Volume]|[Volume Number]>{Tab}

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

# District Code
{Tab}

# Entry Number
{Tab}

# Collection
#[Source.Title]{Tab}

# 01/04/2023 13:40
# Repository - 1st line selects drop down box & 2nd selects the repository
{Space}{Down}{Enter}
{Ctrl+D}GRO{F6}{Space}{Enter}{Tab}

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

# Research Place
[lib.SetResearchPlace]

# Data Quality Assessment --> S = Secondary
#[=:Assessment_U_Q_S_P:S]]
P{Down*4}
{Tab}


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

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

# Windows Folder where media is opened from.
[FolderPath]GRO Birth, [Registration Year], [Surname] [GivenName]< - mother [Mother's Maiden Surname:uppercase]>.jpg{Enter}

# Add
Births
{Enter}

[=:End:Amend_GRO_Birth]

Amend_GRO_Death

[=:Start:Amend_GRO_Death]

#
# Author: Alan
# Version Date           Description 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.
#        


# Create field "Assessment" and set it to "S"
[=:Assessment_U_Q_S_P:S]
# 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:Deaths]

#Execute code at this speed
{slow}

# Starting point is the death fact in the Facts tab in the Property box.

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

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

# Select Source Template "GRO Death".
{Ctrl+D}GRO Death{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "GRO Death".

# Child's surname
[Surname]{Tab}

# Child's given name(s)
[GivenName]{Tab}

# Age at Death
[Age at Death]{Tab}

# Registration Quarter
<[?:Registration Quarter=Jan-Feb-Mar]Jan|[?:Registration Quarter=Apr-May-Jun]Apr|[?:Registration Quarter=Jul-Aug-Sep]Jul|[?:Registration Quarter=Oct-Nov-Dec]Oct>
<[?:Registration Quarter=Q1]Jan|[?:Registration Quarter=Q2]Apr|[?:Registration Quarter=Q3]Jul|[?:Registration Quarter=Q4]Oct>
{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
#[=:rd1:[Registration Date:split: :1]]
#[=:rd2:[Registration Date:split: :2]]
##<[?:rd1/Q/]|[=:rd2:[rd1]]>
#[rd2]
[Registration Year]
{Tab}

# Registration District
[District]

# Validate Registration District
[lib.ValidatePlace:District]
{Tab}

# Volume
<[Volume]|[Volume Number]>{Tab}

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

# District Code
{Tab}

# Entry Number
{Tab}

# Collection
#[Source.Title]{Tab}

# 01/04/2023 13:40
# Repository - 1st line selects drop down box & 2nd selects the repository
{Space}{Down}{Enter}
{Ctrl+D}GRO{F6}{Space}{Enter}{Tab}

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

# Research Place
[lib.SetResearchPlace]


# Data Quality Assessment --> S = Secondary
#[=:Assessment_U_Q_S_P:S]]
P{Down*4}
{Tab}


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

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

# Windows Folder where media is opened from.
[FolderPath]GRO Death, [Registration Year], [Surname] [GivenName]< - age [Age at Death]>.jpg{Enter}

# Add to FH folder
Deaths
{Enter}

[=:End:Amend_GRO_Death]

Amend_SCI_Birth_ANC

[=:Start:Amend_SCI_Birth_ANC]

#
# Created: 08/03/2023
# Author: Alan
# Version    Date        Description Change
# 08/03/2023 10:00       First attempt
# 08/03/2023 12:00       Changed starting point to Facts tab
# 01/04/2023 11:50       Added mother's maiden name to when inserting media 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.
#
#

# 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:Births]


#Execute code at this speed
{slow}

# Move focus from the focus window to the first tab (Main Tab) of the Property Box.
#{Alt+Enter}

# Move focus to the next tab (Facts Tab) assuming focus is on first (Main) tab.
#{Ctrl+Tab}

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

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

# Select Source Template "SCI Birth".
{Ctrl+D}SCI Birth{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Birth".

# Child's surname
[Name:nameSurname]{Tab}

# Child's given name(s)
[Name:nameGiven]{Tab}

# Mother's maiden name
[Mother][Mother's Maiden Name]{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
[=:rd1:[Registration Date:split: :1]]
[=:rd2:[Registration Date:split: :2]]
<[?:rd1/Q/]|[=:rd2:[rd1]]>
[rd2]
{Tab}

# Get first month of Registration Quarter
[=:m1:[Quarter of the Year:append:1900:dateQuarter:Sss]]
<[?:m1]|[=:m1:[Registration Date:dateQuarter:Sss]]>
[m1]
{Tab}

# Registration District
[=:Reg Place:[Registration District:append:, :append:[Inferred County]:append:, England]]
<[?:Registration District]|[=:Reg Place:[Registration Place]]>
[Reg Place]
# Validate Reg Place
[lib.ValidatePlace:Reg Place]
{Tab}


# Volume
<[Volume]|[Volume Number]>{Tab}

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

# Collection
[Source.Title]{Tab}

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

# URL
[Page.URL]{Tab}

# Ancestry Collection ID
[Record Id:split:\::1]{Tab}

# Ancestry Record No.
[Record Id:split:\::3]{Tab}

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

# Research Place
[lib.SetResearchPlace]

# 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
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]SCI Birth, [rd2], [Name:nameSurname] [Name:nameGiven].jpg{Enter}
#< - mother [Mother's Maiden Name:uppercase]>

# Add to FH folder
Births
{Enter}


[=:End:Amend_SCI_Birth_ANC]

Amend_SCI_Birth_FMP

[=:Start:Amend_SCI_Birth_FMP]

#
# Created: 08/03/2023
# Author: Alan
# Version Date           Description Change
# 08/03/2023 11:00       First attempt
# 08/03/2023 12:00       Changed starting point to Facts tab
# 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.
#

# 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:Births]


#Execute code at this speed
{slow}

# Move focus from the focus window to the first tab (Main Tab) of the Property Box.
#{Alt+Enter}

# Move focus to the next tab (Facts Tab) assuming focus is on first (Main) tab.
#{Ctrl+Tab}

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

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

# Select Source Template "SCI Birth".
{Ctrl+D}SCI Birth{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Birth".

# Child's surname
[Last name]{Tab}

# Child's given name(s)
[First name(s)]{Tab}

# Mother's maiden name
[Mother's maiden name]{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
#[=:rd1:[Birth Date:split: :1]]
#[=:rd2:[Birth Date:split: :2]]
#<[?:rd1/Q/]|[=:rd2:[rd1]]>
#[rd2]
[Birth year]
{Tab}

# Get first month of Registration Quarter
#[=:m1:[Birth Date:dateQuarter:Sss]]
#[m1]
<[?:Birth quarter=1]Jan|[?:Birth quarter=2]Apr|[?:Birth quarter=3]Jul|[?:Birth quarter=4]Oct>
{Tab}

# Registration District
[District]<, [County]><, [Country]>

# Validate Registration District
[=:Reg District:[District]<, [County]><, [Country]>]
[lib.ValidatePlace:Reg District]
{Tab}

# Volume
[Volume]{Tab}

# Page
[Page]{Tab}

# Collection
[Record set]{Tab}

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

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

# Findmypast Record ID
[Record ID]{Tab}

# Ancestry Record No.
{Tab}

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

# Research Place
[lib.SetResearchPlace]

# 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
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]SCI Birth, [Birth year], [Last name] [First name(s)].jpg{Enter}

# Add to FH folder
Births
{Enter}

[=:End:Amend_SCI_Birth_FMP]

Amend_SCI_Birth_FS

[=:Start:Amend_SCI_Birth_FS]
# NOT LIVE OR WORKING YET
#
# Author: Alan
# Version Date           Description Change
# 29/03/2023             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.
# 


#
# 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:Births]


#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 "SCI Birth".
{Ctrl+D}SCI Birth{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Birth".

# Child's surname
[Name:nameSurname]{Tab}

# Child's given name(s)
[Name:nameGiven]{Tab}

# Mother's maiden name
[Mother][Mother's Maiden Name]{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
[Registration Quarter and Year:dateYear]{Tab}

# Get first month of Registration Quarter
[Registration Quarter and Year:dateQuarter:Sss]{Tab}

# Registration District
[Registration District]{Tab}

# Validate Place
[lib.ValidatePlace:Registration District]

# Volume
[Volume Number]{Tab}

# Page
[Page Number]{Tab}

# Collection
#[Source.Title]
[Collection]{Tab}

# Repository
[Page.ServiceName]{Tab}
# URL
[Page.URL]{Tab}
# Ancestry Collection ID
[Record Id:split:\::1]{Tab}
# Ancestry Record No.
[Record Id:split:\::3]{Tab}
# Research Date
[Page.Access Date]{Tab}
# Research Place
[lib.SetResearchPlace]
{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
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]SCI Birth, [Registration Quarter and Year:dateYear], [Name:nameSurname] [Name:nameGiven].jpg{Enter}

# Add file to FH folder
Births
{Enter}

[=:End:Amend_SCI_Birth_FS]

Amend_SCI_Death_ANC

[=:Start:Amend_SCI_Death_ANC]

#
# Author: Alan
# Version Date           Description Change
# 16/03/2023             First attempt
# 23/03/2023 03:00       Issues found...
#                          1) Only handles post 1915 deaths
#                          2) Age is not recorded even though available
#                             after 1869.
#                        NO SOLUTION FOUND YET.
# 24/03/2023 11:35       Issue that post 1935 death introduced the moth into the registration date
#                        so replaced existing SPLIT code with "dateYear" function--> Fixed
# 01/04/2023 13:40       Fixed issue of Repository type filed not being selected
# 15/04/2023 09:30       Fix for 23/03/2023
#                         a) Added extra {Tab} for "Cause of death"
#                         b) Changed "Registration Place" to "Death Registration Place" for pre 1915
# 19/04/2023 18:00       Added "< - age [Age]>" to the media file
# 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.
#



# 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:Deaths]


#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 "SCI Death".
{Ctrl+D}SCI Death{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Death".

# Child's surname
[Name:nameSurname]{Tab}
# Child's given name(s)
[Name:nameGiven]{Tab}

# Age At Death
[Death Age][Age]{Tab}

# Birth Date (introduced in 2nd Qtr of 1969)
[Birth Date]{Tab}

# Registration Year - it can appear as yyyy or Qn yyyy
# Get registration year and put it into assignment variable "rd2"...
#[=:rd1:[Registration Date:split: :1]]
#[=:rd2:[Registration Date:split: :2]]
#<[?:rd1/Q/]|[=:rd2:[rd1]]>
#[rd2]
[Registration Date:dateYear]
{Tab}

# Get first month of Registration Quarter
[=:m1:[Quarter of the Year:append:1900:dateQuarter:Sss]]
<[?:m1]|[=:m1:[Registration Date:dateQuarter:Sss]]>
[m1]
{Tab}

# Registration District
[=:Reg Place:[Registration District:append:, :append:[Inferred County]:append:, England]]
<[?:Registration District]|[=:Reg Place:[Death Registration Place]]>
[Reg Place]
{Tab}

# Validate Place
[lib.ValidatePlace:Reg Place]

# Volume
[Volume][Volume Number]{Tab}

# Page
[Page][Page Number]{Tab}

# Collection
[Source.Title]{Tab}

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

# URL
[Page.URL]{Tab}

# Ancestry Collection ID
[Record Id:split:\::1]{Tab}

# Ancestry Record No.
[Record Id:split:\::3]{Tab}

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

# Research Place
[lib.SetResearchPlace]

# 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
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.

#<[=:AgeAtDeath]|[Death Age]>
#<[=:AgeAtDeath]|[Age]>


#<[?:Death Age][=:AgeAtDeath:[Death Age]]|[=:AgeAtDeath:[Age]]> 

<[?:Death Age>-1][=:AgeAtDeath:[Death Age]]>
<[?:Age>-1][=:AgeAtDeath:[Age]]>


[FolderPath]SCI Death, [Registration Date:dateYear], [Name:nameSurname] [Name:nameGiven].jpg{Enter}
# < - age [AgeAtDeath]>

# Add to FH folder
Deaths
{Enter}


[=:End:Amend_SCI_Death_ANC]

Amend_SCI_Death_FMP

[=:Start:Amend_SCI_Death_FMP]

#
# Author: Alan
# Version Date           Description Change
# 22/03/2023 13:00       First attempt
# 01/04/2023 13:40       Fixed issue of Repository type filed not being selected
# 17/04/2023 20:45       Fixed to remove extra spaces in Reg District.
# 19/04/2023 18:00       Added "< - age [Age]>" to the media file
# 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.
# 



# 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:Deaths]


#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 "SCI Death".
{Ctrl+D}SCI Death{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Death".

# Child's surname
[Last name]{Tab}

# Child's given name(s)
[First name(s)]{Tab}

# Age At Death
[Age]{Tab}

# Birth Date (introduced in 2nd Qtr of 1969)
[Birth day] <<[?:Birth month=1]Jan><[?:Birth month=2]Feb><[?:Birth month=3]Mar><[?:Birth month=4]Apr><[?:Birth month=5]May><[?:Birth month=6]Jun><[?:Birth month=7]Jul><[?:Birth month=8]Aug><[?:Birth month=9]Sep><[?:Birth month=10]Oct><[?:Birth month=11]Nov><[?:Birth month=12]Dec>> [Birth year]
{Tab}

# Death Year
[Death year]{Tab}

# Get first month of Death Quarter
<<[?:Death quarter=1]Jan><[?:Death quarter=2]Apr><[?:Death quarter=3]Jul><[?:Death quarter=4]Dec>>
{Tab}

# Registration District
[District]<, [County]><, [Country]>
{Tab}

# Validate Reg Place
[=:Reg District:[District]<, [County]><, [Country]>]
[lib.ValidatePlace:Reg District]

# Volume
<[Volume]|[Volume Number]>{Tab}

# Page
[Page][Page Number]{Tab}

# Collection
[Record set]{Tab}

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


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

# Findmypast Collection ID
[Record ID]{Tab}

# Findmypast has no Record No.
{Tab}

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

# Research Place
[lib.SetResearchPlace]

# 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
{Ctrl+I}{Down}{Enter}{Enter}

# Windows Folder where media is opened from.
[FolderPath]SCI Death, [Death year], [Last name] [First name(s)].jpg{Enter}
# < - age [Age]>

# Add file to FH folder
Deaths
{Enter}

[=:End:Amend_SCI_Death_FMP]

Amend_SCI_Marriage_ANC

[=:Start:Amend_SCI_Marriage_ANC]
#
# Author: Alan
# Version Date           Description 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.
#



# Create media folder name
#     Folder Path format = C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\
#Execute code at this speed
{fast}
[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 "SCI Marriage".
{Ctrl+D}SCI Marriage{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Following conditions added 7/7/2023
<[?:Records on Page]
     <
       [?:Records on Page:splitCount:,=1][=:Spouse:[Records on Page]]|[=:Records on Page has not been updated - click CANCEL]
     >
|
[?:Other Records]
     <
       [?:Other Records:splitCount:,=1][=:Spouse:[Other Records]]|[=:Other Records has not been updated - click CANCEL]
     >
>


# Fill in source template "SCI Marriage".
# Early SCI Marriages spouse is not known...
<[?:Spouse][=:Principal2 Name:[Spouse]]|[==:Principal2 Name]]>

[lib.GetGender: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}


# Registration Year
[Registration Date:dateYear]{Tab}

# Get 1st month of Reg Qtr which appears as JAN-FEB-MAR, APR-MAY-JUN, JUL-AUG-SEP, OCT-NOV-DEC
[=:m1:[Registration Quarter:append:1900:dateQuarter:Sss]]
<[?:m1]|[=:m1:[Registration Date:dateQuarter:Sss]]>
c. [m1]
{Tab}

# Registration District
[=:Reg Place:[Registration District:append:, :append:[Inferred County]:append:, England]]
<[?:Registration District]|[=:Reg Place:[Registration Place]]>
[Reg Place]
# <[?:Country]|England>
{Tab}

# Validate Reg Place
[lib.ValidatePlace:Reg Place]


# Volume
[Volume][Volume Number]{Tab}

# Page
[Page][Page Number]{Tab}

# Collection
[Source.Title]{Tab}

# 01/04/2023 13:40
# 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}

# Ancestry Collection ID
#[Record Id:split:\::1]{Tab}
# Ancestry Record No.
#[Record Id:split:\::3]{Tab}

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

# Research Place
[lib.SetResearchPlace]

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


# 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]SCI Marriage, [Registration 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]SCI Marriage, [Registration Date:dateYear], [WifesName:nameSurname] [WifesName:nameGiven] & [HusbandsName:nameSurname] [HusbandsName:nameGiven].jpg{Enter}


# Add file to FH folder
Marriages
{Enter}


[=:End:Amend_SCI_Marriage_ANC]

Amend_SCI_Marriage_FMP

[=:Start:Amend_SCI_Marriage_FMP]
#
# Author: Alan
# Version Date           Description Change
# 20/03/2023 21:00       First attempt
# 01/04/2023 13:40       Fixed issue of Repository type filed not being selected
# 17/04/2023 11:15       When creating District additional spaces wre being added before comma.
# 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.
# 


# Create media folder name
#     Folder Path format = C:\Users\alan\OneDrive\Genealogy\Genealogy\Medows-Lambert\Pictures\
#Execute code at this speed
{fast}
[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 "SCI Marriage".
{Ctrl+D}SCI Marriage{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template "SCI Marriage".

# Principal 1 refers to the individual being displayed on the marriage record.
# Gender is the gender of Principal 1.
<[?:MarriageFinder™][=:Principal2 Name:[MarriageFinder™]]|[==:Principal2 Name]]>

[lib.GetGender:FullName]
#[==:Gender]
# 
<[?:Gender=m][=:WifesName:[Principal2 Name]]>
<[?:Gender=f][=:HusbandsName:[Principal2 Name]]>
<[?:Gender=m][=:HusbandsName:[FullName]]>
<[?:Gender=f][=:WifesName:[FullName]]>


# 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
[Marriage year]{Tab}

# Get 1st month of Reg Qtr which appears as JAN-FEB-MAR, APR-MAY-JUN, JUL-AUG-SEP, OCT-NOV-DEC
c. <[?:Marriage quarter=1]Jan|[?:Marriage quarter=2]Apr|[?:Marriage quarter=3]Jul|[?:Marriage quarter=4]Oct>
{Tab}

# Registration District
#[=:Reg Place:[District:append:, :append:[County]:append:, :append:England]]
#[Reg Place]
[District]<, [County]><, [Country]>
{Tab}

# Validate Reg Place
[=:Reg Place:[District]<, [County]><, [Country]>]
[lib.ValidatePlace:Reg Place]


# Volume
[Volume][Volume Number]{Tab}

# Page
[Page][Page number]{Tab}

# Collection
[Record set]{Tab}

# 01/04/2023 13:40
# 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
[lib.SetResearchPlace]


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


# 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]SCI Marriage, [Marriage year], [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]SCI Marriage, [Marriage year], [WifesName:nameSurname] [WifesName:nameGiven] & [HusbandsName:nameSurname] [HusbandsName:nameGiven].jpg{Enter}

# Add file to FH folder
Marriages
{Enter}

[=:End:Amend_SCI_Marriage_FMP]

DeleteMe_AAD

[=:Start:DeleteMe_AAD]
<[?:AgeAtDeath]|[Age]>
<[?:AgeAtDeath]|[Death Age]>
[AgeAtDeath]
[=:End:DeleteMe_AAD]

DeleteMe_AAD2

[=:Start:DeleteMe_AAD2]
# Windows Folder where media is opened from.
[lib.SetWindowsUser]
[lib.SetFolderPath]
<[?:AgeAtDeath]|[Death Age]>
<[?:AgeAtDeath]|[Age]>

[FolderPath]SCI Death, [Registration Date:dateYear], [Name:nameSurname] [Name:nameGiven]< - age [AgeAtDeath]>.jpg{Enter}

# Add to FH folder
Deaths
{Enter}


[=:End:DeleteMe_AAD2]

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]

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
# Version Date           Description 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
#
# template usage parameters : ie 
# usage : [lib.Find_AS_ID:fact type]
#  {1} is the Ancestral Sources Editor template.


# Problem with Census as AS does not select type, region, year or date so need "dirty" fix.
# AS 7.7.9 28Jul2023
#[lib.ValidateInputField:Census Type and year selected]
# <[?:Census Type and year selected!=y][=:Selected Census Type, Region, Year and Date - Press CANCEL]>

# Execution speed
{fast}

[==:z_FactType:{1}]


# Temporary field to capture paramter
[=:Parameter1:{1}]
# Select Editor - Down ? 
# - Census(0), Birth(1), Baptism(2), Marriage(3), Death(4), Burial(5)

# 1 Start------------------------------------------------------------------------------------
<
[?:Parameter1=1939 Register]
# Following is a dirty fix by finding "Burial Editor" and then finding "Census Editor"
{Alt+V}{Down*5}{Enter}
{Alt+V}{Enter}
# Select Census Type
[lib.SetFieldName:1939 Register]{Ctrl+T}{Shift+Tab*3}E{Down}

# 1 Else-------------------------------------------------------------------------------------
|
[?:Parameter1=Census]
# Following is a dirty fix by finding "Burial Editor" and then finding "Census Editor"
{Alt+V}{Down*5}{Enter}
{Alt+V}{Enter}
# Select Census Type
[lib.SetFieldName:Census]{Ctrl+T}{Shift+Tab*3}C{tab}e{tab}
# 2 Start
<
[?:z_FactYear=1841]{down}|
[?:z_FactYear=1851]{down*2}|
[?:z_FactYear=1861]{down*3}|
[?:z_FactYear=1871]{down*4}|
[?:z_FactYear=1881]{down*5}|
[?:z_FactYear=1891]{down*6}|
[?:z_FactYear=1901]{down*7}|
[?:z_FactYear=1911]{down*8}|
[?:z_FactYear=1921]{down*9}
# 2 End
>
# 1 Else-----------------------------------------------------------------------------
|
[?:Parameter1=Electoral Register]{Alt+V}{Enter}
# Select Census Type
[lib.SetFieldName:Electoral Register]{Ctrl+T}{Shift+Tab*3}E{tab*2}
# 1832-1917; 1918-1927; 1928-1944; 1945-; 
<
[?:z_FactYear>=1945]1{Shift+Tab}1{Shift+Tab}1{Shift+Tab}1|
[?:z_FactYear>=1928]1{Shift+Tab}1{Shift+Tab}1|
[?:z_FactYear>=1918]1{Shift+Tab}1|
[?:z_FactYear>=1832]1
>
[z_FactYear]
[=:z_FactType:Electoral Register]
|
[?:Parameter1=Birth]{Alt+V}{Down}{Enter}
|
[?:Parameter1=Baptism]{Alt+V}{Down*2}{Enter}
|
[?:Parameter1=Marriage]{Alt+V}{Down*3}{Enter}
|
[?:Parameter1=Death]{Alt+V}{Down*4}{Enter}
|
[?:Parameter1=Burial]{Alt+V}{Down*5}{Enter}
|
[=:Invalid Ancestral Sources Editor type - click CANCEL]
# 1 End
>


# Temporary variable to use Census Head of Household or Individual ID from other fact types.
<[?:HoH ID][=:z_ID:[HoH ID]]|[=:z_ID:[Individual ID]]>

# Validate ID No
[lib.ValidateInputField:z_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}

[z_ID]

<
[?: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*4}{Enter}
|
[?:Parameter1=Marriage]{tab*3}{Enter}{space}{tab}{enter}{Ctrl+2}{Ctrl+1}
>


[=:End:Find_AS_ID]

Fix_AS_Age

[=:Start:Fix_AS_Age]
# Author: Alan
# Created: 10 Ju 2023
#
# 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".
#
# Usage: [lib.Fix_AS_Age:Age Field]
# {1} - Age field to be converted
#

<
[?:{1}!=f]
#[{1}:replace:(\d):{$1}]
[{1}:replace:(\d):{$1}::replace:0:NUMPAD0]
>


[=:End:Fix_AS_Age]

FTP_Format_Date

[=:Start:FTP_Format_Date]
#
# Author: Alan
# Created: 14 Jun 2023
#
# Description: This routine formats the supplied date (currently used for Ancestry import) which
#              can be imported to Family Historian.
#              Typically a date in Ancestry appears as below...
#                   ABT. 14 JUNE 2023
#                   ABT. DECEMBER 2023
#                   ABT. 2023
#              Proposed output should be...
#                   c. 14 Jun 2023
#                   c. Dec 2023
#                   c. 2023
#
# Usage: [lib.FTP_Format_Date:Fact Type]
#
# Parameters:
# {1} Fact ie. Birth, Death
#
#Execution speed
#{fast}
<
[?:{1} Date/^ABT\./][=:{1} Date:replace:^Abt\.::gi:date:c. dd Mmm yyy:c. Mmm yyy:c. yyy]|
[?:{1} Date/^ABT/][=:{1} Date:replace:^Abt::gi:date:c. dd Mmm yyy:c. MMM yyy:c. yyy]
>
[=:End:FTP_Format_Date]

Get_AutoText

[=:Start:Get_AutoText]
# Author: Alan
# Created: 2023
# Usage: [lib.Get_AutoText]
# Parameters: none:
# Input Variables:
#                  z_FactType

{target=Ancestral Sources}

# Alan has an extra AutoText up in AS so need to go down 3 rather than 2
[SetWindowsUser]

# Start Autotext
{Ctrl+Shift+u}{250}
# Select Autotext dependent upon fact type - Baptism, Death, Census, etc
<[?:z_FactType=Census]
<
[?:WindowsUser=Alan]{Down*3}{Enter}
|
{Down*2}{Enter}
>
|
{Down*9}{Enter}
>

# NB. An extra {Enter} may be needed if AutoText Window has been filled in previously 
# in this session.
[=:End:Get_AutoText]

Get_GRO_District_County

[=:Start:Get_GRO_District_County]
#
# author : Inspired by Paul Tanner-Tremaine
#
# Usage: [lib.Get_GRO_District_County]
#
# 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!
<
#A
<[?:District=Alcester Union In The Counties Of Warwick And Worc]Alcester Union RegDist, Warwick And Worcestershire, England>|
<[?:District=Altrincham Union]Altrincham RegDist, Cheshire, England>|
<[?:District=Altrincham]Altrincham RegDist, Cheshire, England>|
<[?:District=Ashton And Oldham]Ashton And Oldham RegDist, Lancashire, England>|
<[?:District=Ashton Under Lyne]Ashton Under Lyne RegDist, Lancashire and Cheshire, England>|
<[?:District=Ashtonunderlyne]Ashton Under Lyne RegDist, Lancashire and Cheshire, England>|
<[?:District=Aston Union]Aston RegDist, Warwickshire, England>|
<[?:District=Aston]Aston RegDist, Warwickshire, England>|
<[?:District=Atherstone]Atherstone RegDist, Warwickshire and Leicestershire, England>|
<[?:District=Axbridge Union]Axbridge RegDist, Somerset, England>|
<[?:District=Axbridge]Axbridge RegDist, Somerset, England>|

#B
<[?:District=Barnsley]Barnsley RegDist, Yorkshire, England>|
<[?:District=Barnstaple Union]Barnstaple RegDist, Devonshire, England>|
<[?:District=Barnstaple]Barnstaple RegDist, Devonshire, England>|
<[?:District=Barton Upon Irwell]Barton Upon Irwell RegDist, Lancashire, England>|
<[?:District=Barton]Barton Upon Irwell RegDist, Lancashire, England>|
<[?:District=Bath]Bath RegDist, Somerset, England>|
<[?:District=Belper]Belper RegDist, Derbyshire, England>|
<[?:District=Bethnal Green]Bethnal Green RegDist, Middlesex, England>|
<[?:District=Bideford]Bideford RegDist, Devonshire, England>|
<[?:District=Birmingham]Birmingham RegDist, Warwickshire, England>|
<[?:District=Blackburn]Blackburn RegDist, Lancashire, England>|
<[?:District=Blean]Blean RegDist, Kent, England>|
<[?:District=Bolton Union, County Of Lancaster]Bolton RegDist, Lancashire, England>|
<[?:District=Bolton Union]Bolton Union RegDist, Lancashire, England>|
<[?:District=Bolton]Bolton RegDist, Lancashire, England>|
<[?:District=Bow Common]Bow Common RegDist, Middlesex, England>|
<[?:District=Bradford Union West Riding Of Yorkshire]Bradford RegDist, West Riding Of Yorkshire, England>|
<[?:District=Bramley Union]Bramley RegDist, West Riding of Yorkshire, England>|
<[?:District=Bramley]Bramley RegDist, West Riding of Yorkshire, England>|
<[?:District=Brentford]Brentford RegDist, Middlesex, England>|
<[?:District=Bridgnorth]Bridgnorth RegDist, Shropshire, England>|
<[?:District=Burnley]Burnley RegDist, Lancashire and West Riding of Yorkshire, England>| 
<[?:District=Burton on Trent]Burton on Trent RegDist, Staffordshire, England>|
<[?:District=Bury Lancashire]Bury RegDist, Lancashire, England>|
<[?:District=Bury Lancaster]Bury RegDist, Lancashire, England>|
<[?:District=Bury Union Lancashire]Bury RegDist, Lancashire, England>|
<[?:District=Bury Union]Bury RegDist, Lancashire, England>|
<[?:District=Bury]Bury RegDist, Lancashire, England>|

#C
<[?:District=Cardiff]Cardiff RegDist, Glamorgan, Wales>|
<[?:District=Carlisle]Carlisle RegDist, Cumberland, England>|
<[?:District=Carnarvon Union]Carnarvon Union RegDist, Anglesey and Carnarvonshire, Wales>|
<[?:District=Chertsey]Cherstey RegDist, Surrey, England>|
<[?:District=Chester Le Street]Chester le Street RegDist, Co Durham, England>|
<[?:District=Chesterfield In The County Of Derby]Chesterfield RegDist, Derbyshire, England>|
<[?:District=Chesterfield Union In The County Of Derby]Chesterfield RegDist, Derbyshire, England>|
<[?:District=Chorley]Chorley RegDist Lancashire, England>|
<[?:District=Chorlton]Chorlton RegDist, Lancashire, England>|
<[?:District=City Of London]City of London RegDist, London, England>|
<[?:District=Clitheroe Union]Clitheroe RegDist, West Riding of Yorkshire, England>|
<[?:District=Clitheroe]Clitheroe RegDist, West Riding of Yorkshire, England>|
<[?:District=Cockermouth]Cockermouth RegDist, Cumberland, England>|
<[?:District=Crediton Union]Crediton RegDist, Devonshire, England>|
<[?:District=Crediton]Crediton RegDist, Devonshire, England>|

#D
<[?:District=Dewsbury]Dewsbury RegDist, West Riding of Yorkshire, England>|
<[?:District=Droitwich Union]Droitwich RegDist, Worcestershire, England>|
<[?:District=Droitwich]Droitwich RegDist, Worcestershire, England>|
<[?:District=Dudley Union]Dudley RegDist, Worcestershire and Staffordshire, England>
<[?:District=Dulverton]Dulverton RegDist, Somerset, England>|
<[?:District=Dury Lancashire]Dury RegDist, Lancashire, England>|

#E
<[?:District=East London Union]East London Union RegDist, Middlesex, England>|
<[?:District=Ecclesfield]Ecclesfield RegDist, West Riding of Yorkshire, England>|
<[?:District=Elham]Elham RegDist, Kent, England>|
<[?:District=Erpingham]Erpingham RegDist, Norfolk, England>|
<[?:District=Evesham]Evesham RegDist, Gloucestershire and Worcestershire, England>|
<[?:District=Exeter]Exeter RegDist, Devon, England>|

#F
<[?:District=Foleshill & Sowe]Foleshill RegDist, Warwickshire, England>|
<[?:District=Foleshill-Sowe]Foleshill RegDist, Warwickshire, England>|
<[?:District=Foleshill]Foleshill RegDist, Warwickshire, England>|

#G
<[?:District=Gateshead]Gateshead RegDist, Co Durham, England>|
<[?:District=Goole Union]Goole Union RegDist, Lincolnshire and West Riding of Yorkshire, England>|

#H
<[?:District=Hackney]Hackney RegDist, London, England>|
<[?:District=Halifax]Halifax RegDist, West Riding of Yorkshire, England>|
<[?:District=Hambledon Union]Hambledon RegDist, Sussex and Surrey, England>|
<[?:District=Haslingden Union]Haslingden RegDist, Lancashire, England>|
<[?:District=Haslingden]Haslingden RegDist, Lancashire, England>|
<[?:District=Hayfield & Glossop]Hayfield and Glossop RegDist, Cheshire and Derbyshire, England>|
<[?:District=Hendon]Hendon RegDist, Middlesex, England>|
<[?:District=Hayfield and Glossop]Hayfield and Glossop RegDist, Cheshire and Derbyshire, England>|
<[?:District=Huddersfield Union]Huddersfield RegDist, West Riding of Yorkshire, England>|
<[?:District=Huddersfield]Huddersfield RegDist, West Riding of Yorkshire, England>|

#I
<[?:District=Ipswich]Ipswich RegDist, Suffolk, England>|

#J

#K
<[?:District=Keighley]Keighley RegDist, West Riding of Yorkshire, England>|
<[?:District=Kendal Union]Kendal RegDist, Lancashire and Westmorland, England>|
<[?:District=Kendal]Kendal RegDist, Lancashire and Westmorland, England>|
<[?:District=Kensington]Kensington RegDist, Middlesex, England>|
<[?:District=Kings Norton Union]Kings Norton RegDist, Warwickshire, England>|
<[?:District=Kings Norton]Kings Norton RegDist, Warwickshire, England>|
<[?:District=Knighton]Knighton RegDist, Shropshire, England>|

#L
<[?:District=Lambeth]Lambeth RegDist, Surrey, England>|
<[?:District=Langport]Langport RegDist, Somersetshire, England>|
<[?:District=Langport district]Langport RegDist, Somersetshire, England>|
<[?:District=Leeds]Leeds RegDist, West Riding of Yorkshire, England>|
<[?:District=Leek Union]Leek Union RegDist, Staffordshire, England>|
<[?:District=Leek]Leek RegDist, Staffordshire, England>|
<[?:District=Leigh Union]Leigh RegDist, Lancashire, England>|
<[?:District=Leigh]Leigh RegDist, Lancashire, England>|
<[?:District=Leominster]Leominster RegDist, Herefordshire, England>|
<[?:District=Liverpool]Liverpool RegDist, Lancashire, England>|

#M
<[?:District=Macclesfield Union]Macclesfield RegDist, Cheshire, England>|
<[?:District=Macclesfield]Macclesfield RegDist, Cheshire, England>|
<[?:District=Manchester]Manchester RegDist, Lancashire, England>|
<[?:District=Mansfield]Mansfield RegDist, Derbyshire and Nottinghamshire, England>|
<[?:District=Martley]Martley RegDist, Worcestershire, England>|
<[?:District=Marylebone]Marylebone RegDist, Middlesex, England>|
<[?:District=Matlock Bakewell And Tideswell]Matlock Bakewell And Tideswell RegDist, Derbyshire, England>|

#N
<[?:District=Nantwich]Nantwich RegDist, Cheshire, England>|
<[?:District=Newport S]Newport RegDist, Shropshire and Staffordshire, England>|
<[?:District=Newport Salop Staffordshire]Newport RegDist, Shropshire and Staffordshire, England>|
<[?:District=Newton Abbot]Newton Abbot RegDist, Devonshire, England>|
<[?:District=Northwich]Northwich RegDist, Cheshire, England>|
<[?:District=Nottingham]Nottingham RegDist, Nottinghamshire, England>|

#O
<[?:District=Of Blackburn in the county of Lancaster]Blackburn RegDist, Lancashire, England>|
<[?:District=Of Crediton Union]Crediton RegDist, Devonshire, England>|
<[?:District=Of Exeter]Exeter RegDist, Devon, England>|
<[?:District=Of Heywood in the County of Lancaster]Heywood RegDist, Lancashire, England>|
<[?:District=Of Mansfield Union]Mansfield RegDist, Derbyshire and Nottinghamshire, England>|
<[?:District=Of The Holborn Union Middlesex]Holborn RegDist, Middlesex, England>|
<[?:District=Of The Holborn Union]Holborn RegDist, Middlesex, England>|
<[?:District=Okehampton]Okehampton RegDist, Devonshire, England>|
<[?:District=Oldham]Oldham RegDist, Lancashire, England>|
<[?:District=Ormskirk]Ormskirk RegDist, Lancashire, England>|

#P
<[?:District=Pancras]Pancras RegDist, Middlesex, England>|
<[?:District=Plymouth]Plymouth RegDist, Devonshire, England>|
<[?:District=Prescot]Prescot RegDist, Lancashire, England>|
<[?:District=Preston]Preston RegDist, Lancashire, England>|

#Q

#R
<[?:District=Radford Union]Radford RegDist, Nottinghamshire, England>|
<[?:District=Radford]Radford RegDist, Nottinghamshire, England>|
<[?:District=Rochdale Union]Rochdale RegDist, Lancashire, England>|
<[?:District=Rochdale]Rochdale RegDist, Lancashire, England>|
<[?:District=Rotherhithe]Rotherhithe RegDist, Surrey, England>|
<[?:District=Runcorn]Runcorn RegDist, Cheshire, England>|

#S
<[?:District=Saddleworth]Saddleworth RegDist, Lancashire and West Riding of Yorkshire, England>|
<[?:District=Saint George In The East]Saint George In The East RegDist, Middlesex, England>|
<[?:District=Saint Mary Magdalen Bermondsey Surrey]Saint Mary Magdalen RegDist, Bermondsey, Surrey, England>|
<[?:District=Saint Luke Middlesex]St Lukes RegDist, Middlesex, England>|
<[?:District=Saint Martin in the Fields]Saint Martin In The Fields RegDist, Middlesex, England>|
<[?:District=Saint Olave Southwark]Saint Olave RegDist, Southwark, Surrey, England>|
<[?:District=Saint Pancras]Saint Pancras RegDist, Middlesex, England>|
<[?:District=Saint Saviour]Saint Saviour RegDist, Surrey, England>|
<[?:District=Salford]Salford RegDist, Lancashire, England>|
<[?:District=Selby]Selby RegDist, West Riding of Yorkshire, England>|
<[?:District=Shiffnal Union]Shiffnal RegDist, Staffordshire and Shropshire, England>|
<[?:District=Shiffnal]Shiffnal RegDist, Staffordshire and Shropshire, England>|
<[?:District=South Molton]South Molton RegDist, Devonshire, England>|
<[?:District=South Shields Union]South Shields RegDist, Co. Durham, England>|
<[?:District=South Shields]South Shields RegDist, Co. Durham, England>|
<[?:District=Southmolton]South Molton RegDist, Devonshire, England>|
<[?:District=St Thomas Union Devon]St Thomas RegDist, Devonshire, England>|
<[?:District=St Thomas]St Thomas RegDist, Devonshire, England>|
<[?:District=Stafford Union]Stafford Union RegDist, Staffordshire, England>|
<[?:District=Stockport Union]Stockport RegDist, Lancashire and Cheshire, England>|
<[?:District=Stockport]Stockport RegDist, Lancashire and Cheshire, England>|
<[?:District=Stourbridge]Stourbridge RegDist, Worcestershire Shropshire and Staffordshire, England>|
<[?:District=Strand]Strand RegDist, Middlesex, England>|
<[?:District=Stratton]Stratton RegDist, Cornwall, England>|

#T
<[?:District=Tavistock Union]Tavistock RegDist, Devonshire, England>|
<[?:District=Taunton]Taunton RegDist, Somerset, England>
<[?:District=The Anglesey Union]Anglesey RegDist, England>|
<[?:District=The Bideford Union]Bideford RegDist, Devonshire, England>|
<[?:District=The Bideford]Bideford RegDist, Devonshire, England>|
<[?:District=The Burnley Union]Burnley RegDist, Lancashire and West Riding of Yorkshire, England>| 
<[?:District=The Preston Union]Preston RegDist, Lancashire, England>|
<[?:District=The Salford Union]Salford RegDist, Lancashire, England>|
<[?:District=Tiverton And Dulverton]Tiverton And Dulverton RegDist, Somerset and Devon, England>|
<[?:District=Todmorden]Todmorden RegDist, Lancashire and West Riding of Yorkshire, England>|
<[?:District=Torrington Union]Torrington Union RegDist, Devonshire, England>|
<[?:District=Torrington]Torrington RegDist, Devonshire, England>|
<[?:District=Totnes]Totnes RegDist, Devonshire, England>|

#U

#V

#W
<[?:District=Wakefield Union]Wakefield RegDist, West Riding of Yorkshire, England>|
<[?:District=Walsall Union]Walsall RegDist, Staffordshire, England>|
<[?:District=Walsall]Walsall RegDist, Staffordshire, England>|
<[?:District=West Bromwich]West Bromwich RegDist, Warwickshire, England>|
<[?:District=West Derby and Toxteth Park]West Derby RegDist, Lancashire, England>|
<[?:District=West Derby]West Derby RegDist, Lancashire, England>|
<[?:District=Wigan Union]Wigan RegDist, Lancashire, England>|
<[?:District=Wigan]Wigan RegDist, Lancashire, England>|
<[?:District=Windsor]Windsor RegDist, Berkshire, England>|
<[?:District=Wirral]Wirral RegDist, Cheshire, England>|
<[?:District=Wolverhampton And Seisdon]Wolverhampton RegDist, Shropshire, England>|
<[?:District=Wrexham]Wrexham RegDist, Denbighshire, Wales>

#
#<[?:District][District] RegDist, ,England>
>

[lib.ValidatePlacePTT:District]



[=:End:Start:Get_GRO_District_County]

Get_GRO_DistrictCounty

[=:Start:Get_GRO_DistrictCounty]
#
# author : Inspired by Paul Tanner-Tremaine
#
# Usage: [lib.Get_GRO_DistrictCounty]
#
# 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!


<
#A
<[?:District=Alcester Union In The Counties Of Warwick And Worc][=:DistrictCounty:Alcester Union RegDist, Warwick And Worcestershire, England]>|
<[?:District=Altrincham Union][=:DistrictCounty:Altrincham RegDist, Cheshire, England]>|
<[?:District=Altrincham][=:DistrictCounty:Altrincham RegDist, Cheshire, 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=Aston Union][=:DistrictCounty:Aston RegDist, Warwickshire, England]>|
<[?:District=Aston][=:DistrictCounty:Aston RegDist, Warwickshire, England]>|
<[?:District=Atherstone][=:DistrictCounty:Atherstone RegDist, Warwickshire and Leicestershire, England]>|
<[?:District=Axbridge Union][=:DistrictCounty:Axbridge RegDist, Somerset, England]>|
<[?:District=Axbridge][=:DistrictCounty:Axbridge RegDist, Somerset, England]>|

#B
<[?:District=Barnsley][=:DistrictCounty:Barnsley RegDist, Yorkshire, England]>|
<[?:District=Barnstaple Union][=:DistrictCounty:Barnstaple RegDist, Devonshire, England]>|
<[?:District=Barnstaple][=:DistrictCounty:Barnstaple RegDist, Devonshire, England]>|
<[?:District=Barton Upon Irwell][=:DistrictCounty:Barton Upon Irwell RegDist, Lancashire, England]>|
<[?:District=Barton][=:DistrictCounty:Barton Upon Irwell RegDist, Lancashire, England]>|
<[?:District=Bath][=:DistrictCounty:Bath RegDist, Somerset, England]>|
<[?:District=Belper][=:DistrictCounty:Belper RegDist, Derbyshire, England]>|
<[?:District=Bethnal Green][=:DistrictCounty:Bethnal Green RegDist, Middlesex, England]>|
<[?:District=Bideford][=:DistrictCounty:Bideford RegDist, Devonshire, England]>|
<[?:District=Birmingham][=:DistrictCounty:Birmingham RegDist, Warwickshire, England]>|
<[?:District=Blackburn][=:DistrictCounty:Blackburn RegDist, Lancashire, England]>|
<[?:District=Blean][=:DistrictCounty:Blean RegDist, Kent, 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=Bow Common][=:DistrictCounty:Bow Common RegDist, Middlesex, England]>|
<[?:District=Bradford Union West Riding Of Yorkshire][=:DistrictCounty:Bradford RegDist, West Riding Of Yorkshire, England]>|
<[?:District=Bramley Union][=:DistrictCounty:Bramley RegDist, West Riding of Yorkshire, England]>|
<[?:District=Bramley][=:DistrictCounty:Bramley RegDist, West Riding of Yorkshire, England]>|
<[?:District=Brentford][=:DistrictCounty:Brentford RegDist, Middlesex, England]>|
<[?:District=Bridgnorth][=:DistrictCounty:Bridgnorth RegDist, Shropshire, England]>|
<[?:District=Burnley][=:DistrictCounty:Burnley RegDist, Lancashire and West Riding of Yorkshire, 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 Union Lancashire][=:DistrictCounty:Bury RegDist, Lancashire, England]>|
<[?:District=Bury Union][=:DistrictCounty:Bury RegDist, Lancashire, England]>|
<[?:District=Bury][=:DistrictCounty:Bury RegDist, Lancashire, England]>|

#C
<[?:District=Cardiff][=:DistrictCounty:Cardiff RegDist, Glamorgan, Wales]>|
<[?:District=Carlisle][=:DistrictCounty:Carlisle RegDist, Cumberland, England]>|
<[?:District=Carnarvon Union][=:DistrictCounty:Carnarvon Union RegDist, Anglesey and Carnarvonshire, Wales]>|
<[?:District=Chertsey][=:DistrictCounty:Cherstey RegDist, Surrey, England]>|
<[?:District=Chester Le Street][=:DistrictCounty:Chester le Street RegDist, Co Durham, 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=Chorley][=:DistrictCounty:Chorley RegDist Lancashire, England]>|
<[?:District=Chorlton][=:DistrictCounty:Chorlton RegDist, Lancashire, England]>|
<[?:District=City Of London][=:DistrictCounty:City of London RegDist, London, England]>|
<[?:District=Clitheroe Union][=:DistrictCounty:Clitheroe RegDist, West Riding of Yorkshire, England]>|
<[?:District=Clitheroe][=:DistrictCounty:Clitheroe RegDist, West Riding of Yorkshire, England]>|
<[?:District=Cockermouth][=:DistrictCounty:Cockermouth RegDist, Cumberland, England]>|
<[?:District=Crediton Union][=:DistrictCounty:Crediton RegDist, Devonshire, England]>|
<[?:District=Crediton][=:DistrictCounty:Crediton RegDist, Devonshire, England]>|

#D
<[?:District=Dewsbury][=:DistrictCounty:Dewsbury RegDist, West Riding of Yorkshire, England]>|
<[?:District=Droitwich Union][=:DistrictCounty:Droitwich RegDist, Worcestershire, England]>|
<[?:District=Droitwich][=:DistrictCounty:Droitwich RegDist, Worcestershire, England]>|
<[?:District=Dudley Union][=:DistrictCounty:Dudley RegDist, Worcestershire and Staffordshire, England]>|
<[?:District=Dulverton][=:DistrictCounty:Dulverton RegDist, Somerset, England]>|
<[?:District=Dury Lancashire][=:DistrictCounty:Dury RegDist, Lancashire, England]>|

#E
<[?:District=East London Union][=:DistrictCounty:East London Union RegDist, Middlesex, England]>|
<[?:District=Ecclesfield][=:DistrictCounty:Ecclesfield RegDist, West Riding of Yorkshire, England]>|
<[?:District=Elham][=:DistrictCounty:Elham RegDist, Kent, England]>|
<[?:District=Erpingham][=:DistrictCounty:Erpingham RegDist, Norfolk, England]>|
<[?:District=Evesham][=:DistrictCounty:Evesham RegDist, Gloucestershire and Worcestershire, England]>|
<[?:District=Exeter][=:DistrictCounty:Exeter RegDist, Devon, England]>|

#F
<[?:District=Foleshill & Sowe][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]>|
<[?:District=Foleshill-Sowe][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]>|
<[?:District=Foleshill][=:DistrictCounty:Foleshill RegDist, Warwickshire, England]>|

#G
<[?:District=Gateshead][=:DistrictCounty:Gateshead RegDist, Co Durham, England]>|
<[?:District=Goole Union][=:DistrictCounty:Goole Union RegDist, Lincolnshire and West Riding of Yorkshire, England]>|

#H
<[?:District=Hackney][=:DistrictCounty:Hackney RegDist, London, England]>|
<[?:District=Halifax][=:DistrictCounty:Halifax RegDist, West Riding of Yorkshire, England]>|
<[?:District=Hampstead][=:DistrictCounty:Hampstead RegDist, Middlesex, England]>|
<[?:District=Hambledon Union][=:DistrictCounty:Hambledon RegDist, Sussex and Surrey, England]>|
<[?:District=Haslingden Union][=:DistrictCounty:Haslingden RegDist, Lancashire, England]>|
<[?:District=Haslingden][=:DistrictCounty:Haslingden RegDist, Lancashire, 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=Hayfield and Glossop][=:DistrictCounty:Hayfield and Glossop RegDist, Cheshire and Derbyshire, England]>|
<[?:District=Hendon][=:DistrictCounty:Hendon RegDist, Middlesex, England]>|
<[?:District=Huddersfield][=:DistrictCounty:Huddersfield RegDist, West Riding of Yorkshire, England]>|

#I
<[?:District=Ipswich][=:DistrictCounty:Ipswich RegDist, Suffolk, England]>|

#J

#K
<[?:District=Keighley][=:DistrictCounty:Keighley RegDist, West Riding of Yorkshire, England]>|
<[?:District=Kendal Union][=:DistrictCounty:Kendal RegDist, Lancashire and Westmorland, England]>|
<[?:District=Kendal][=:DistrictCounty:Kendal RegDist, Lancashire and Westmorland, England]>|
<[?:District=Kensington][=:DistrictCounty:Kensington RegDist, Middlesex, England]>|
<[?:District=Kings Norton Union][=:DistrictCounty:Kings Norton RegDist, Warwickshire, England]>|
<[?:District=Kings Norton][=:DistrictCounty:Kings Norton RegDist, Warwickshire, England]>|
<[?:District=Knighton][=:DistrictCounty:Knighton RegDist, Shropshire, England]>|

#L
<[?:District=Lambeth][=:DistrictCounty:Lambeth RegDist, Surrey, England]>|
<[?:District=Langport][=:DistrictCounty:Langport RegDist, Somersetshire, England]>|
<[?:District=Langport district][=:DistrictCounty:Langport RegDist, Somersetshire, England]>|
<[?:District=Leeds][=:DistrictCounty:Leeds RegDist, West Riding of Yorkshire, England]>|
<[?:District=Leek Union][=:DistrictCounty:Leek Union RegDist, Staffordshire, England]>|
<[?:District=Leek][=:DistrictCounty:Leek RegDist, Staffordshire, England]>|
<[?:District=Leigh Union][=:DistrictCounty:Leigh RegDist, Lancashire, England]>|
<[?:District=Leigh][=:DistrictCounty:Leigh RegDist, Lancashire, England]>|
<[?:District=Leominster][=:DistrictCounty:Leominster RegDist, Herefordshire, England]>|
<[?:District=Liverpool][=:DistrictCounty:Liverpool RegDist, Lancashire, England]>|

#M
<[?:District=Macclesfield Union][=:DistrictCounty:Macclesfield RegDist, Cheshire, England]>|
<[?:District=Macclesfield][=:DistrictCounty:Macclesfield RegDist, Cheshire, England]>|
<[?:District=Manchester][=:DistrictCounty:Manchester 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]>|

#N
<[?:District=Nantwich][=:DistrictCounty:Nantwich RegDist, Cheshire, England]>|
<[?:District=Newport S][=:DistrictCounty:Newport RegDist, Shropshire and Staffordshire, England]>|
<[?:District=Newport Salop Staffordshire][=:DistrictCounty:Newport RegDist, Shropshire and Staffordshire, England]>|
<[?:District=Newton Abbot][=:DistrictCounty:Newton Abbot RegDist, Devonshire, England]>|
<[?:District=Northwich][=:DistrictCounty:Northwich RegDist, Cheshire, England]>|
<[?:District=Nottingham][=:DistrictCounty:Nottingham RegDist, Nottinghamshire, England]>|

#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]>|

#P
<[?:District=Pancras][=:DistrictCounty:Pancras RegDist, Middlesex, England]>|
<[?:District=Plymouth][=:DistrictCounty:Plymouth RegDist, Devonshire, England]>|
<[?:District=Prescot][=:DistrictCounty:Prescot RegDist, Lancashire, England]>|
<[?:District=Preston][=:DistrictCounty:Preston RegDist, Lancashire, England]>|

#Q

#R
<[?:District=Radford Union][=:DistrictCounty:Radford RegDist, Nottinghamshire, England]>|
<[?:District=Radford][=:DistrictCounty:Radford RegDist, Nottinghamshire, England]>|
<[?:District=Rochdale Union][=:DistrictCounty:Rochdale RegDist, Lancashire, England]>|
<[?:District=Rochdale][=:DistrictCounty:Rochdale RegDist, Lancashire, England]>|
<[?:District=Rotherhithe][=:DistrictCounty:Rotherhithe RegDist, Surrey, England]>|
<[?:District=Runcorn][=:DistrictCounty:Runcorn RegDist, Cheshire, England]>|

#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 Mary Magdalen Bermondsey Surrey][=:DistrictCounty:Saint Mary Magdalen RegDist, Bermondsey, Surrey, England]>|
<[?:District=Saint Luke Middlesex][=:DistrictCounty:St Lukes RegDist, Middlesex, 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=Selby][=:DistrictCounty:Selby RegDist, West Riding of Yorkshire, England]>|
<[?:District=Shiffnal Union][=:DistrictCounty:Shiffnal RegDist, Staffordshire and Shropshire, England]>|
<[?:District=Shiffnal][=:DistrictCounty:Shiffnal RegDist, Staffordshire and Shropshire, England]>|
<[?:District=South Molton][=:DistrictCounty:South Molton RegDist, Devonshire, England]>|
<[?:District=South Shields Union][=:DistrictCounty:South Shields RegDist, Co. Durham, England]>|
<[?:District=South Shields][=:DistrictCounty:South Shields RegDist, Co. Durham, England]>|
<[?:District=Southmolton][=:DistrictCounty:South Molton RegDist, Devonshire, England]>|
<[?:District=St Marylebone][=:DistrictCounty:St Marylebone RegDist, Middlesex, 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=Stockport Union][=:DistrictCounty:Stockport RegDist, Lancashire and Cheshire, England]>|
<[?:District=Stockport][=:DistrictCounty:Stockport RegDist, Lancashire and Cheshire, 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]>|

#T
<[?:District=Tavistock Union][=:DistrictCounty:Tavistock RegDist, Devonshire, England]>|
<[?:District=Taunton][=:DistrictCounty:Taunton 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=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=Torrington Union][=:DistrictCounty:Torrington Union RegDist, Devonshire, England]>|
<[?:District=Torrington][=:DistrictCounty:Torrington RegDist, Devonshire, England]>|
<[?:District=Totnes][=:DistrictCounty:Totnes RegDist, Devonshire, England]>|
<[?:District=Tynemouth][=:DistrictCounty:Tynemouth RegDist, Northumberland, England]>|

#U

#V

#W
<[?:District=Wakefield Union][=:DistrictCounty:Wakefield RegDist, West Riding of Yorkshire, England]>|
<[?:District=Walsall Union][=:DistrictCounty:Walsall RegDist, Staffordshire, England]>|
<[?:District=Walsall][=:DistrictCounty:Walsall RegDist, Staffordshire, England]>|
<[?:District=West Bromwich][=:DistrictCounty:West Bromwich RegDist, Warwickshire, England]>|
<[?:District=West Derby and Toxteth Park][=:DistrictCounty:West Derby RegDist, Lancashire, England]>|
<[?:District=West Derby][=:DistrictCounty:West Derby RegDist, Lancashire, England]>|
<[?:District=Wigan Union][=:DistrictCounty:Wigan RegDist, Lancashire, England]>|
<[?:District=Wigan][=:DistrictCounty:Wigan RegDist, Lancashire, England]>|
<[?:District=Windsor][=:DistrictCounty:Windsor RegDist, Berkshire, England]>|
<[?:District=Wirral][=:DistrictCounty:Wirral RegDist, Cheshire, England]>|
<[?:District=Wolverhampton And Seisdon][=:DistrictCounty:Wolverhampton RegDist, Shropshire, England]>|
<[?:District=Wrexham][=:DistrictCounty:Wrexham RegDist, Denbighshire, Wales]>


>
<[?:DistrictCounty]|[District]>
[lib.ValidatePlace:DistrictCounty]
[DistrictCounty]


[=:End:Start:Get_GRO_DistrictCounty]

Get_RG_Class

[=:Start:Get_RG_Class]
# RG Class  from Census and 1939 Register records.
# Usage: [lib.Get_RG_Class]
#
# Ancestry = [Page.Citation] - eg. The National Archives; Kew, London, England; 1939 Register; Reference: Rg 101/5506j
# Findmypast = [Archive reference]

# Get RG Class...
# National Archive class for 1939 Register = RG101
# Census - 1841(HO107), 1851(HO107), 1861(RG9), 1871(RG10), 1881(RG11), 1891(RG12), 1901(RG13),
# 1911(RG14), 1921(RG15)
# Ancestry ORA Field = [Source.Citation] --> The National Archives; Kew, London, England; 1939 Register; Reference: Rg 101/5506j
# Findmypast ORA field = [Archive reference] --> RG101/5506J/006/30
#
# Ancestry Census 1841/1851/1861/1871/1881/1891/1901: [Source.class]
# Ancestry Census 1911: [Source.Year]
# Ancestry 1939: [Source.Reference]
# Findmypast Census 1871/1881/1891/1901/1939: [Archive.reference]
# Findmypast Census 1911/1921: [Archive.series]
<
[?:Source.Class!=][=:tempClass:[Source.Class]]|
[?:Source.Year=1911][=:tempClass:RG14]|
[?:Source.Reference!=][=:tempClass:[Source.Reference:uppercase:replace: ::]]|
[?:Archive reference!=][=:tempClass:[Archive reference:replace: ::]]|
[?:Archive series!=][=:tempClass:[Archive series:replace: ::]]
>


#
#[=:RG_Class1:[Source.Citation:split:\::-1:uppercase:replace: ::]]
#[=:RG_Class:[RG_Class1:split:/:1]]
#<[?:RG_Class]|[=:RG_Class:[Archive reference:split:/:1]]>
# 1939 Register on both Amcestry and Findmypast begins with "RG101/"
<[?:RG_Class]|[=:RG_Class:[tempClass:split:/:1]]>
[=:End:Get_RG_Class]

GetGender

[=:Start:GetGender]
# Usage: [lib.GetGender:field name]
# {1} Field Name to test
[=:GenderName:[{1}:split: :1]]

<
[?:GenderName=Ada][=:Gender:F]|
[?:GenderName=Agnes][=:Gender:F]|
[?:GenderName=Alan][=:Gender:M]|
[?:GenderName=Albert][=:Gender:M]|
[?:GenderName=Alex][=:Gender:M]|
[?:GenderName=Alice][=:Gender:F]|
[?:GenderName=Amie][=:Gender:F]|
[?:GenderName=Amy][=:Gender:F]|
[?:GenderName=Andrew][=:Gender:M]|
[?:GenderName=Ann][=:Gender:F]|
[?:GenderName=Anna][=:Gender:F]|
[?:GenderName=Annie][=:Gender:F]|
[?:GenderName=Anthony][=:Gender:F]|
[?:GenderName=Arthur][=:Gender:M]|
[?:GenderName=Bruce][=:Gender:F]|
[?:GenderName=Caroline][=:Gender:F]|
[?:GenderName=Catherine][=:Gender:F]|
[?:GenderName=Celia][=:Gender:F]|
[?:GenderName=Charlotte][=:Gender:F]|
[?:GenderName=Charles][=:Gender:M]|
[?:GenderName=Clive][=:Gender:M]|
[?:GenderName=Colin][=:Gender:M]|
[?:GenderName=Daisy][=:Gender:F]|
[?:GenderName=Daphne][=:Gender:F]|
[?:GenderName=David][=:Gender:M]|
[?:GenderName=Dora][=:Gender:F]|
[?:GenderName=Dorothy][=:Gender:F]|
[?:GenderName=Edith][=:Gender:F]|
[?:GenderName=Edward][=:Gender:M]|
[?: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=Ethel][=:Gender:F]|
[?:GenderName=Eric][=:Gender:M]|
[?:GenderName=Everard][=:Gender:M]|
[?:GenderName=Fanny][=:Gender:F]|
[?:GenderName=Florence][=:Gender:F]|
[?:GenderName=Frances][=:Gender:F]|
[?:GenderName=Francis][=:Gender:M]|
[?:GenderName=Frederick][=:Gender:M]|
[?:GenderName=Geoffrey][=:Gender:M]|
[?:GenderName=George][=:Gender:M]|
[?:GenderName=Gertrude][=:Gender:F]|
[?:GenderName=Gilbert][=:Gender:M]|
[?:GenderName=Gordon][=:Gender:M]|
[?:GenderName=Grace][=:Gender:F]|
[?:GenderName=Hannah][=:Gender:F]|
[?:GenderName=Harold][=:Gender:M]|
[?:GenderName=Harriet][=:Gender:F]|
[?:GenderName=Harriette][=:Gender:F]|
[?:GenderName=Harry][=:Gender:M]|
[?:GenderName=Helen][=:Gender:F]|
[?:GenderName=Helena][=:Gender:F]|
[?:GenderName=Henry][=:Gender:M]|
[?:GenderName=Howard][=:Gender:M]|
[?:GenderName=Humphrey][=:Gender:M]|
[?:GenderName=Ida][=:Gender:F]|
[?:GenderName=James][=:Gender:M]|
[?:GenderName=Jane][=:Gender:F]|
[?:GenderName=Jean][=:Gender:F]|
[?:GenderName=John][=:Gender:M]|
[?:GenderName=Joseph][=:Gender:M]|
[?:GenderName=Josephine][=:Gender:F]|
[?:GenderName=Joyce][=:Gender:F]|
[?:GenderName=Lighton][=:Gender:M]|
[?:GenderName=Louisa][=:Gender:F]|
[?:GenderName=Lynton][=:Gender:M]|
[?:GenderName=Margaret][=:Gender:F]|
[?:GenderName=Marie][=:Gender:F]|
[?:GenderName=Martha][=:Gender:F]|
[?:GenderName=Mary][=:Gender:F]|
[?:GenderName=Mildred][=:Gender:F]|
[?:GenderName=Octavia][=:Gender:F]|
[?:GenderName=Orsie][=:Gender:M]|
[?:GenderName=Oswald][=:Gender:M]|
[?:GenderName=Patricia][=:Gender:F]|
[?:GenderName=Patrick][=:Gender:M]|
[?:GenderName=Paul][=:Gender:M]|
[?:GenderName=Percy][=:Gender:M]|
[?:GenderName=Peter][=:Gender:M]|
[?:GenderName=Phyllis][=:Gender:F]|
[?:GenderName=Ray][=:Gender:M]|
[?:GenderName=Rex][=:Gender:M]|
[?:GenderName=Robert][=:Gender:M]|
[?:GenderName=Rosina][=:Gender:F]|
[?:GenderName=Royce][=:Gender:M]|
[?:GenderName=Richard][=:Gender:M]|
[?:GenderName=Ruth][=:Gender:F]|
[?:GenderName=Samuel][=:Gender:M]|
[?:GenderName=Sarah][=:Gender:F]|
[?:GenderName=Sidney][=:Gender:M]|
[?:GenderName=Spencer][=:Gender:M]|
[?:GenderName=Sydney][=:Gender:M]|
[?:GenderName=Thomas][=:Gender:M]|
[?:GenderName=Udell][=:Gender:M]|
[?:GenderName=Violet][=:Gender:F]|
[?:GenderName=Walter][=:Gender:M]|
[?:GenderName=William][=:Gender:M]|
[?:GenderName=Willis][=:Gender:M]|
[?:GenderName=Winifred][=:Gender:F]
>

<[?:Gender]|[=:Gender]>
[=:End:GetGender]

Image_name_to_save

[=:Start:Image_name_to_save]
# Description: Just a thought at the moment - NOT LIVE - WIP
# Author: Alan
# Created: 20 Jun 2023
# Usage: [lib.Image_name_to_save:fact type]
[=:Fact_Type:{1}]
<
[?:Fact_Type=Baptism][=:Folder:Births]|
[?:Fact_Type=Birth][=:Folder:Births]|
[?:Fact_Type=Census][=:Foldesr:Census]|
[?:Fact_Type=Death][=:Folder:Deaths]|
[?:Fact_Type=Probate][=:Folder:Deaths]|
[=:Unrecognised Fact Type - press CANCEL to exit]
>
[lib.SetFolderPath:Deaths]
[FolderPath:replace:\\\\:\\]
Probate, [Probate Date:dateYear], [Name:nameSurname] [Name:nameSurname].jpg
[=:End:Image_name_to_save]


[=:End:Image_name_to_save]

InsertMedia

[=:Start:InsertMedia]
# Usage: [lib.InsertMedia]
{Ctrl+I}{Down}{Enter}{Enter}
[=:End:InsertMedia]

InstructionsBaptism

[=:Start:InstructionsBaptism]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 30 Jul 2023
# 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\</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 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\>
[=:End:InstructionsBaptism]

InstructionsCensus

[=:Start:InstructionsCensus]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 22 Jul 2023
# Usage: [lib.InstructionsCensus]
#
\<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.\</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\>
[=:End:InstructionsCensus]

InstructionsDeath

[=:Start:InstructionsDeath]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 5 Aug 2023
# 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\>
[=:End:InstructionsDeath]

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\>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 - 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\>
[=:End:InstructionsElectoralRegister]

InstructionsMarriage

[=:Start:InstructionsMarriage]
# Author: Alan
# Description: Instructions on how to use the templates.
# Creation Date: 27 Jul 2023
# Usage: [lib.InstructionsMarriage]
#
\<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.\</li\>
\<li\>Winesses 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 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\>
[=:End:InstructionsCensus]

SaveImageName

[=:Start:SaveImageName]
# Usage: [lib.SaveImageName:Event Folder:Fact Type:Register Type]
# {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)


[=:Fact_Type:{2}]
[=:Register_Type:{3}]

[lib.SetFolderPath:{1}]

# For display purposes extra slashes must be removed.
[FolderPath:replace:\\\\:\\]

# Condition 1 - START
<
[?:Page.ServiceName=Ancestry]

# Condition 2 - START
<
[?:Fact_Type=Baptism]
[Fact_Type]< [Register_Type]>, [Baptism Date:dateYear], [Name:nameSurname] [Name:nameGiven].jpg
|
[?:Fact_Type=Birth]
[Fact_Type]< [Register_Type]>, [Birth Date:dateYear], [Name:nameSurname] [Name:nameGiven].jpg
|
[?:Fact_Type=Burial]
[Fact_Type]< [Register_Type]>, [Burial Date:dateYear], [Name:nameSurname] [Name:nameGiven].jpg
|
[?:Fact_Type=Marriage]
[Fact_Type]< [Register_Type]>, [Event Date:dateYear], [Name:nameSurname] [Name:nameGiven] & [Spouse:nameSurname] [Spouse:nameGiven].jpg
>
# Condition 2 - END

# Condition 1 - ELSE
|
# Condition 2 - START
<
[?:Fact_Type=Marriage]
[Fact_Type]< [Register_Type]>, [Marriage Date:dateYear], [Last name] [First name(s)] & [Spouse's last name] [Spouse's first name(s)].jpg
>
# Condition 2 - END

>
# Condition 1 - END

[=:End:SaveImageName]

School_Admission

[=:Start: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.
#        
#


# Create media folder name
[lib.SetWindowsUser]
[lib.SetFolderPath:Others]

#Execute code at this speed
{fast}

# Set focus on any fact or if no facts ensure Facts tab selected in 
# Propert box.

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

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

# Select Source Template.
{Ctrl+D}School Admission{F6}{Space}{Enter}


#Execute code at this speed
{fast}

# Fill in source template...

# School name
# ...Findmypast
[School name]
# ...Ancestry
[School]
{Tab}

# School Location
# ...Findmypast
[Town]<, [County]><, [Country]>
# ...Ancestry
{Tab}

# Child's name
# ...Findmypast
[First name(s)] [Last name]
# ...Ancestry
[Name:nameGiven] [Name:nameSurname]
{Tab}

# Parent / Guardian address
*** Fill in using attached media ***{Tab}

# Child's birth date
# ...Findmypast
#[Birth date]
# ...Ancestry
#[Birth Date]
[Birth Date]
{Tab}

# Admission number
*** Fill in using attached media ***{Tab}

# Admission date
# ...Findmypast & Ancestry
[==:Admission date][Admission date]
{Tab}

# Parent / Guardian name --> This is the first names and not SURNAME
# ...Findmypast
[Parent's name(s)]
# ...Ancestry
[Father]
{Tab}

# Withdrawl date
31 Dec 9999{Tab}

# Withdrawal reason
*** Fill in using attached media ***{Tab}

# Archive
# ...Findmypast
[Archive]
# ...Ancestry
[Source.Part1]
{Tab}

# Archive Reference
# ...Findmypast
[Archive reference]
# ...Ancestry
[Source.Reference]
{Tab}

# Page number
*** Fill in using attached media ***{Tab}

# Collection
# ...Findmypast
[Record set]
# ...Ancestry
[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
[Page.URL]{Tab}

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

# Research Place
[lib.SetResearchPlace]
{Tab}


# Data Quality Assessment --> P = Primary (Down*5) S = Secondary (Down*4)
# Create field "Assessment" and set it to "P"
[=:Assessment_U_Q_S_P:P]
P{Down*5}
{Tab}


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

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

# Windows Folder where media is opened from.
[FolderPath]School Admission, [Admission Date:dateYear], [Last name][Name:nameSurname] [First name(s)][Name:nameGiven].jpg{Enter}

# Add file to FH folder
Others
{Enter}

[=:End:School_Admission]

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}
[=:Start:SetAncestryImportFlag]

SetAssessment

[=:Start:setassess]
#
# author : Paul Tanner-Tremaine
# www.fhora.tantrem.com
# updated 4 Jan 2023
#
# usage : [lib.SetAssessment:x]
# assessment value either entered or preset
# 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}>
{tab}
[=:End:setassess]

SetEventFolder

[=:Start:SetEventFolder]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Version Date        Description Change
# 19/05/2023 09:50    Created
#
# Usage: [lib.SetEventFolder]
#
# Parameters...
#      {1} = none
# Input Variables...
#      [WindowsUser] - name of Windows user on a specific PC. eg. Alan, Suzan [lib.SetWindowsUser]
#      [FactFolder] - name of folder where image is stored. Populated by [lib.SetFactTypeFolder]
#
# Called by:
#      SetFolderPathDisplay_v2
# Calls:
#      [lib.SetWindowsUser]          ---> gets Windows username


# Get windows user name
[lib.SetWindowsUser]

# Set path dependent upon windows user and fact type
<[?:WindowsUser=Alan]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\%FactFolder%\\\\\\\\]
|
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Documents\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\%FactFolder%\\\\\\\\]
>

[=:FolderPath:[FolderPath:replace:%WINDOWSUSER%:[WindowsUser]::replace:%FactFolder%:[FactFolder]]]

#[=:FolderPath:[FolderPath:replace:%WINDOWSUSER%:[WindowsUser]]]
#[=:FolderPath:[FolderPath:replace:%FactFolder%:[FactFolder]]]

[=:end:SetEventFolder]

SetEventType

[=:Start:SetEventype]
#
# author : Alan
#
# usage : [lib.SetEventType:x]
# 
# {1} - Event Types
# 
# (C)onfirmation | (B)anns | Marriage (L)icence | Marriage B(o)nd
#
# Enter the Register Type Check.
[=:Event_Type:{1}]
# C - Confirmation
<
[?:Event_Type=C]{down*2}|
# B - Banns
[?:Event_Type=B]{down*3}|
# L - Marriage Licence
[?:Event_Type=L]{down*4}|
# O - Marriage Bond
[?:Event_Type=O]{down*5}|
# Unknown event type
[?:Event Type {1} unknown - click CANCEL]
>
{tab}
[=:End:SetEventType]

SetFactTypeFolder

[=:Start:SetFactTypeFolder]
# Set image folder by fact type.
# Author: Alan
# Created: 21 Jul 2023
# Usage: [lib.SetFactTypeFolder:Fact Type]

# Parameters...
#      {1} = Fact Type but this has been replaced by input variable [z_FactType]
# Input Variables...
#      [z_FactType] - Called [z_FactType] but really is the "Source Type".
#
# Called by:
#      SetFolderPathDisplay_v2
# Calls:
#      None



# Folder     Fact Type
# ---------  ---------
# Births     Birth
# Births     Baptism
# Births     Baptism BT
# Births     Baptism PR
# Births     GRO Birth
# Marriages  Marriage
# Deaths     Burial
# Deaths     Death
# Deaths     GRO Death
# Census     Census
# Census     Electoral Register
# Census     1939 Register

#[==:z_FactType:{1}]

<
# Births
[?:z_FactType=Baptism][==:FactFolder:Births]|
[?:z_FactType=Baptism BT][==:FactFolder:Births]|
[?:z_FactType=Baptism PR][==:FactFolder:Births]|
[?:z_FactType=Birth][==:FactFolder:Births]|
[?:z_FactType=GRO Birth][==:FactFolder:Births]|
[?:z_FactType=SCI Birth][==:FactFolder:Births]|

# Census
[?:z_FactType=1939 Register][==:FactFolder:Census]|
[?:z_FactType=Census][==:FactFolder:Census]|
[?:z_FactType=Electoral Register][==:FactFolder:Census]|

# Deaths
[?:z_FactType=Burial][==:FactFolder:Deaths]|
[?:z_FactType=Death][==:FactFolder:Deaths]|
[?:z_FactType=GRO Death][==:FactFolder:Deaths]|
[?:z_FactType=SCI Death][==:FactFolder:Deaths]|

# Marriages
[?:z_FactType=Banns][==:FactFolder:Marriages]|
[?:z_FactType=Divorce][==:FactFolder:Marriages]|
[?:z_FactType=Marriage][==:FactFolder:Marriages]|
[?:z_FactType=Marriage Banns][==:FactFolder:Marriages]|
[?:z_FactType=Marriage Bond][==:FactFolder:Marriages]|
[?:z_FactType=Marriage Licence][==:FactFolder:Marriages]|
[?:z_FactType=SCI Marriage][==:FactFolder:Marriages]|

# Newspapers
[?:z_FactType=Newspaper][==:FactFolder:Newspapers]|

# Others

# Photos
[?:z_FactType=Photo][==:FactFolder:Photos]|

# Error
[=:No folder for unrecognised fact type - Press CANCEL]
>
[=:End:SetFactTypeFolder]

SetFieldName

[=:Start:SetFieldName]
# Description: Set field name based on Service Name - Ancestry, Findmypast,  FamilySearch, etc.
# Author: Alan
# Created: 21 Jul 2023
# Usage: [lib.SetFieldName:Fact Type]
# Parameters:
#      {1} Fact Type but this has now been replaced by variable [z_FactType]
# Input Variables:
#      [z_FactType]
#      [Page.ServiceName]
# Called by: 
# Calls: none


# Common Field Name      Service Name     Service Field Name   Transform
# -----------------      ------------     ------------------   ---------
# z_BurialDateYear       Ancestry         Burial Date          :dateYear
# z_CensusYear           Ancestry         Source.Year
# z_CensusYear           Findmypast       Record set           :split: :1
# z_GivenName            Ancestry         Name                 :nameGiven
# z_GivenName            Findmypast       First Name(s)
# z_Surname              Ancestry         Name                 :nameSurname
# z_Surname              Findmypast       Last Name
# z_SpouseGiven          Ancestry         Spouse               :nameGiven
# z_SpouseGiven          Findmypast       Spouse's Name        :nameGiven
# z_SpouseSurname        Ancestry         Spouse               :nameSurname
# z_SpouseSurname        Findmypast       Spouse's Name        :nameSurname

# [=:z_:[]]

# Ancestry-------------------------------------------------------------------------
<
[?:Page.ServiceName=Ancestry]

# General
[==:z_GivenName:[Name:nameGiven]]
[==:z_Surname:[Name:nameSurname]]
<
[?:Source.Reference][==:z_ArchiveReference:[Source.Reference:uppercase:replace: ::]]
|
[?:Source.Reference Number][==:z_ArchiveReference:[Source.Reference Number:uppercase:replace: ::]]
|
[?:Reference Number][==:z_ArchiveReference:[Reference Number:uppercase:replace: ::]]
>

<
# 1939 Register
[?:z_FactType=1939 Register]
[==:z_FactYear:1939]
[==:z_CensusYear:1939]
[==:z_Registration district:[Registration district]]
[=:z_Enumeration district:[Enumeration District:uppercase]]
[==:z_Schedule:[Schedule Number]]

[=:z_Full Address:[Full Address]]


|

# Baptism
[?:z_FactType=Baptism]
[==:z_FactYear:[Baptism Date:dateYear]]
[==:z_BaptismYear:[Baptism Date:dateYear]]
[==:z_BaptismPlace:[????]]


|

# Burial
[?:z_FactType=Burial]
[==:z_FactYear:[Burial Date:dateYear]]
[==:z_BurialYear:[Burial Date:dateYear]]

|

# Census
[?:z_FactType=Census]
[==:z_FactYear:[Source.Year]]
[==:z_CensusYear:[Source.Year]]


<[?:z_CensusYear=1911][==:z_CensusClass:RG14]
|[==:z_CensusClass:[Source.Class:uppercase:replace: ::]]>

[==:z_Piece:[Piece]]
<[?:z_FactYear=1841][==:z_Book:[Book]]|[==:z_Book:]>

[==:z_Folio:[Folio]]

<[?:Page][=:z_Page:[Page]]
|[?:Page number][=:z_Page:[Page number]]
|[?:Source.Page][=:z_Page:[Source.Page]]>

<[?:Household schedule number][==:z_Schedule:[Household schedule number]]
|[?:Schedule][==:z_Schedule:[Schedule]]>

<[?:Registration district number][==:z_Registration district:[Registration district number:append: :append:[Registration district]]]
|[?:Registration district][==:z_Registration district:[Registration district]]>

<[?:Sub district number][==:z_Sub district:[Sub district number:append: :append:[Sub-registration district]]]
|[?:Sub-registration district][==:z_Sub district:[Sub-registration district]]
|[?:Sub registration district][==:z_Sub district:[Sub registration district]]>



<[?:ED, institution, or vessel][==:z_Enumeration district:[ED, institution, or vessel]]
|[?:ED, Institution or Vessel][==:z_Enumeration district:[ED, institution or vessel]]
|[?:Source.Enumeration District][=:z_Enumeration district:[Source.Enumeration District]]>


<
[?:Full Address][=:z_Full Address:[Full Address]]
|
[=:z_Full Address:[*****<, [Town]><, [County Island]><, [Country]>}]]
>

[==:z_Parish:[Ecclesiastical parish]]

|

# Electoral Register
[?:z_FactType=Electoral Register]
[==:z_FactYear:[Residence Date:dateYear]]
[==:z_ResidenceYear:[Residence Date:dateYear]]
[=:z_Full Address:[Residence Street Address]]

|

# Marriage
[?:z_FactType=Marriage]

<
[?:Marriage Date][=:z_FactDate:[Marriage Date]]
|
[?:Event Date][=:z_FactDate:[Event Date]]
>

[==:z_FactYear:[z_FactDate:dateYear]]
[==:z_MarriageYear:[z_FactDate:dateYear]]
[==:z_SpouseGiven:[Spouse:nameGiven]]
[==:z_SpouseSurname:[Spouse:nameSurname]]

|

# Probate
[?:z_FactType=Probate]
[==:z_FactYear:[Probate Date:dateYear]]
[==:z_ProbateYear:[Probate Date:dateYear]]


|

# SCI Birth
[?:z_FactType=SCI Birth]
[==:z_FactYear:[Registration Date:dateYear]]
[==:z_RegYear:[Registration Date:dateYear]]


|

# SCI Death
[?:z_FactType=SCI Death]
[==:z_FactYear:[Registration Date:dateYear]]
[==:z_RegYear:[Registration Date:dateYear]]

|
# Error - Invalid Fact Type
[=:Fact Type Error  for Ancestry - Press CANCEL]


>

# Findmypast------------------------------------------------------------------------
|
[?:Page.ServiceName=Findmypast]

# General
[==:z_GivenName:[First name(s)]]
<[?:Last name][==:z_Surname:[Last name]]
|[?:Last name(s)][==:z_Surname:[Last name(s)]]>

<
[?:Archive reference][==:z_ArchiveReference:[Archive reference]]
|
[?:Source.Reference][==:z_ArchiveReference:[Source.Reference:uppercase]]
>

<
# 1939 Register
[?:z_FactType=1939 Register]
[==:z_FactYear:1939]
[==:z_CensusYear:1939]
[==:z_Registration district:[Registration district]]
[=:z_Enumeration district:[E  D  letter code]]
[==:z_Schedule:[Schedule]]
[=:z_Full Address:[Full Address]]


|

# Baptism
[?:z_FactType=Baptism]
<
[?:Baptism Date][==:z_FactYear:[Baptism Date:dateYear]]
|
[?:Date][==:z_FactYear:[Date:dateYear]]
>
[==:z_BaptismYear:[Baptism Date:dateYear]]
[==:z_BaptismPlace:[Place]]
|

# Burial
[?:z_FactType=Burial]
[==:z_FactYear:[Burial Date:dateYear]]
[==:z_BurialYear:[Burial Date:dateYear]]
|

# Census
[?:z_FactType=Census]
[==:z_FactYear:[Record set:split: :1]]
[==:z_CensusYear:[Record set:split: :1]]
[==:z_CensusClass:[Archive reference:replace:RG0:RG:]]
[==:z_Piece:[Piece number]]

<
[?:z_FactYear=1861][=:z_CensusClass:[Archive reference:replace:RG0:RG:]]
|
[?:Archive series][=:z_CensusClass:[Archive series:replace:RG :RG:]]
|
[?:Archive reference][=:z_CensusClass:[Archive reference]]
>

<[?:z_FactYear=1841][==:z_Book:[Book]]|[==:z_Book:]>

<[?:Folio][==:z_Folio:[Folio]]
|[?:Folio number][==:z_Folio:[Folio number]]>

<[?:Page][==:z_Page:[Page]]
|[?:Page number][==:z_Page:[Page number]]>

<[?:Schedule][==:z_Schedule:[Schedule]]
|[?:Schedule number][==:z_Schedule:[Schedule number]]>

<[?:Registration district number][==:z_Registration district:[Registration district number:append: :append:[Registration district]]]
|[?:Registration district][==:z_Registration district:[Registration district]]>


<[?:Sub-district number][==:z_Sub district:[Sub-district number:append: :append:[Sub-district]]]
|[?:Sub district][==:z_Sub district:[Sub district]]
|[?:Sub-district][==:z_Sub district:[Sub-district]]>


<[?:Enumeration district][==:z_Enumeration district:[Enumeration district]]
|[?:Enumeration district number][==:z_Enumeration district:[Enumeration district number]]>



[==:z_Full address:[Full address]]
[==:z_Parish:[Ecclesiastical parish or district]]

|

# Electoral Register
[?:z_FactType=Electoral Register]
[==:z_FactYear:[Residence Date:dateYear]]
[==:z_ResidenceYear:[Residence Date:dateYear]]

|

# Marriage
[?:z_FactType=Marriage]


<
[?:Marriage Date][=:z_FactDate:[Marriage Date]]
|
[?:Event Date][=:z_FactDate:[Event Date]]
>


[==:z_FactYear:[z_FactDate:dateYear]]
[==:z_MarriageYear:[z_FactDate:dateYear]]
[==:z_SpouseGiven:[Spouse's Name:nameGiven]]
[==:z_SpouseSurname:[Spouse's Name:nameSurname]]

|

# Probate
[?:z_FactType=Probate]
[==:z_FactYear:[Probate Date:dateYear]]
[==:z_ProbateYear:[Probate Date:dateYear]]

|

# SCI Death
[?:z_FactType=SCI Death]
[==:z_FactYear:[Death Date:dateYear]]
[==:z_RegYear:[Death Date:dateYear]]

|
# Error - Invalid Fact Type
[=:Fact Type Error  for Findmypast - Press CANCEL]

>

|
# Find a Grave----------------------------------------------------------------------
[?:Page.ServiceName=Find a Grave]

# General
[==:z_GivenName:[GivenName]]
[==:z_Surname:[Surname]]
[==:z_FactYear:[Death Date:dateYear]]
[==:z_DeathYear:[Death Date:dateYear]]
[==:z_ArchiveReference:[Record ID:prepend:Memorial ID ]]


|
# BillionGraves---------------------------------------------------------------------
[?:Page.ServiceName=BillionGraves]

# General
[==:z_GivenName:[Given Name]]
[==:z_Surname:[Family Name]]
[==:z_FactYear:[Death Date:dateYear]]
[==:z_DeathYear:[Death Date:dateYear]]
[==:z_ArchiveReference:[Record ID:prepend:BG ID]]

|
# GRO UK----------------------------------------------------------------------------
[?:Page.ServiceName=GRO UK]


# General
[==:z_GivenName:[GivenName]]
[==:z_Surname:[Surname]]
[==:z_ArchiveReference:[Source.Reference:uppercase]]

# GRO Birth
[?:z_FactType=GRO Birth]
[==:z_FactYear:[Registration Year]]
[==:z_RegYear:[Registration Year]]

|

# GRO Death
[?:z_FactType=GRO Death]
[==:z_FactYear:[Registration Year]]
[==:z_RegYear:[Registration Year]]


|

# Error - Invalid Service Name
[=:Service Name Error - Press CANCEL]
>


[=:End:SetFieldName]

SetFolderPath

[=:Start:SetFolderPath]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Version Date        Description Change
# 19/05/2023 09:50    Created
#
# Usage: [lib.SetFolderPath:Event Folder]
#
# Parameters...
#      {1} = Fact type eg. Births, Marriages, Deaths, Others, Newpapers
# Variables...
#      [WindowsUser] - name of Windows user on a specific PC. eg. Alan, Suzan (SetWindowsUser)
#
[lib.SetWindowsUser]
<
[?:WindowsUser=Alan]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
|
[?:WindowsUser=Jenni]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
|
[?:WindowsUser=Suzan]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Documents\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
>

[=:FolderPath:[FolderPath:replace:%WINDOWSUSER%:[WindowsUser]]]

[=:end:SetFolderPath]

SetFolderPath_v2

[=:Start:SetFolderPath_v2]
#
# Title:  Flexibile folderpath for media file insertion.
# Author: Alan
# Version Date        Description Change
# 19/05/2023 09:50    Created
#
# Usage: [lib.SetFolderPath_v2:Event Folder]
#
# Parameters...
#      {1} = Fact type eg. Births, Marriages, Deaths, Others, Newpapers
# Variables...
#      [WindowsUser] - name of Windows user on a specific PC. eg. Alan, Suzan (SetWindowsUser)
#
[lib.SetWindowsUser]
<
[?:WindowsUser=Alan]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
|
[?:WindowsUser=Jenni]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
|
[?:WindowsUser=Suzan]
[=:FolderPath:C:\\\\\\\\Users\\\\\\\\%WINDOWSUSER%\\\\\\\\OneDrive\\\\\\\\Documents\\\\\\\\Genealogy\\\\\\\\Genealogy\\\\\\\\Medows-Lambert\\\\\\\\Pictures\\\\\\\\{1}\\\\\\\\]
>
[=:FolderPath:[FolderPath:replace:%WINDOWSUSER%:[WindowsUser]]]

[=:end:SetFolderPath_v2]

SetFolderPathDisplay

[=:Start: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
# Created: 7 Jul 2023
# Usage: [lib.SetFolderPathDisplay:Event Folder:Fact Type]

# Folder     Fact Type
# ---------  ---------
# Births     Birth
# Births     Baptism
# Marriages  Marriage
# Deaths     Death
# Deaths     Burial
# Deaths     Gravestone
# Deaths     Headstone
# Deaths     Memorial Inscription
# Deaths     Probate
# Census     Census
# Census     Electoral Register
# Census     1939 Register
# Marriages  Marriage
# 

[=:Fact_Type:{2}]
[==:z_FactType:{2}]


# Not is use but is aimed to have standard fact type relation to image folder and
# will require only fact type as the only parameter.
#[lib.SetFactTypeFolder:Fact Type]

# Create folder path

[lib.SetFolderPath:{1}]

# Image Name
[FolderPath:replace:\\\\:\\]

# Get common fields to Services such as Ancestry, Findmypast, etc.
[lib.SetFieldName:{2}]

# Set up image name based on fact type...
<

# 1939 Register
[?:z_FactType=1939 Register]1939 Register, [z_Surname] [z_GivenName].jpg

|

# Baptism
[?:z_FactType=Baptism]{2}, [z_BaptismYear], [z_Surname] [z_GivenName].jpg


|
# Burial
[?:z_FactType=Burial]{2}, [z_BurialYear], [z_Surname] [z_GivenName].jpg

|
# Census
[?:z_FactType=Census]{2}, [z_CensusYear], [z_Surname] [z_GivenName].jpg

|
# Electoral Register
[?:z_FactType=Electoral Register]{2}, [z_ResidenceYear], [z_Surname] [z_GivenName].jpg

|
# Gravestone
[?:z_FactType=Gravestone]{2}, [z_DeathYear], [z_Surname] [z_GivenName].jpg

|
# Marriage
[?:z_FactType=Marriage]{2}, [z_MarriageYear], [z_Surname] [z_GivenName] & [z_SpouseSurname] [z_SpouseGiven].jpg

|
# Probate
[?:z_FactType=Probate]{2}, [z_ProbateYear], [z_Surname] [z_GivenName].jpg

|
# SCI Birth
[?:z_FactType=SCI Birth]{2}, [z_RegYear], [z_Surname] [z_GivenName].jpg 


|
# SCI Death
[?:z_FactType=SCI Death]{2}, [z_RegYear], [z_Surname] [z_GivenName].jpg 

>




[=:End:SetFolderPathDisplay]

SetFolderPathDisplay_v2

[=:Start:SetFolderPathDisplay_v2]
\<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
# Created: 7 Jul 2023
# Usage: [lib.SetFolderPathDisplay_v2:Fact Type]
# Parameters: {1} Fact Type
# Input Variables: none
# Called by: 
# Calls: [lib.SetFactTypeFolder:{1}] ---> gets image folder name
#        [lib.SetEventFolder]        ---> populates windows path for images
#        [lib.SetFieldName:{1}]      ---> populate common field names

# Folder     Fact Type
# ---------  ---------
# Births     Birth
# Births     Baptism
# Marriages  Marriage
# Deaths     Death
# Deaths     Burial
# Census     Census
# Census     Electoral Register
# Census     1939 Register

[==:z_FactType:{1}]



[lib.SetFactTypeFolder:{1}]

# Create complete windows folder path
[lib.SetEventFolder]

# Image Name - this transform is only needed when displaying the result in Text Template.
########[FolderPath:replace:\\\\:\\]
[FolderPath]


# Get common fields to Services such as Ancestry, Findmypast, etc.
[lib.SetFieldName:{1}]

# Set up image name based on fact type...
<

# Baptism
[?:z_FactType=Baptism]{1}, [z_BaptismYear], [z_Surname] [z_GivenName].jpg 

|

# SCI Birth
[?:z_FactType=SCI Birth]{1}, [z_BirthYear], [z_Surname] [z_GivenName].jpg 

|
# Burial
[?:z_FactType=Burial]{1}, [z_BurialYear], [z_Surname] [z_GivenName].jpg 

|
# Census
[?:z_FactType=Census]{1}, [z_CensusYear], [z_Surname] [z_GivenName].jpg 

|
# 1939 Register
[?:z_FactType=1939 Register]{1}, [z_Surname] [z_GivenName].jpg 


>




[=:End:SetFolderPathDisplay_v2]

SetGRORef

[=:Start:SetGRORef]
# Usage: [lib.SetGRORef]
# Add reference to Notes field and tab across to Source box
<
<[?:Page.ServiceName=Ancestry]Ref: [District] <[?:Birth quarter=1]Jan|[?:Birth quarter=2]Apr|[?:Birth quarter=3]Jul|[?:Birth quarter=4]Oct> qtr [Birth year] [Volume] [Page]>|
<[?:Page.ServiceName=Findmypast]Ref: [District] <[?:Birth quarter=1]Jan|[?:Birth quarter=2]Apr|[?:Birth quarter=3]Jul|[?:Birth quarter=4]Oct> qtr [Birth year] [Volume] [Page]>|
<[?:Page.ServiceName=GRO UK]Ref: [District] <[?:Registration Quarter=Q1]Jan|[?:Registration Quarter=Q2]Apr|[?:Registration Quarter=Q3]Jul|[?:Registration Quarter=Q4]Oct> qtr [Registration Year] [Volume] [Page]>
>
[=:End:SetGRORef]

SetImageName

[=:Start:SetImageName]
#
# Usage:  [lib.SetImageName:folder:Event Type]
# Title:  
# Author: Alan
# Version Date        Description Change
#                     Created
#
# Parameters
# {1} Folder                                       eg. Births
# {2} Event Type / Citation                        eg. SCI Birth, Gro Death, SCI Marriage
# {3} Event Year              [=:SIN_EventYear:]   eg. 1851 
# {4} Filename                [=:SIN_Name:]        eg. Bloggs Fred (Birth, Death, Burial, etc),
#                                                      Bloggs Fred & Jones Doreen (Marriage)
# {5} Image Format            [=:SIN_ImageFormat:] eg. jpg
#
[lib.SetFolderPath:{1}]
[=:ImageName:append:FolderPath:append:{2};append:, :append:[SIN_EventYear]:append:, :append:[SIN_Name(s)]:append:, :append:[SIN_ImageFormat]]
#[=:ImageName:<<[FolderPath>{2}, <[SIN_EventYear]>, <[SIN_Name]>, <[SIN_ImageFormat]>>]
#[ImageName:replace:\\\:\\]


[=:end:SetImageName]

SetImageName_v2

[=:Start:SetImageName_v2]
\<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
# Created: 7 Jul 2023
# Usage: [lib.SetImageName_v2]
# Parameters: {1} Fact Type NB. This replaced by input variable.
# Input Variables: [z_FactType]


# Get common fields to Services such as Ancestry, Findmypast, etc.
[lib.SetFieldName:z_FactType]

# Set up image name based on fact type...
<

# Baptism
[?:z_FactType=Baptism]{1}, [z_BaptismYear], [z_Surname] [z_GivenName].jpg 

|

# SCI Birth
[?:z_FactType=SCI Birth]{1}, [z_BirthYear], [z_Surname] [z_GivenName].jpg 

|
# Burial
[?:z_FactType=Burial]{1}, [z_BurialYear], [z_Surname] [z_GivenName].jpg 

|
# Census
[?:z_FactType=Census]{1}, [z_CensusYear], [z_Surname] [z_GivenName].jpg 


>





\</span\>
[=:End:SetImageName_v2]

SetMarriageType

[=:Start:SetMarriageType]
# Author Alan
# Created: 27 Jul 2023

# Description: Set up Marriage Type for Ancestral Sources
# Usage: [lib.SetMarriageType]
# Parameters: none
# Input variables: [Marriage 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][=:Marriage Type:After Banns]
|
[?:Marriage Type=l][=:Marriage Type:By Licence]
|
[?:Marriage Type=b][=:Marriage Type:By Banns]
|
[=:ERROR - Marriage Type should be a, b or l]
>

[Marriage Type]



[=:End:SetMarriageType]

SetRegisterType

[=:Start:SetRegisterType]
#
# author : Alan
#
# usage : [lib.SetRegisterType:xx]
# 
# {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]
# Usage: [lib.SetRepository]
# Repository - 1st line selects drop down box & 2nd selects the repository
{Space}{Down}{Enter}
{Ctrl+D}[Page.ServiceName]{F6}{Space}{Enter}{Tab}
[=:End:SetRepository]

SetRepositoryAS

[=:Start:SetRepositoryAS]
# Author: Alan
# Created: 2023
# Update: 29 Jul 2023    Changed lookup method but relies on a dummy repository named "."
# Usage: [lib.SetRepositoryAS]

# Move to Repository drop down box (>)
{tab}{Enter}

# 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
#{slow}
<
[?:Page.ServiceName=Findmypast].F{Down*2}{tab}
|
[?:Page.ServiceName=Ancestry].A{tab}
>
{Enter}
#{fast}
#Move to next field
{tab}
[=:End:SetRepositoryAS]

SetResearchDate

[=:Start:SetResearchDate]
# Usage: [lib.SetResearchDate]
[Page.Access Date]{Tab}
[=:End:SetResearchDate]

SetResearchPlace

[=:Start:SetResearchPlace]
# Usage: [lib.SetResearchPlace]
#[==:Research Place:9 Haddington Road, Whitley Bay]
[==:Research Place:Lochlane CL, Crieff, Scotland]
[Research Place]{tab}

[=:End:SetResearchPlace]

SetVersion

[=:Start:SetVersion]
05/08/2023 18:18
[=:End:SetVersion]

SetWindowsUser

[=:Start:SetWindowsUser]
# [lib.SetWindowsUser]
[==:WindowsUser:Alan]
#[==:WindowsUser:Jenni]
#[==:WindowsUser:Suzan]
[=:end:SetWindowsUser]

Space

[=:Start:Space]
# Usage: [lib.Space]
 
[=:End:Space]

Test_Family_Members

[=:Start:Test_Family_Members]

# Place cursor on facts tab

# Execution speed
{slow}

# Check if current individual has an occupation field
<[?:Occupation]|[=:Person has no OCCUPATION specified - Click CANCEL]>

# Insert occupation fact
{Ctrl+I}Occupation{Enter}{Tab}


[Occupation]{Tab}

# Date
[Source.Year]

# Switch to source window
{Ctrl+U}

# Add citation type - Cite existing source
{Ctrl+I}
{Down}
{Enter}

# Position cursor into filter field
{Ctrl+D}

# Enter source title
[Source.Title]

# Select source
{F6}{Space}{Enter}

# Execution speed
{fast}

# Generic source window - go down to Citation Specific Details
{Tab*7}

# Date
[Source.Year]{Tab}

# Where within
[Page.ServiceName]{Tab}

# Assessment - Primary Information
{Down*5}{Tab}

# Note
# Count the entries in the household members list made up...
# Current person and the following 3 fields for each person
# Name, age, relationship
[=:SplitCount:[Household Members:splitCount:,]]

# Calculate number of people in family
[=:FamilySize:[SplitCount:mathDivide:3:mathAdd:1:mathFloor]]

Family Size=[FamilySize]{Enter}

#1
[Name], [Relationship to Head], [Age]{Enter}

#2
<[?:FamilySize>1][Household Members:split:,:2], [Household Members:split:,:4], [Household Members:split:,:3]{Enter}>
#|
#3
<[?:FamilySize>2][Household Members:split:,:5], [Household Members:split:,:7], [Household Members:split:,:6]{Enter}>
#|
#4
<[?:FamilySize>2][Household Members:split:,:8], [Household Members:split:,:10], [Household Members:split:,:9]{Enter}>
#|
#5
<[?:FamilySize>3][Household Members:split:,:11], [Household Members:split:,:13], [Household Members:split:,:12]{Enter}>
#|
#6
<[?:FamilySize>4][Household Members:split:,:14], [Household Members:split:,:16], [Household Members:split:,:15]{Enter}>
#|
#7
<[?:FamilySize>5][Household Members:split:,:17], [Household Members:split:,:19], [Household Members:split:,:18]{Enter}>
#|
#8
<[?:FamilySize>6][Household Members:split:,:20], [Household Members:split:,:22], [Household Members:split:,:21]{Enter}>
#|
#9
<[?:FamilySize>7][Household Members:split:,:23], [Household Members:split:,:25], [Household Members:split:,:24]{Enter}>
{Enter}

# Citation Details
Citation Details{Enter}
----------------{Enter}
<Reg. District: [Registration district]{Enter}>
<Class: [Source.Class]{Enter}>
<Piece: [Source.Piece]{Enter}>
<Folio: [Source.Folio]{Enter}>
<Page: [Source.Page]{Enter}>
#<Civil Parish: [Civil parish]<, [County Island]><, [Country]>{Enter}>
<URL: [URL]{Enter}>

[=:End:Test_Family_Members]

TestParms

[=:Start:TestParms]
# Usage: [lib.TestParms:Marriages:2:PR]

[=:Image_Filename:Marriage, 1980, Medows Alan & Appleby Suzanne]
[=:Register Type:{3}]
[=:Fact_Type:Marriage]
[=:FolderPath:C:\\\Users\\Medows\\Pictures\\{1}\\]

Image=[Image_Filename]\<BR\>
Register Type=[Register Type]\<BR\>
Fact Type=[Fact_Type]\<BR\>
Folder=[FolderPath]\<BR\>
Parm3={{3}}\<BR\>
Parm3a={{3:<[{3}a]>c}e}\<BR\>
Parm3b={{3:<[{3}b]>d}f}\<BR\>
Parm3d={3}\<BR\>
Parm3e=<[?:{3}={3}]Empty|Full>\<BR\>
Parm3f={{3:PR}}\<BR\>
Parm3g={{3}}[=:Parm3::]|[=:Parm3:AAAA]\<BR\>
[=:Parm3:{3}]
Test=[Parm3]\<BR\>


[=:End:TestParms]

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}]/][=:Invalid {1} - press CANCEL]>

[=:End:ValidateFieldValue]

ValidateInputField

[=:Start:ValidateInputField]
# Usage [lib.ValidateInputField:Input Field:Validation Type]
# {1} - Field name
# {2} - Validation type --> N=Numeric.....not used at present 7/7/2023

# 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]
[=:INPUT_FIELD_ERROR - update field {1} - Click cancel]
>

# Parameter 2 - If N then validate for numerics
[=:Parameter2:{2}]

# Condition 1 Start
<
[?:{2}=N]
# Condition 2 Start
<
[?:{1}/\D/][=:Field {1} contains non numeric characters - Click CANCEL]
>
# Condition 2 End
>
# Condition 1 End

[=:End:ValidateInputField]

ValidatePlace

[=:Start:ValidatePlace]
# Usage [lib.ValidatePlace:Place]

# firstly, work out how many place parts and store the value in PlaceCount

[=:PlaceCount:[{1}:splitcount:,]]

 

#  testing for any param{1} that has less than three place parts and stop autotype template with error


<[?:PlaceCount<3][=:PLACE_ERROR - {1} has too few address lines - Click CANCEL]>

[=:End:ValidatePlace]

ValidatePlacePTT

[=:Start:ValidatePlacePTT]

# Usage [lib.ValidatePlacePTT:Place]

# firstly, work out how many place parts and store the value in PlaceCount

[=:PlaceCount:[{1}:splitcount:,]]

 

#  testing for any param{1} that has less than three place parts and stop autotype template with error

< 

[?PlaceCount=1]<[?:PLACE_ERROR]|[=:PLACE_ERROR - {1} has too few address lines - Click CANCEL]>

|

[?PlaceCount=2]<[?:PLACE_ERROR]|[=:PLACE_ERROR - {1} has too few address lines - Click CANCEL]>

> 

[=:End:ValidatePlacePTT]