* Rearrage Address and Place Parts plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Rearrage Address and Place Parts plugin

Post by rob_it »

FAO Mike Tate.

My Addresses & Places parts are in complete dissarray primarly because I hadn't realised the significance and thus advantages of keeping to a strict format for both. I am in the process of trying to achieve this using your plugin (version 1.4). I'm using the filter to select the various parts to move them to their correct location within my chosen Address/Place formats. However I have quite a few Addresses with no corresponding Places assigned and the filter dialogue box does not seem to show these pairings. It does show an Address and Place pairing where there is something in both and where there is in Place but not in Address. Is there any reason for this - what am I doing wrong?

Secondly, it would be a great help to me if I could sort the filter on either Address or Place so as to more easily pick the parts (in chunks) that need to be moved between an Address and Place and visa-versa.

I've found this plugin really useful so far but am now hindered particularly by the first point about Filter.

Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

Hi Rob,
I'm glad you find the Plugin useful.

I have had a quick look at the Plugin.
Sorting on either the Address or the Place looks feasible with the addition of an option on the Input Filter tab.

I suspect when the Plugin was written it was assumed that if an Address exists it must have a Place, because any document supplying an Address would also supply a Place.
I will look to see if Address fields with no Place can be included, but it won't happen overnight.

Do the changes to those Address fields with no Place need parts moved into the Place field?
If not, then you should be able to rearrange the Address fields using Tools > Work with Data > Addresses.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,
In a significantly large number of cases I dropped the whole address ( as in how you would address a snail mail envelope) in the Address and left the Place blank and vise versa for a similar number of other records not to mention those that have a sprinkling mixture of both common and separate parts in each - hence I'm trying to extracate myself from this extraordinary self inflicted mess! Oh how I wish I had genned up on this before I had got so far down the road ( no pun intended).

As regards sorting the Address (Filter dialogue) I've only just realised it might be a bit tricky to get something effective for all users. I have settled on Part1 for Flat/house/court name, Part 2 for house number and Part3 for street/road/avenue in my new Address scheme and I think sorting on Part3 would suit me best - at the moment.

I'm also using Address Part1 for Church/hospital/ cemetery name and Part2 for Church/hospital/cemetery town - does that sound ok or should I extend my Address scheme to a new Part4 JUST for the use churches etc?

Rob
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,
Sorry I didn't answer your question explicitly. Yes I do need to drop Parts of the Address, (basically every Part beyond Part3), into the Place Parts.

Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

Regarding Address columns, I would try and fit 'public places' into the 'private houses' parts more consistently.
e.g.
Part 1: Building, e.g. Flat No, House/Court/Church/Hospital/Cemetery/Building Name
Part 2: Number (sometimes even public places and offices have a street address)
Part 3: Street (ditto)
Part 4: Town (enclosed in [[square brackets]] where duplicating Place Town to avoid duplication in Reports, etc)
I also add further Parts for such as Post Code.

I was not considering offering to sort on all the column parts.
That would require a drop-list offering all the Address and Place column part numbers.
There would also have to be several such drop-lists to specify the primary, secondary, tertiary, etc, sort columns.
Anyway, if the Address and Place fields are not consistently organised then sorting on a column part makes no sense as they would not contain data of the same type.

OK, clearly you need the Address with blank Place cases to be included in the Input Filter tab.

"Oh how I wish I had genned up on this before I had got so far"
Where have I heard that before?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,

Thanks for your advice on Address Part allocations - I'll try to follow it diligently from now on.

I hadn't made it clear, from my point of view, why a Part 3 Address sort would be beneficial - namely so I could more easily keep track of my reorganisation progress through the long list of addresses. Under no circumstances do I want to take selfish advantage of your time and effort and fully see your argument not to provide this.

I think I have come up with a suitable workaround for the Address filter:- Shift the Place Parts right to make space for a copied Address Part (eg road/street ) on a tempory basis whilst the reoganistion is taking place. Then use the default Place filter will sort on the Address. Finally return the Place Parts beyord Part1 back to their original when finished.

In the plugin Help concerning the filter my understanding is that a Query Result Set can be used to preset the Input filter Tab. I created a Query with column %FACT.PLACE: and tried it but was unable to point the query at the plugin when it opens. How do I do it?

Whilst experimenting with the plugin I noticed {a}, {b1} etc appeared next to some of the results elements. I remember seeing your answer to a similar concern but am unable to find your explanation again. Please can you refresh my memory.

Thanks, as always, for you assistance,

Rob
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,

Query Para should have read:-

In the plugin Help concerning the filter my understanding is that a Query Result Set can be used to preset the Input filter Tab. I created a Query with column %FACT.PLACE: and restricted it by Row to show just 'Tower Hamlets, Shoreditch' some 18 records. I then tried it but was unable to point the query at the plugin when it opens. How do I do it?


Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

