-
1. Re: How to Pass Dynamic Parameter while filtering Apex5.1 interactive grid
Sven W. Feb 11, 2019 3:05 PM (in response to Giri Kothwal)What is a dynamic parameter?
A page item that is dynamically choosen (e.g. a select list) can be used in the query of an IR as a bind_parameter.
Like this
select * from emp
where deptno = :P1_DEPT_NO;
The report also needs to have this item mentioned in the "page items to submit" attribute.
Then you can refresh the report region dynamically and the new item state will be submitted from the browser to the database state, so the the new select will consider this filter.
You can trigger the reports refresh using a dynamic actions that reacts ON CHANGE of the select list.
-
2. Re: How to Pass Dynamic Parameter while filtering Apex5.1 interactive grid
Giri Kothwal Feb 11, 2019 3:09 PM (in response to Sven W.)Thanks for your reply..
but,After Generating interactive grid in apex 5.1 .
we have default filter option provided by apex .
in that filter how can i pass item value could you please suggest me?
-
3. Re: How to Pass Dynamic Parameter while filtering Apex5.1 interactive grid
Sven W. Feb 12, 2019 4:10 PM (in response to Giri Kothwal)Oh sorry, I read report, but you said grid. The url-filtering option for grids was not implemented yet. I still hope it will be there in 19.2.
The solution in the query should still work. It is not really dynamic - although you can refresh the grid with a dynamic action, when the item changes.
I'm still a little confused what you want to by dynamic. Can you explain it with a screenshot maybe?
-
4. Re: How to Pass Dynamic Parameter while filtering Apex5.1 interactive grid
Sven W. Feb 12, 2019 4:26 PM (in response to Giri Kothwal)There are ways to manipulate an interactive grid using javascript.
However this is fairly complex.
If you need to go this route , then here are a few example commands you might try out in the console of your browser.
Assuming your grid has a static id =MY_IG
apex.region("MY_IG").widget().interactiveGrid("getActions").list("actions"); apex.region("MY_IG").widget().interactiveGrid("getActions").invoke("show-filter-dialog"); apex.region("MY_IG").widget().interactiveGrid("getActions").invoke("filter-column");
The "filter-column" action is promising. It probably needs a few more options, like the column id.
-
5. Re: How to Pass Dynamic Parameter while filtering Apex5.1 interactive grid
Giri Kothwal Feb 13, 2019 6:44 AM (in response to Sven W.)Thanks a lot for your support.
Here i have taken one region name is New and i have taken one item and assigned default value is 100.
that item value should be populated automatically in value field while filtering like below .
I achieved this functionality with the following code.
var filters = apex.region("123").call("getFilters");
for (var i in filters) {
var filderId = filters[i].id;
apex.region("123").call("deleteFilter", filderId);
}
apex.region("123").widget().interactiveGrid("addFilter", {
type: 'column',
columnType: 'column',
columnName: 'SNO',
operator: 'EQ',
value: $v2('P2_NEW'),
isCaseSensitive: false,
isEnabled:true
});
Thanks and regards,
Giri.