Announcement

Collapse
No announcement yet.

Show/Hide records button based on condition (flag)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show/Hide records button based on condition (flag)

    I have a grid listing employees. Each employee has an active status ('Y' or 'N'). When the app starts I have it filtered where active='Y'. I would like a button in the top toolbar when on click show the employees where active='N' as well as active='Y'. Pretty much, I need the button to cancel out the filter in the main sql statement. I'm sure this can be done but I don't know where to start or which macros would be best for this. I've tried using the check for existing record in the button statement, and I tried using the example "Grid23 - Changing where clause dynamically". All I get is an OK button. It's probably something easy but I'm not seeing it.

  • #2
    Just add a button and put some filter php on it i.e. to fill a global variable with a where clause. Alter the sql using the global variable. Then do a sc_redir to the same application.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment

    Working...
    X