Skip to main content

Posts

Showing posts from 2019

Filtering in the APEX Interactive Grid

Remember Oracle Forms? One of the nice features of Forms was the use of GLOBAL items. More or less comparable to Application Items in APEX. These GLOBALS where often used to pre-query data. For example you queried Employee 200 in Form A, then opened Form B and on opening that Form the Employee field is filled with that (GLOBAL) value of 200 and the query was executed. So without additional keys strokes or entering data, when switching to another Form a user would immediately see the data in the same context. And they loved that. In APEX you can create a similar experience using Application Items (or an Item on the Global Page) for Classic Reports (by setting a Default Value to a Search Item) and Interactive Reports (using the  APEX_IR.ADD_FILTER  procedure). But what about the Interactive Grid? There is no APEX_IG package ... so the first thing we have to figure out is how can we set a filter programmatically? Start with creating an Interactive Grid based upon the good old Employ

Caution when using Suppress Change Event on an Interactive Grid Column

There are some, maybe rare, use case when you want to set the " Suppress Change Event " switch of a Dynamic Action to " Yes ". Usually that's only necessary when the Dynamic Action is fired On Change  and executes a Set Value  with the same field as a target. There might be a chain of events leading to this or just one. If you forget to set it you'll end up in an endless loop and your browser will choke. That works all fine and as expected with regular Page Items. However ... when you apply this to a column in an Interactive Grid something unexpected happens. When you set the Suppress Change Event of a Dynamic Action that fires on change of a column to Yes , the value of that item seems empty when you leave that field (column)! If you navigate back into that field, the (new) value does show up... You can call it a feature, you can call it a bug, but bottom line it is unexpected and undesired behaviour. The solution is to call the Grid method SetActiv