Page 1 of 2

PLAC and ADDR Records; Sorting

Posted: 23 Jan 2018 13:28
by Ron Melby
There must be some answer to this, and I am not finding it.

I bring up either list from the work with data window..

I reverse order, and would expect them to sort alpha by field on all fields, so that each field is in order in the whole and of itself, simple case:

CAN, CA, , , ,
CAN, CA , , , ,

Should be together for merging, but are not, how do I sort multiple fields at once?

Or as an alternative, how do I select records that are not one after another, to merge?

Re: PLAC and ADDR Records; Sorting

Posted: 23 Jan 2018 13:53
by jbtapscott
Per the Help: "....

Merge

Use this button to merge 2 or more data items. This action works with multiple selection (press-and-hold the Ctrl key while clicking, to select an item without unselecting previously selected items). Select all of the data items you wish to merge and click on Merge. You will then be required to select from one of the items you have chosen to be merged, to be the final version that results from the merge.
"
This is the method I always use when selecting records and it works fine.

Re: PLAC and ADDR Records; Sorting

Posted: 23 Jan 2018 13:58
by tatewise
Sorting is much the same as in all other FH lists such as Records Window, Query Result Set, Property Box Facts tab, etc.
Click on the column heading to perform a default sort, or hold down Alt key while clicking to reverse sort.

So in Tools > Work With Data > Places/Addresses, with Reverse Display Order selected, click the Last column heading.

BTW: Click the Help button in that dialogue and it explains how to sort in the i Tip at the bottom.

To select any rows to Merge hold down Ctrl key while selecting (i.e. standard Windows multi-selection method.)
The Help page also explains that in the Merge advice as mentioned by Brent.
You can even select more than two items to be merged!

Moan: I have never figured out why users don't click the Help button and read all the advice before posting questions.

Re: PLAC and ADDR Records; Sorting

Posted: 23 Jan 2018 14:19
by ColeValleyGirl
The help doesn't tell you how to sort all columns at once -- only one column at a time, which makes it difficult to sort related items together, which is what Ron is asking about viz: "how do I sort multiple fields at once"

Re: PLAC and ADDR Records; Sorting

Posted: 23 Jan 2018 15:22
by tatewise
OK, but a little experimentation shows that it does multi-column sort exactly as Ron requires.

With Reverse Display Order selected, click the Last column heading and it is sorted as primary key, then 2nd Last column is sorted as secondary key, 3rd Last column is sorted as tertiary key, and so on.

If you click on 2nd Last column heading then it becomes primary key, Last column becomes secondary key, 3rd Last column is tertiary key, and so on.

That same scheme works for for any column, and also when Reverse Display Order is not selected.
The chosen column is primary key, and the rest are auto-sorted from left to right.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 11:14
by Ron Melby
No, it doesnt, not any way I can get it to work.

Key:

(Last + 2nd Last +3rd Last......nth Last) thats the reverse. and same forward would be nice.

is there a way?

The consternation with select to merge came from the fact the roll keys become inoperable or unusual, have to use the slider.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 11:59
by tatewise
Ron, I don't understand what is not working. I have created Place names like your CAN examples earlier.
In the screenshot below Reverse Display Order is ticked and I have clicked on the Last column header (highlighted) and all columns are alpha sorted left to right.
PlaceList.png
PlaceList.png (18.83 KiB) Viewed 11581 times
The mouse scroll wheel does scroll the list up/down, even while the Ctrl key is held down and entries selected with left mouse click.

With Reverse Display Order not ticked, clicking on Part 3 (or Part 2) column header gives:
PlaceList2.png
PlaceList2.png (20.29 KiB) Viewed 11581 times

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 12:34
by davidm_uk
I think it gets confused where there are blanks in a Place field. This is reverse sort ticked, sorted by 2nd Last. It hiccups on the 5th Last:
FH Place Sort.JPG
FH Place Sort.JPG (93.62 KiB) Viewed 11569 times

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 13:12
by ColeValleyGirl
I'm seeing the same as davidm_uk -- I have lots of spaces at various positions and can't get it to work usefully either.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 13:28
by davidm_uk
I've taken to exporting my Place Names to an Excel file, then using that to sort (and filter). Bit of a faff but it works. Useful when entering place names in Ancestral Sources, so I can get the field structure consistent with what I have in FH.

Once upon a time I'm sure AS used to lookup the Place Names in FH and offer an autocomplete (like FH does). Maybe it was AS's predecessor.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 13:44
by ColeValleyGirl
AS does do an autocomplete, but it's much less useful if you've combined address and place in one field as I have. (Bit of topic drift here -- Mike will tell us off soon).

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 13:51
by tatewise
Agreed. Once it encounters a blank column part, it doesn't consider any further columns, so for those entries the order is random.
There is no logical reason for that behaviour, and should be reported as a bug to Calico Pie.

AS does lookup FH Place names and auto-complete, just like FH does. It does the same with Address fields too.
Where is it not working?

