NetTalk Central

Author Topic: Locate and Sort question  (Read 4700 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Locate and Sort question
« on: July 22, 2015, 09:23:29 AM »
Hi All,

I was wondering why when you do a locate and then want to sort what you just retrieved it clears the sortation.

I do not see any way to break this behaviour in the browse settings to have them run independantly. The only thing I was able to do is turn sorting off for the entire browse.

Any thoughts?

Ashley

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Locate and Sort question
« Reply #1 on: July 22, 2015, 10:23:43 PM »
clears the _sorting_ or clears the _filtering_ ?

Can you walk me though an example which shows this behavior?

cheers
Bruce

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Locate and Sort question
« Reply #2 on: July 23, 2015, 02:04:40 AM »
Hi Bruce,

When a user types anything in the search entry field and presses the search button the browse is filtered as expect.

But if the user clicks on any of the browse headers even the one they filtered the browse on the browse is cleared and search entry is selected.

If user types the same info in the search field it will not filter, so the user must press the clear button so it defaults to the default search column and then enter the same info once again and press search button once again.

I don't think that a sort should trigger the filtering of a browse. This should be the default behavior, maybe a check box that says "Sort Triggers Filtering On". Default is off.

See attached app.


Ashley

[attachment deleted by admin]
« Last Edit: July 23, 2015, 02:25:15 AM by astahl »

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Locate and Sort question
« Reply #3 on: July 29, 2015, 06:10:47 AM »
See attached new zip file


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Locate and Sort question
« Reply #4 on: July 30, 2015, 05:24:10 AM »
>> I do not see any way to break this behavior in the browse settings to have them run independently.

Any thoughts?
so fundamentally the sort order is linked to the locator. They are, as you say, not "separate functions". By determining the sort order you determine what column the locator is working on.

(Of course you can put the browse on a memory form, and offer the user all sorts of filter fields, which are outside the locator, but that's outside the scope of this discussion.)

Now in your example you got a bit tricky. You set the locator to work across multiple columns, so that even though the sort order changed, the "fields being located on" did not. That was pretty cunning.

So what I've done is make the class equally cunning. If you change the sort order but remain "inside" the list of fields you were locating on, then the locator is preserved. So if you set the locator across first name and last name, and then locate, then you can swap between these columns fine. However if you then sort on a field outside this list then the locator is cleared.

This is in 8.58

cheers
Brice

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Locate and Sort question
« Reply #5 on: July 31, 2015, 06:36:24 AM »
Hi Bruce,

Thanks for fixing this! It now works just as you say it will.

Ashley