953006 wrote:Can't you set the P33_URL_ITEM page item in a on-load pl/sql process? It is difficult to give a precise answer unless I see what you are doing the page.
I would like to have a button that when clicked once, redirects the page to a URL in a new tab. The URL is based on a sql query from a dynamic action linked to the button.
I have tried to use redirect_url() in the dynamic action itself.
But it didn't work at all.
So I tried ...
1. In the dynamic action set a page item value to the url. This is Action 1 of the dynamic action.
:P33_URL_ITEM := function_that_returns_the_url;
2. Submit the page. This is Action 2 of the dynamic action.
However, the problem is P33_URL_ITEM is not set the first time (or whenever the session is cleared), so that the button has to be clicked twice in order for the page to be redirected.
Not-important question: Does anyone know how to fix it so that only 1 click is needed?
Way 3:This thread might help:
Use APEX Branch.
Important question: Does anyone know how to make the branch open the URL in a new page?