Skip to main content

Posts

Showing posts from July, 2020

Adding custom quick filter to Interactive Grid column

When we click on IG column header and if filtering is enabled for that column, then depending on column type, quick filtering "options" (distinct values or date filters) will be displayed. In a recent demo, one of the users has asked, is it possible to show any control to quickly filter for rows having no value for the selected column, like "(Blanks)" filter in Excel. First thing that came to my mind was to use COALESCE for nullable columns and display "(Blanks)" text instead of NULL. This works well for string columns, but not for columns with DATE or NUMBER types. Also, if we use this approach, we need to ensure "(Blanks)" text won't be displayed in downloaded files. We can solve our problem if we Somehow add new "control" in column header menu Apply "Is Empty" filter, preferably using JavaScript, when user selects/clicks new "control" When we click on column header, then APEX appends dynamic DIV element with I...

Oracle APEX - Few Interesting Points

In this blog post, I am going to touch upon few interesting points I have discovered in my Oracle APEX journey. If you are new to Oracle APEX development, you may find this blogpost useful. PL/SQL Expression vs SQL Expression APEX offers us several condition types for server-side conditions. However, there are two condition types which looks almost same. They are "PL/SQL Expression" and "SQL Expression". So, are there any differences between these two condition types or are they actually same? Here is simple definition for these condition types, in my own words. PL/SQL Expression: As the name says, any condition which evaluates to TRUE or FALSE and which can be used as condition with IF statement in PL/SQL can be specified as "PL/SQL Expression". SQL Expression : Similarly, any condition which evaluates to TRUE or FALSE and which can be used in SQL Query can be specified as "SQL Expression". However, there are few "PL/SQL Expression" c...

Interactive Grid - Conditional Enable/Disable

In this blogpost, I am going to discuss few approaches using which we can conditionally enable/disable Interactive Grid (IG) column(s) based on other column(s) values. Note:    There is a bug  30801170  in APEX 19.2/20.1 with respect to "enable/disable" dynamic actions for IG columns. Workaround for this bug is provided at the end of this blogpost . This bug has been fixed in APEX version 20.2. Client Side Only Conditions If conditions to enable/disable are simple, then we can check those conditions easily on the client side. For e.g. let's consider IG on EMP table with following SQL Query. SELECT EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO FROM EMP Let's consider the requirement as - Enable "Commission" column only when JOB is equals to 'SALESMAN' and disable "Commission" column in all other cases. This can be done declaratively using dynamic actions (DA) DA "Enable/Disable Commission - 1" Create DA and give it a prope...