This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,964 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

How can I create a custom filter to compare two columns in an interactive grid?

carkxg
carkxg ScotlandMember Posts: 15 Blue Ribbon
edited Feb 2, 2021 10:36PM in APEX Discussions

I am trying to create a custom filter on an interactive grid so that the table only shows rows where the value of column A is equal to the value of column B (COLUMN_A = COLUMN_B).

I've created a button, a dynamic action on that button, and am using the following javascript as a template which currently creates a filter on a column with a specific value:

        apex.region("emp").call("addFilter", 
                       { type       : "column" 
                       , columnType : "column" 
                       , columnName : "COLUMN_A" 
                       , operator   : "EQ" 
                       , value : "King" 
                       }); 

This successfully creates a filter for COLUMN_A = 'King'. What I want to do is change the code so that the filter is COLUMN_A = COLUMN_B. You can easily do this for interactive reports using the row filters but I don't see that this is available for interactive grids.

Any idea if this is possible?

Tagged:

Answers