A solution to sorting Place names (but not Addresses) is to create part columns in the Records Windows Places tab.
i.e.
Part 1 is =TextPart(%_PLAC.TEXT%,1)
Part 2 is =TextPart(%_PLAC.TEXT%,2)
and so on...
Then in the Records Window click on the column headers in the reverse sequence of desired sort keys.
e.g.
For normal sort, click on Part 5, Part4, Part 3, Part 2, and finally Part 1.
(Which is essentially the same as clicking on the Place Records column header.)
For a reverse sort by country, then county, etc, click on the columns starting at Part 1 through to Part 5 or whatever is the last part.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 14:39
by davidm_uk
It still gets confused by empty Place fields (clicking in order P7,P6,P5,P4,P3,P2,P1):
FH Place Sort1.JPG
FH Place Sort1.JPG (89.25 KiB) Viewed 11543 times

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 15:11
by tatewise
So it does, sorry, another report to Calico Pie.
BTW: I think you actually clicked P1 through P7 and have them set to sort Descending which is reverse alphabetic.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 19:08
by Ron Melby
tatewise, you can, but not as an index.

that is in Key(7,6,5, 4,3,2,1)

now,

here will be my address fields:
company, addr, city, st, zip, USA
or
company, addr, city, NO, zip, NOR (Norway this example, but similar)
and the like for places that do not have states.

the places:
city, township, county, state, USA
so like
Mazeppa, Mazeppa, Wabasha, MN, USA
or
Bethersden, West Ashford, Kent, EN, GBR (England this example, but similar)
for places that do not have states.

many blanks as in ,b, not ,nil, in that file, although there will be nil sort of typos, and it loses its mind on all of them,
in fact, it loses it on non-blanks
AUS, AU........who cares, so when I sort reverse, from last to first knowing I have 4 AUS records, when I go last, there are four, sort the next field, 3 then something else, then AUS, again, now, once I sort Last, it should remain sorted, and sort downstream, it doesnt according to any sort I can think of. That is what I am and have been saying here.

I dont mind the drift, to see anything PLAC and ADDR in one thread is useful to me, less scattered than looking across 150 threads for dealing with PLAC and ADDR since it takes up the bulk of mine and I should think all others time in genealogy.

So, if it does not offend some forum god, I am for it up to my knees, to drift around PLAC and ADDR and if it does. It is a exemplar pity.

in view of this, either in query, or in plug in (I am betting gotta go plug in) lets say, if , more than 5 comma separated values are greater than blank in either a PLAC or ADDR record, I want to bring it up on a screen (you know why tatewise, I have inconsistencies in my PLAC and ADDR records.) <<<<<and that is the next big push now that I know the small set of and have consistent UDF fields. (sick of working on UDFs)

If you think it belongs in plugin, or if you think it can be done with query, let me know, and I will start a separate thread on that, in the proper forum.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 20:19
by tatewise
Sorry Ron, but I still don't understand what you can't do.
What do you mean by an Index?

In the Place List click on Last header, and all other columns downstream to the right sort automatically within their group.
That is all I did to get my screenshot - one click on Last.

So your 4 AUS records will sort together in Last column, and the downstream columns are sorted without further clicks.

The exception, as David pointed out, is that blank columns inhibit the downstream flow or sorting.
(blank columns are those only white space or no characters between the commas, i.e. , , and ,, are blanks)

Please post screenshots to illustrate your problem because I cannot visualise what effect you are getting.

David, assuming all you want is a reverse sort from Country through County, Town, Street, etc, especially if you use standardised column parts, then the following Column Expression will work with one click.
=Text(TextPart(%_PLAC.TEXT%,7) . ", " . TextPart(%_PLAC.TEXT%,6) . ", " . TextPart(%_PLAC.TEXT%,5) . ", " . TextPart(%_PLAC.TEXT%,4) . ", " . TextPart(%_PLAC.TEXT%,3) . ", " . TextPart(%_PLAC.TEXT%,2) . ", " . TextPart(%_PLAC.TEXT%,1))
i.e.
It compiles the parts in reverse order with comma separators, and that then handles all the blanks correctly.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 20:22
by jimlad68
The last entry on this post has a couple of queries that might help normal sorting.
Place List (15376)

I store my PLACes in Highest order first with strict comma separation e.g.

England, , Greater Manchester, Bolton, Westhoughton:Chequerbent, Brancker Street, 51
England, , Lincolnshire, Lincoln
England, , North Yorkshire, Richmondshire, Leyburn, Market Place, , Bolton Arms, DL8 5BW
USA, New York, New York, Manhattan, , 10th Avenue, 1000, St Luke's; Roosevelt Hospital

In consequence my places sort 'out of the box' even street numbers; easy peasy.

I should add it can create problems if external compatibility is required, but Mike's Plugin Rearrange Address and Place Parts soon sorts that out.

It's like many sorting problems; e.g. date, if you use the ISO date of yyyymmdd, sorting is easy, if you use UK ddmmyyyy or even worse the USA mmddyyyy it is a nightmare. So, spend time up front designing your data structure to save time and confusion later.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 20:44
by Ron Melby
In the Place List click on Last header, and all other columns downstream to the right sort automatically within their group. <<<< (no, they dont.) but lets pretend they do.

