How to Change Interactive Grid Rows Editable Based on The Condition

OverView

This document talks about how to change editable in the interactive grid based on the condition. We can achieve this using a simple decode method. If the condition is true then editable or else false and noneditable.

The flag for true will be ‘U’ and the flag for false will be ‘X’.

Technologies and Tools Used

The following technologies have been used to achieve the expected output.

SQL

Use Case

We can achieve this using two methods. The first method is adding decode in SQL query and the second method is add decode in SQL expression of column property.

Assume that we are having an interactive grid report. that based on the column value edit option needs work then we can use this method to achieve the requirement.

This document explains how to achieve this requirement.

Architecture

Here we are going to achieve this by adding decode in the SQL query.

Step 1:

Create the interactive grid report using SQL query.

Example:

select empno,ename,salary,decode(ename,’Raja’,’U’,’X’) edit from emp;

If employee name(ename) is “Raja” then that row can be editable or else not editable.

Step 2:

Add EDIT in the “Allowed row operations column” option of interactive grid report property.

Here we are going to achieve this by adding decode in SQL expression of the column.

Step 1:

Create interactive grid report using a table and add one more column as edit and change the column as hidden and value protected “No”.

In source set as SQL Expression and add the code “decode(ename,’Raja’,’U’,’X’);” .Set the data type as Varchar2.

Step 2:

Add EDIT in the “Allowed row operations column” option of interactive grid report property.

 

ScreenShot

Output:

Based on the Customer name field values the report region is hidden.

 

 

Recent Posts