Page 4 of 4

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 11:17 am
by crshortt
O.K.Thanks John.

Rick

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 11:42 am
by John Kirk
The number/text combination in #1 should be taken care of btw - let me know if it isn't working as expected.

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 1:47 pm
by crshortt
It appears to work now, with a couple caveats that may be unavoidable. Any row with text becomes left justified. Two different scenarios occur.

If I have a list of peaks that are in numerical sequence and I put the text in front of one or more numbers, that number or those numbers move to the bottom of the list and become arranged alphabetically by the text, but out of sequence numerically. This is on the "sort by 'custom field name' " option on the member page. On the main list, not from the member page, the same rows move to the top of the list, apparently arranged by elevation, then prominence like your default for other lists on the site.

If I put the text after the number, all remains in place as desired numerically, but the line with the text becomes left justified while all the other numbers without text remain right justified. A minor detail that only affects appearance. But if all the numbers could be left justified, it would look nicer. Either way, this option will work for what I hoped to be able to do, at least as far as conveying the desired information goes:)

But even the first scenario could be useful if it would put the rows with text at the bottom on all lists and not at the top. Such as a list of 50 peaks + 10 contenders. One could add text to move "error range" contenders on a list to the bottom of the list, like a footnote, while those with "proven" prominence, elevation, etc. would remain at their proper place on the list.

Here are links to examples so you can see for yourself. I will leave them this way until I know you have seen them, then move all text to after the numbers.

http://listsofjohn.com/PeakStats/Content/customlists.php?lid=287

I can't get the actual link for this list, so you'll have to click Sort By: Rank By Prominence
http://listsofjohn.com/PeakStats/Content/clist.php?lid=287


Thanks,
Rick

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 2:51 pm
by John Kirk
Configuring application of the sort field to handle different use cases as it currently exists is too complex.
Desired numeric vs. alpha vs. alphanumeric sorting is going to vary by user/list.

I think either of the following will more broadly address varying individual user requirements:
1) A sort order field (hidden on list displays) indicating the order to return rows in (then type doesn't matter)
or
2) A second custom field (with a sort option and option to make visible vs. not). Here a user can set the field to numeric sort order as above or use for another purpose.

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 4:30 pm
by crshortt
I like the second option! There have been times I wished for a second custom field but was hesitant to ask. Seems like that would work wonderfully though and have a lot more flexibility.

Rick

Re: Create your own Custom List

PostPosted: Wed Apr 27, 2011 6:24 pm
by John Kirk
crshortt wrote:I like the second option! There have been times I wished for a second custom field but was hesitant to ask. Seems like that would work wonderfully though and have a lot more flexibility.
Rick


Ok - I'll try to get this done in the next couple weeks - could be sooner.

Re: Create your own Custom List

PostPosted: Fri Apr 29, 2011 11:54 am
by John Kirk
I added a second custom field and unit tested basic functionality, but haven't done super-detailed testing. I'd recommend not mixing numeric and alphanumeric content and split text and integers to separate columns.
Essentially Custom Field 2 functions identically to the first custom field, and one can activate a sort on either custom field 1 or 2. I chose not to enable a hidden option for the field as that has the potential to create confusion on sorted results.

Let me know if something isn't working as expected

Re: Create your own Custom List

PostPosted: Fri Apr 29, 2011 7:57 pm
by crshortt
Awesome! I'd say you beat two weeks rather handily! I will try to check this out before I turn in. If not, I'll do it tomorrow evening.

Re: Create your own Custom List

PostPosted: Tue May 03, 2011 10:28 am
by crshortt
Just added a second field of numbers after an existing text field, using an ascending sort by the second field as the default view. Worked fine.

Rick

Re: Create your own Custom List

PostPosted: Tue Dec 04, 2012 4:38 pm
by John Kirk
I've now added an option to change the visibility of custom fields - turns out I've been finding more cases where I want to hide the ugly numeric sort order column. There was also an issue I corrected with any custom field data containing quotes not appearing in the "edit" mode for custom fields
Code: Select all
value=""text""
rendered blank instead of showing "text" to the browser - not sure if anyone ever noticed this or had a use-case for handling quotes...