show table update time in oracle Apex

791 Views Asked by At

I have a scenario where I am updating an table in oracle APEX (v 20.2.0.00.20) every day. I would like to display the information in the page navigation bar at top or as a card anywhere on the page, as when the table gets updated as

"Last updated : date & time"

Is this achievable or possible in oracle APEX , could not find any documents or information related to that? Any leads would be great

2

There are 2 best solutions below

2
On

Presuming that table contains last_update_date column which is populated "somehow" - could be a database trigger, for example:

create or replace trigger trg_biu_your_table
  before insert or update on your_table
  for each row
begin
  :new.last_update_date := sysdate;
end;
/

then you'd create an item (on that particular Apex page) whose source is SQL query which looks like this:

select max(last_update_date)
from your_table

That should do it.

1
On

enter image description here

Step 1: Go to Shared components / Application Items and create one item. Call it whatever you want.

enter image description here

Step 2: Go to Shared components / Application Processes and create one and write your query to save the result into the Application Item that you created before.

enter image description here

Step 3 and final step: Add the Application Item into a new item in Shared components / Lists / Desktop Navigation Bar. You have to add a &ITEMNAME. as part of substitution string.

enter image description here

enter image description here

Also, you can use this item wherever you want because is stored in session