Page 1 of 1

Several buttons, launch same browse form, set filters

Posted: Fri Dec 15, 2017 4:57 pm
by toms
Hi,

I'd like to have some buttons on "User home" to launch the same browse form but with different filters.

E.g. the frist button should set a filter "where employees.active = 1" to show only active employees
the 2nd button "where employees.active = 0" should a filter to show inactive employees
(a 3rd button should show all employees) etc.

How can I set these filters?

Re: Several buttons, launch same browse form, set filters

Posted: Fri Dec 15, 2017 5:47 pm
by admin
toms,

You can do this...
  • Clone the main BrowseEdit Form
    Change the SQL to filter out what you want.
    Redirect To... the original Form.
This will open any choice from the new Browse Form to the original Edit Form.
Untitled.png
Steven

Re: Several buttons, launch same browse form, set filters

Posted: Sat Dec 16, 2017 9:10 am
by toms
Thanks, that's a simple way to do it. I first tried passing a variable from the button to the form's sql but that just didn't work out for some reason.
However, the same technique works when opening a lookup form by setting a hash variable and using that in the form's sql.

Re: Several buttons, launch same browse form, set filters

Posted: Sat Dec 16, 2017 3:36 pm
by pierrot
toms is't working for You?
I've connected new Form to old one, but it open new Edit Form (blank without any objects).

Re: Several buttons, launch same browse form, set filters

Posted: Sat Dec 16, 2017 11:16 pm
by admin
pierrot,

You may need an update from Github - there was a fix yesterday.

Steven