Giffyguy
Giffyguy

Reputation: 21302

APEX: How do I make a button set values of other items?

I have some drop-down filters for my reports.
I want to make a button to Clear All Filters when the user clicks it.

enter image description here

This button needs to:

  1. Set the values of the drop-down items to their static default values (the default is 'ALL')
  2. Submit the page? (I presume, so that the reports can reload with the new filter values)

How do you set the values of other items from a button click event?

Upvotes: 0

Views: 792

Answers (1)

Littlefoot
Littlefoot

Reputation: 143133

One option is to create a process which will set items' default values, e.g.

:P1_FISCAL_QUARTER := 'ALL';
:P1_FREQUENCE      := 'ALL';

Its (button's) default action is "Submit" anyway; just set this process to run when P1_BTN_CLEAR_ALL (if that's its name) button is pressed.

Upvotes: 1

Related Questions