Max
Max

Reputation: 63

How can I filter an Interactive Grid based on a select list?

I have an Interactive Grid that I'd like to be able to filter based on what a user selects in a select list. That would effectively change the SQL Query and refresh the Grid I think.

Seems like a Dynamic Action would be in order, but I'm not sure exactly how to get the Grid to update the way I want (i.e. either re-run the modified query or invoke another filtering mechanism).

Basically just trying to make it easier for users to filter rather than having them have to create a filter themselves.

Upvotes: 0

Views: 2184

Answers (1)

Dan McGhan
Dan McGhan

Reputation: 4659

The first step is to create a Dynamic Action on the item driving the change (the select list). For the Dynamic Action, configure the settings as follows:

  • Event: Change
  • Selection Type: Item(s)
  • Items(s): PX_ITEM_NAME

Configure the true Action as follows:

  • Action: Refresh
  • Selection Type: Region
  • Region: select the IG region

Now, to tie the Interactive Grid to the item, go to edit the IG region and add a where clause that uses the item's value: where col = :PX_ITEM_NAME.

Finally, just under the SQL Query, look for Page Items to Submit. Be sure to put the names of any items that are used in the query and may change at run time (PX_ITEM_NAME in this case).

Upvotes: 1

Related Questions