Careau
Careau

Reputation: 19

Oracle apex interactive grid: add a calculated column not binded to the table

I have an interactive grid in apex, all column are linked to a database column and all works fine. But I want to have another column with extra info and NOT linked to a database column. I can't figure how to do that and if it's possible.

Case: I have a date column, but I also want a column with the operational year. Something like that.

Year   | Date  
-------|------------
2020   | 2020-05-05
2020   | 2020-01-25
2019   | 2019-08-12
2018   | 2020-07-11

The year is only as reference and I don't want to save it. In an interactive report it would be easy as adding it to the sql query, but in a grid it's another thing...

Upvotes: 0

Views: 4391

Answers (1)

Anuswadh
Anuswadh

Reputation: 552

You can add it to the query and then select query only in the column attributes. Then it will be displayed as a column but will be ignored while saving data

Help text:

Query Only Specify whether to exclude the column from DML operations.

If set to On, Application Express will not utilize the column when executing Intereactive Grid - Automatic Row Processing (DML). For example, you should exclude columns whose definitions include concatenations, inner selects, function calls, or a column in an updateable view which is based on an expression.

All columns which need to be included in any INSERT or UPDATE statements must have this option set to Off.

Note: Columns of type Display Only are also included in the Automatic Row Processing unless this option is turned On.

enter image description here

Upvotes: 2

Related Questions