I have column link in an interactive report. This column link should run an sql query which supposed to return an external URL so I want to open in a new tab/page. How can I do that?
Somehow with a dynamic action? ..but I cannot make dynamic actions for columns furthermore I should query the data from the table-column.
From my point of view, your current column link should not run any query. What it should & could do is to call a function which returns URL. Something like this:
select id, name, f_url(parameters, go, here) url --> this from some_table where ...
How to do it?
A dummy function; mine returns link to Google. Yours would return something different.
create or replace function f_url return varchar2 is begin return 'https://www.google.com'; end; /
In Apex, interactive report’s query looks like this; note the
URL column which composes a HTML tag to URL returned by the function I previously created:
select deptno, dname, loc, -- '<a href="' || f_url || '" target="_blank">click here</a>' url from dept
URL column’s properties:
- type: plain text (not a link!)
- escape special characters: No (otherwise, instead of a link you’ll see plain text)
Run the page; result is
When you click on “click here”, a new tab – with the Google search page – will be opened.