I'm not sure if this is relevant, but coming from it at a different angle and probably starting point.
One of the problems with places is it is nice to use them in different forms for different reports/ diagrams/ maps. I like to keep just one primary record (of anything) and copy it or amend it semi automatically. I also like to ensure data portability, but not everybody worries too much about that. So my scenario mentioned in other posts is (bear with me as it is the methodology that counts):
- Keep my FULL master place information in a well structured PLACe record.
(This for info only - for me I keep a modern place address that can be found by things like Google maps and if required have a standard Source record for historical changes or other relevant information)
- with a plugin I can then copy/amend/reduce the PLACe info to the ADDRess record and use it a to make my diagrams more concise, i.e. use ADDR instead of PLAC, or whatever other purpose is needed.
- this can also be manipulated with plugin Rearrange Address and Place Parts.
The problem of the above approach to reports is that I think it is possible to include/exclude ADDRess, but not PLACe. So:
The principle is still to keep 1 master place record. This could be in the PLACe, ADDRess, Standardized or note field. Not forgetting that I think PLACe can also have a note field. From there, a plugin could create whatever is required in the PLACe field, either with "copy certain parts" or a list of conversions.
This is my plugin (borrowed from elsewhere and very much tailored to my setup):
Code: Select all
-- To abbreviate PLACe records into ADDRess fields
--
-- N.B. All ADDRess fields should be blank first (do query then delete ADDRess column, or use plugin with plugin Rearrange Address and Place Parts)
tblTypes = {'INDI','FAM'} -- Scan both Family and Individual Record Types
ptrItem = fhNewItemPtr()
ptrFact = fhNewItemPtr()
for intType, strType in ipairs(tblTypes) do
ptrItem:MoveToFirstRecord(strType)
while ptrItem:IsNotNull() do
if fhGetTag(ptrItem) == 'PLAC' then -- Search items until Place field found
ptrFact:MoveToParentItem(ptrItem)
if fhGetItemText(ptrFact,'~.ADDR') == '' then -- Check Address is empty (OR FIRST DELETE ALL VIA QUERY)
ptrAddr = fhCreateItem('ADDR',ptrFact,true) -- Ensure field exists
if ptrAddr:IsNotNull() then
--
-- what these lines below do
--1 ("^(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)","%1,%2,%3,%4,%5,%6,%7,%8")
-- removes columns 9+10 where there are 10 columns in use.
--2 ("^(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)","%1,%2,%3,%4,%5,%6,%7,%8")
-- removes column 9 where there are only 9 columns in use.
--3 onwards change from PLAC detail to ADDR
--
local strPLAC = fhGetItemText(ptrFact,'~.PLAC') -- REPEAT FROM PLACe TO ADDRess LINES AS REQUIRED
strPLAC = strPLAC:gsub("^(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*)","%1,%2,%3,%4,%5,%6,%7,%8")
strPLAC = strPLAC:gsub("^(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*)","%1,%2,%3,%4,%5,%6,%7,%8")
-- old, strPLAC = strPLAC:gsub("^(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)","%1,%2,%3,%4,%5,%6,%7,%8")
-- old, strPLAC = strPLAC:gsub("^(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)","%1,%2,%3,%4,%5,%6,%7,%8")
--strPLAC = strPLAC:gsub("^","")
strPLAC = strPLAC:gsub(", Tunley United Reformed Church",", Tunley URC")
strPLAC = strPLAC:gsub("South Africa, , Capetown, Victoria and Alfred Waterfront, The One and Only Hotel","SA, Capetown, 1+Only Hotel")
strPLAC = strPLAC:gsub("^Wales, , Powys, Montgomeryshire, Llandrinio","Wales, Powys, Llandrinio")
strPLAC = strPLAC:gsub("^USA, New York, New York, Manhattan, , East 68th Street, 525, New York Presbyterian_Weill Cornell Medical Center","USA, Manhattan, Weill Cornell Medical Center")
strPLAC = strPLAC:gsub("^USA, New York, New York, Manhattan, , 10th Avenue, 1000, St Luke's; Roosevelt Hospital","USA, Manhattan, Roosevelt Hospital")
strPLAC = strPLAC:gsub("USA, New Jersey, Essex, Livingston, , St Barnabas Medical Center","USA, nj, Essex, Livingston, St Barnabas MedCen")
strPLAC = strPLAC:gsub("^Australia, Northern Territory","AU, NorT")
strPLAC = strPLAC:gsub("^Australia, Queensland","AU, WestA")
strPLAC = strPLAC:gsub("^Australia, New South Wales,","AU,NSW")
strPLAC = strPLAC:gsub("^Australia, Western Australia","AU,QLD")
strPLAC = strPLAC:gsub("^Australia,","AU,")
strPLAC = strPLAC:gsub("^England, , Berkshire,","Berks,")
strPLAC = strPLAC:gsub("^England, , Berkshire","Berkshire")
strPLAC = strPLAC:gsub("^England, , Warwickshire, Birmingham","Birmingham")
strPLAC = strPLAC:gsub("^England, , Lancashire, Blackburn","Blackburn")
strPLAC = strPLAC:gsub("^England, , Lancashire, Blackpool","Blackpool")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Bolton","Bolton")
strPLAC = strPLAC:gsub("^England, , Bristol","Bristol")
strPLAC = strPLAC:gsub("^England, , Lancashire, Burnley","Burnley")
strPLAC = strPLAC:gsub("^England, , Lancashire, Bury","Bury")
strPLAC = strPLAC:gsub("^Canada, Alberta,","CA, AlB,")
strPLAC = strPLAC:gsub("^Canada, British Columbia,","CA, BC,")
strPLAC = strPLAC:gsub("^Canada, Nova Scotia,","CA, NS,")
strPLAC = strPLAC:gsub("^Canada, Ontario,","CA, ON,")
strPLAC = strPLAC:gsub("^Canada,","CA,")
strPLAC = strPLAC:gsub("^England, , Cambridgeshire, East Cambridgeshire,","Cambs,")
strPLAC = strPLAC:gsub("^England, , Cambridgeshire,","Cambs,")
strPLAC = strPLAC:gsub("^England, , Cambridgeshire","Cambridgeshire")
strPLAC = strPLAC:gsub("^Canada, West, , Camerasco (or Camerases)","Canada, West, , Camerasco (or Camerases)")
strPLAC = strPLAC:gsub("^Canada, West, , Osevego","Canada, West, , Osevego")
strPLAC = strPLAC:gsub("^England, , Cumberland, Carlisle","Carlisle")
strPLAC = strPLAC:gsub("^England, , Cheshire,","Chesh,")
strPLAC = strPLAC:gsub("^England, , Lancashire, Chorley, , Chorley Hospital","Chorley Hospital")
strPLAC = strPLAC:gsub("^England, , Lancashire, Chorley","Chorley")
strPLAC = strPLAC:gsub("^England, , Cornwall","Cornwall")
strPLAC = strPLAC:gsub("^England, , Cumbria, South Lakeland, Coniston","Cumbria, Coniston")
strPLAC = strPLAC:gsub("^England, , Cumbria","Cumbria")
strPLAC = strPLAC:gsub("^England, , Derbyshire, Derby","Derby")
strPLAC = strPLAC:gsub("^England, , Derbyshire","Derbys")
strPLAC = strPLAC:gsub("^England, , Devon","Devon")
strPLAC = strPLAC:gsub("^England, , Dorset","Dorset")
strPLAC = strPLAC:gsub("^England, , Durham","Durham")
strPLAC = strPLAC:gsub("^England, , Lancashire, West Lancashire,","Lancs,")
strPLAC = strPLAC:gsub("^England, , Lancashire, West Lancashire","Lancashire")
strPLAC = strPLAC:gsub("^England, , Essex","Essex")
strPLAC = strPLAC:gsub("^England, , Devon, Exeter","Exeter")
strPLAC = strPLAC:gsub("^England, , Hampshire","Hampshire")
strPLAC = strPLAC:gsub("^England, , Herefordshire","Herefordshire")
strPLAC = strPLAC:gsub("^England, , Hertfordshire","Hertfordshire")
strPLAC = strPLAC:gsub("^England, , Huntingdonshire","Huntingdonshire")
strPLAC = strPLAC:gsub("^England, , Kent","Kent")
strPLAC = strPLAC:gsub("^England, , Lancashire, Lancaster, , Hospital","Lancaster Hospital")
strPLAC = strPLAC:gsub("^England, , Lancashire, Liverpool","Liverpool")
strPLAC = strPLAC:gsub("^England, , Lancashire, Lancaster,","Lancaster,")
strPLAC = strPLAC:gsub("^England, , Lancashire, Lancaster","Lancaster")
strPLAC = strPLAC:gsub("^England, , West Yorkshire, Leeds","Leeds")
strPLAC = strPLAC:gsub("^England, , Leicestershire","Leicestershire")
strPLAC = strPLAC:gsub("^England, , Greater London","London")
strPLAC = strPLAC:gsub("^England, , London","London")
strPLAC = strPLAC:gsub("^England, , Merseyside","Merseyside")
strPLAC = strPLAC:gsub("^England, , Middlesex","Middlesex")
strPLAC = strPLAC:gsub("^England, , Tyne and Wear, Newcastle Upon Tyne","Newcastle Upon Tyne")
strPLAC = strPLAC:gsub("^England, , Northumberland","Northumberland")
strPLAC = strPLAC:gsub("^England, , Nottinghamshire","Notts")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Oldham","Oldham")
strPLAC = strPLAC:gsub("^England, , Lancashire, Ormskirk","Ormskirk")
strPLAC = strPLAC:gsub("^England, , Lancashire, Leyland, , Turpin Green Lane, Leyland Methodist Church,","Lancs, Leyland, Turpin Green Methodist Church")
strPLAC = strPLAC:gsub("^England, , Oxfordshire","Oxfordshire")
strPLAC = strPLAC:gsub("^England, , Devon, Plymouth","Plymouth")
strPLAC = strPLAC:gsub("^England, , Lancashire, Preston","Preston")
strPLAC = strPLAC:gsub("^England, , Lancashire, Rochdale","Rochdale")
strPLAC = strPLAC:gsub("^England, , Lancashire, Salford","Salford")
strPLAC = strPLAC:gsub("^England, , Shropshire,","Shrops,")
strPLAC = strPLAC:gsub("^England, , Lancashire, Skelmersdale","Skelmersdale")
strPLAC = strPLAC:gsub("^England, , Somerset","Somerset")
strPLAC = strPLAC:gsub("^England, , Lancashire, Southport","Southport")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, St Helens","St Helens")
strPLAC = strPLAC:gsub("^England, , Staffordshire,","Staffs,")
strPLAC = strPLAC:gsub("^England, , Staffordshire","Staffordshire")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Stockport","Stockport")
strPLAC = strPLAC:gsub("^England, , County Durham, Stockton on Tees","Stockton on Tees")
strPLAC = strPLAC:gsub("^England, , Suffolk","Suffolk")
strPLAC = strPLAC:gsub("^England, , Surrey","Surrey")
strPLAC = strPLAC:gsub("^England, , East Sussex","Sussex")
strPLAC = strPLAC:gsub("^England, , Sussex","Sussex")
strPLAC = strPLAC:gsub("^England, , Tyne and Wear","Tyne&Wear")
strPLAC = strPLAC:gsub("^USA, New York, New York","USA, New York")
strPLAC = strPLAC:gsub("^USA, New York, New York, Manhattan, , 10th Avenue, 1000, St Luke's; Roosevelt Hospital","USA, NY, Manhattan, Roosevelt Hospital")
strPLAC = strPLAC:gsub("^USA, New York, New York, Manhattan, , East 68th Street, 525, New York Presbyterian;Weill Cornell Medical Center, NY 10065","USA, NY, Manhattan, Weill Cornell Medical C")
strPLAC = strPLAC:gsub("^USA, New York, New York, The Bronx, Throgs Neck","USA, NY, The Bronx, Throgs Neck")
strPLAC = strPLAC:gsub("^England, , West Midlands","ENG, W Midlands")
strPLAC = strPLAC:gsub("^Wales, , Ceredigion","Wales, , Ceredigion")
strPLAC = strPLAC:gsub("^Wales, , Clwyd, Flintshire, Flint","Wales, , Clwyd, Flintshire, Flint")
strPLAC = strPLAC:gsub("^Wales, , Clwyd, Wrexham","Wales, , Clwyd, Wrexham")
strPLAC = strPLAC:gsub("^Wales, , Mid Glamorgan","Wales, , MGlaM,")
strPLAC = strPLAC:gsub("^Wales, , South Glamorgan, Cardiff","Wales, Cardiff")
strPLAC = strPLAC:gsub("^England, , Lancashire, Warrington","Warrington")
strPLAC = strPLAC:gsub("^England, , Warwickshire","Warwicks")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Wigan, , Frog Lane, 75, Frog Lane Public Assistance Institution {1930_1948}","Wigan, , Frog Lane, 75, Workhouse")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Wigan, Standish Lower Ground, Crooke","Wigan, Crooke")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Wigan, Lower Ince, Cemetery Road, Lower Ince Cemetery and Wigan Crematorium.*","Wigan, Lower Ince Crem")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Wigan, Standish Lower Ground","Wigan, Standish Lwr Grnd")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Wigan","Wigan")
strPLAC = strPLAC:gsub("^England, , West Midlands, Wolverhampton","Wolverhampton")
strPLAC = strPLAC:gsub("^England, , Worcestershire, Malvern Hills,","Worcs,")
strPLAC = strPLAC:gsub("^England, , Worcestershire, Wyre Forest,","Worcs,")
strPLAC = strPLAC:gsub("^England, , North Yorkshire,","Yorks, ")
strPLAC = strPLAC:gsub("^England, , South Yorkshire,","Yorks, ")
strPLAC = strPLAC:gsub("^England, , West Yorkshire, Calderdale,","Yorks, ")
strPLAC = strPLAC:gsub("^England, , West Yorkshire,","Yorks, ")
strPLAC = strPLAC:gsub("^England, , East Riding of Yorkshire,","Yorks, ")
strPLAC = strPLAC:gsub("^England, , Yorkshire","Yorkshire")
strPLAC = strPLAC:gsub("^England, , Lancashire,","Lancs,")
strPLAC = strPLAC:gsub("^England, , Lancashire","Lancashire")
strPLAC = strPLAC:gsub("^England, , Greater Manchester, Manchester","Manchester")
strPLAC = strPLAC:gsub("^England, , Greater Manchester","GtrMan")
strPLAC = strPLAC:gsub("^England,","ENG,")
strPLAC = strPLAC:gsub(", Registrar~Office or Attended",", Reg")
strPLAC = strPLAC:gsub("registration district","reg dist")
strPLAC = strPLAC:gsub(", , ",", ")
strPLAC = strPLAC:gsub(", , ",", ")
strPLAC = strPLAC:gsub(", , ",", ")
strPLAC = strPLAC:gsub(", , ",", ")
strPLAC = strPLAC:gsub("^, ","")
strPLAC = strPLAC:gsub(" $","")
strPLAC = strPLAC:gsub(",$","")
isOK = fhSetValueAsText(ptrAddr,strPLAC) -- Set Address as copy of Place
end
end
end
ptrItem:MoveNextSpecial()
end
end