The Help & Advice is at plugins:help:rearrange_address_and_place_parts:rearrange_address_and_place_parts|> Rearrange Address and Place Parts Plugin.

Any Place records selected before running the Plugin will be preselected in the Input Filter tab.
So, use the Query to select the Place records and then run the Plugin.
In your example, if you know it is Tower Hamlets, Shoreditch you want, then just select that Place record in the Records Window Places tab, without needing a Query.

Remember that in FH V6 its Place records mirror the Place fields.
So if you insert an Address part into the Place it will clone lots of Place records with prefixes.
Then when you remove that Address part the Place records are not merged but gain suffixes.
So I doubt if your proposed workaround will be suitable.
The plugins:help:rearrange_address_and_place_parts:result_set|> Rearrange Address and Place Parts ~ Result Set advice explains about the prefixes and suffixes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike ( and et Al)

When I selected the Place record/s in the Records Window Places tab and ran the plugin the filter preselected the Places correctly, however doing the same with the custom query as shown in a previous post did not work for me - guess there must be something wrong in my query. - I'll keep looking.

I've been experimenting (again) long hand by
1) entering into several of my Census records '{1}Dummy' for a Place name where there is an Address but otherwise no Place.
2) Then I ran the plugin and it created a list in the filter showing those Addresses and corresponding '{1}Dummy' at the top of the long Filter list (for the Place).
3) I then used the plugin to move the section of the Address pertaining to its corresponding Place to overwrite {1}Dummy (and the follow on Place Parts as needed).
I was wondering whether this was a simple task (for an expert in plugin writing) to produce a plugin to perform 1) But using ALL present Address records where there in no corresponding Place present. Or whether it is a non-starter like my other attempt at madness!

Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

Regarding your custom Query, it is necessary for it to include Place Records in the Result Set so they can be selected. I suspect your current Query may only include Individual Records. For example, I have a Fact Type Query with a Column Expression of %FACT.PLAC>% and when any Result Set cells from that Column are selected, those Place names are preselected in the Input Filter tab.

You know when they are Place records, because they have the same green marker icon as in the Records Window Places tab, and when they are double-clicked they open a Place record Property Box. Whereas, if they have no such icon, and when double-clicked they open an Individual record Property Box, then they are Place fields.

It is a simple Plugin task to add a dummy Place name to all scenarios where there is an Address but no Place defined.

However, give me a little while and I might be able to adapt the Plugin to include such cases, but not this weekend as I am busy.

In the meantime, in a copy of your Project, perform some representative experiments of the types of rearrangement you hope to achieve, and see what results you get. You may find that the follow up work needed sort out the Place record clones, etc, and eliminate the prefixes and suffixes is more than you realise, and more than just slogging through a manual process of rearrangement.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,

Sorted out my Fact query problem. I actually had 2 queries the 1st had %FACT.PLAC>% as a Column. The 2nd query had %FACT.PLAC:FULL% as a column and I picked up the 2nd query in error when I tried it with the plugin. Anywhy I combined them into a single query using both columns and I can see that the 1st column creates Place records whilst the other doesn't. I don't understand why incorporating the qualifier :FULL doesn't yield Place records in the column especially as it appears to yield the same textual result.

I must confess I hadn't realised that there was another part to the exercise post plugin, or that it was going to be that onerous until you pointed me to the explanation of prefixes and suffixes. I'll see what I've really let myself in for over the next few days - on a copy of my project as you advise of course.

Thanks,
Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

There is an important aspect of Place fields and Place records that you have misunderstood.

%FACT.PLAC>% says follow the Place field link to the Place record.

%FACT.PLAC:FULL% says show the Place field text in full (the :FULL qualifier is actually superfluous)

Unlike all other record links that are implemented via Record Id, the Place record links are implemented by Place name text.
So if a Place field text is say Fulham, London then it links to the Place record whose name is Fulham, London.
There can be only one Place record with that name, because that is the link key. (That is why prefixes are needed.)
Whereas, all other records that use the unique Record Id linkage can have duplicated names.

So although your two columns seem to show the same text, the 1st is from the Place record, and the 2nd from the Place field.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,

Thanks for your explanation regarding Place fields and records.

