NetTalk Central

Author Topic: Set Filter with Button  (Read 4756 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Set Filter with Button
« on: February 24, 2011, 07:44:39 PM »
I have a form with some buttons and a browse.

I want to set the browse's filter with the click of a button and refresh the browse.

How to?

Thanks,
Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Set Filter with Button
« Reply #1 on: February 24, 2011, 10:30:25 PM »
Hi Don,

I would go for some server-side code to change the filter, when the button is clicked, and put the equate of  the browse into the "Ïtems to be resetted" list after the server side code is executed.
The button does NOT need a URL.

To find out how tho change the filter, apply a filter to the browse and check the source code on how things are done. Just put 'DonRidley 'in the filter field and scan the source for it.

Regards
Rene
Rene Simons
NT14.14

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Set Filter with Button
« Reply #2 on: February 25, 2011, 03:28:21 AM »
Ahh..Okay.  I'm good to go on the filter itself but you cleared up my confusion when you mentioned the "items to be reset." 
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Set Filter with Button
« Reply #3 on: February 25, 2011, 03:38:20 AM »
So.... are you okay now?
I cannot give a more detailed description right now. because I haven't got my "work"computer here.

Rene
Rene Simons
NT14.14

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Set Filter with Button
« Reply #4 on: February 25, 2011, 05:23:12 AM »
Okay.  I know how to construct the filter itself.  But how do you assign the filter to a browse?  Since I have two procedures, the form and the browse.  The "send new value to server" code for the button is in the form procedure.  I guess I do not know how to identify the browse I want to filter and then assign that filter.  The reset part is pretty straight forward.

Thanks (going off of memory now to)...

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Set Filter with Button
« Reply #5 on: February 25, 2011, 06:55:52 AM »
you're thinking of it backwards.

You don't construct the filter in the form. All you do in the form is set session values, and Reset the browse.

The browse has it's own filter, which consists of Session Values.

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Set Filter with Button
« Reply #6 on: February 25, 2011, 08:19:35 AM »
Hot damn!  Thank you Bruce!  Sometimes it's hard to get out of the Win32 frame of mind.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11