its pretty easy tatewise, anyone can understand it.

lets say there are 7 columns.

, , , , , ,
a,
a,a
a,a,a,
a,a,a,a
a,a,a,a,a,
a,a,a,a,a,a
.
.
.
z,z,z,z,z,z,z
and so on. You know,--alphabetical across the index. a common method of keeping track and organization of data on computer systems.

if you meant the other,
lets say:
112 High Street, Bethersden, , Kent, EN, ENG
this has 5 or greater comma separated values in the ADDR or PLAC record, (that number, as well as whether in ADDR or PLACE needs to be configurable) make the result row, that is gettable by property box.
so I would say in some query or plugin. nonblank values: 5. record: Place. Make the list, go to the record, fix it.

So, I see what has to be done, I will need to revamp the query.

Mouse scroll wheels, didnt they become extinct about windows 95? So, no.

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 21:29
by tatewise
Ron, it is no good saying its pretty easy, because I still don't understand your problem.
(Does anyone else understand and can explain the problem?)
You claim the downstream columns don't sort - so post a screenshot example please.

If you are not talking about mouse scroll wheels (every mouse I have has one) then what are "the roll keys" you say become inoperable?

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 21:44
by Ron Melby
arrow down, arrow up

Re: PLAC and ADDR Records; Sorting

Posted: 24 Jan 2018 22:02
by Ron Melby
yup, pasted the screen, no screen appears here, I aint going to zip and crap and have it too big, to much crap.

SWE Sweden (likely Alsvacka Parish)
SWE Sweden Varmland

.
.
.
USA AZ Gila Globe 610...
USA AZ Gila Globe
USA AZ Gila Young
USA AZ Gila Globe Globe Cemetery
USA AZ Gila Globe 328...

Are a couple examples.

Re: PLAC and ADDR Records; Sorting

Posted: 25 Jan 2018 10:21
by tatewise
Ron, see the guide here info:forums#posting_topics|> Posting Topics for Attachments.
If you can't post details to help us understand your problem, then we can't suggest solutions.
I have entered what I think are your USA, AZ, Gila, ... Place names and one click on Last sorts them OK:
PlaceListUSA.png
PlaceListUSA.png (15.97 KiB) Viewed 11375 times
In the Records Window Places tab using the Column Expression posted earlier the sort is OK:
PlaceRecordsUSA.png
PlaceRecordsUSA.png (8.28 KiB) Viewed 11373 times

Re: PLAC and ADDR Records; Sorting

Posted: 25 Jan 2018 12:28
by Ron Melby
sort.png
it never ceases to amaze me how people go out of their way to misunderstand, and don't know how the alphabet works.

Bethersden comes before Ebony even in your alphabet, oi?

Re: PLAC and ADDR Records; Sorting

Posted: 25 Jan 2018 13:19
by tatewise
Ron, your screenshot at last explains everything.
As was stated by David on Wed Jan 24 "it gets confused where there are blanks in a Place field".
See his screenshot that illustrates the same problem as your screenshot. Did you see and understand that??
Downstream from the blanks, the columns are NOT sorted, which is a bug to be reported to Calico Pie.

BTW: I see that the 4 AUS and 2 CAN cases you mentioned earlier are sorted OK, but the USA, AZ, ... cases are not shown.

You say "it never ceases to amaze me how people go out of their way to misunderstand, and don't know how the alphabet works." but you never mentioned the blank entries.
It never ceases to amaze me how people go out of their way to ignore postings that explain their problem.

A workaround is to use the Records Window Places tab with the Column Expression posted earlier:
=Text(TextPart(%_PLAC.TEXT%,7) . ", " . TextPart(%_PLAC.TEXT%,6) . ", " . TextPart(%_PLAC.TEXT%,5) . ", " . TextPart(%_PLAC.TEXT%,4) . ", " . TextPart(%_PLAC.TEXT%,3) . ", " . TextPart(%_PLAC.TEXT%,2) . ", " . TextPart(%_PLAC.TEXT%,1))

Then the records can be sorted using either the Place Records column or the Reverse Place column depending which order is required and blank entries are handled correctly.

(If another specific order is required then just swap the TextPart digits around in another column expression.)

Re: PLAC and ADDR Records; Sorting

Posted: 25 Jan 2018 13:28
by Ron Melby
I saw it. yet you have constantly maintained it sorts correctly. It does not.

I have done some more sloshing around, and there exists an additional problem.

if it runs into (and the editor does not help with this at all in FH, because it doesn't correct them or show them correctly all the time...

(in LUA style for clarity)

nil, , , , USA

nil, , Clarence, Calhoun, MI, USA

and so on, scattered throughout the list, it fain loses its mind on anything, randomly after that.

the edit function does not always (in fact rarely) show correctly

b, , , , USA <<< because it doesnt show correctly here either
, , , , USA is how it shows mostly. it does good on a merge however showing:
<blank> ...
and
...

etc when you can find them, but they are not always visible.