Having used the plugin quite heavily over the last few days I have some observations/suggestions for your consideration.
They are mostly cosmetic in appearence (although not necessarily easy to implement codewise?) Some are centred around
the stickiness of the settings and the Help. I've found it frustratingly easy to overlook previous settings between successive operations, particularly as the filter normally defaults to 'All' selected every time - its caught me out alot .
(I know whats coming -'You're not keeping to the prescribed operational instructions').

However here goes, could:-
1. the text colour on the Output Column Part be changed ( eg from black to blue) if its' corresponding Input Column Part has changed from the Default setting. (So that one can see at a glance what Part/s have changed).
2. the Input Filter start with no records selected as default. Unless of course it has been preselected outside the plugin.
3. the 'Help and Advice' not be displayed in a background window after the restore to default button is pressed. (I find it a bit distracting).
4. the 'Help & Advice' button open to the content within 'Rearrange Address Place Parts Plugin' from the page link (in brown text) under 'Related Pages' in 'FAQ' rather than 'This Topic does not exist yet' . Mind you, as it is, it does encourage rooting around in the menu system to find it!

Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

Rob, thanks for the feedback.
  1. That sounds like a good idea ~ let me think about it ~ should be easy to code. :idea:
  2. Maybe whether Select All or Select None is the default could be a sticky option. :?:
  3. I would prefer not to change that, as when any of my Plugins are first run that is their initial default state. :|
    It also resets the size & position of the window, and reminds users about the Help & Advice pages.
  4. That is a bug and will be fixed in the next version. :oops: Sorry!
    (Shows how often people use the help as it has been that way for over 2 years.)
I am still hoping to include Address fields with no Place field in the Input Filter.

Do you still need any extra sort options for the Input Filter tab?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,
Thanks for your positive responses.

Item 3. I completely agree and understand the importance of displaying the Help menu at the plugin startup -
but it does not show at start up, it only shows after pressing the 'Help and Advice' or the 'Restore Plugin Default Setting' button.
However, in any case, I think that this plugin is a special case in that it will mostly be re-opened many times in
order to achieve an overall final result- with me an infinite number! In such cases I would find that an even worse senario
(Help opened every time the plugin was restarted).
Maybe a reconfiguration along the lines of:-
a) Extra tick boxes for stickiness of Filter and Columns under Select Rearrangement Options.
b) KEEP the push button to restore operational settings eg Column parts & Select Rearrangement Options - as it MUST be readily accessible.
c) Expand say the 'Set Windows Fonts'(called something else) to include a Help menu opening on/off at startup (Default On).
d) Restore to 'factory setting' button (with are you sure) that resets everything for safety?

NB 'Mapping Options' & 'Result Set' buttons in Help pages also show blank content too -also bugs?
(I only mentioned the opening help page before as I thought that the most important).

Plugin Sorting Options:
Before I discovered your plugin I was only using Tools=>Work With Data=> Address/Places where I was able sort on each Part - which I found very useful to easily see where Parts needed to be moved about from column to column. But it could not display both Address & Place at the same time. For that I used a custom query columns viz:-

=FactOwner(%FACT%,1,MALES_FIRST)
=RecordId(GetRecord(%FACT%))
=FactLabel(%FACT%)
%FACT.DATE:YEAR%
%FACT.ADDR%
%FACT.PLAC>%
(Some columns not strictly required)


So I was continally toggling between the two to see what could then be safely and readily edited, moved and merged - All a bit of a faff . I also had to go through the Query to bring up the record to copy address parts to place and vise versa for each record longhand - even more of a faff.
So yes, ideally, extra sorting options for the filter would bring all the operations I require under one roof
(except of course the Verification Stage for prefixes and suffixes etc - for which I have still mainly resorted to my query).
However I can now pre-load the plugin filter via my query so if you can please advise me on the expression/s to show the Address/Place parts separately in my query I'll be able to sort it more effectively too prior to record selection for the plugin filter.

So in summary armed, with the above, it's more important to me at moment, that those addresses with no places get into the plugin filter somehow than there be a lengthy delay to provide sorting on multiple parts. (Sorry to be so long winded)

Rob
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Rearrage Address and Place Parts plugin

Post by tatewise »

Item 3.
You misunderstand what I mean by "when any of my Plugins are first run that is their initial default state."
I should have made it clearer that first run refers to each new Plugin Version number, not every run of the same version.

a) I am not keen on even more tick boxes, as the dialogue is far too busy already.
b) Presumably this is the RESTORE PLUGIN DEFAULT SETTINGS button you want to keep.
c) The Help & Advice window does not open at startup, except when Plugin Version changes.
d) That is the purpose of the RESTORE PLUGIN DEFAULT SETTINGS button.

Yes, those other 'missing' Help & Advice pages are part of the same bug.

To show Address & Place parts use the =TextPart(...) function.
See Help > Using Family Historian > Advanced Topics > Understanding Functions > Functions (all) > TextPart and how_to:understanding_functions|> Understanding Functions.
e.g.
=TextPart( %FACT.ADDR%, 2 ) returns 2nd part of Address
=TextPart( %FACT.PLAC%, 3 ) returns 3rd part of Place
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Rearrage Address and Place Parts plugin

Post by rob_it »

Hi Mike,
Thanks for the expressions I needed for the query.

What I was trying to say was that it would be v.handy to be able to quickly reset all the Column Parts & Select Rearrangement Options only, (whilst keeping a pre-loaded filter) ie without having to restart the plugin afterwards. At present to do this I have to resort to RESTORE PLUGIN DEFAULT SETTINGS then restart the plugin.

Rob
Post Reply