Search code examples
oracle-databaseoracle-apexoracle-apex-5oracle-apex-5.1

Oracle Apex - Losing session state when I click on hyperlink that is supposed to direct me to different page in application


I am currently working in Oracle APEX version 5.1.2. I have created an interactive grid in my application that queries data from a table stored in the Oracle database. The data being queried is just several different URLs that refer to different pages in my application. So in other words, in each cell of one of the columns in the interactive grid there is a URL.

Then on a different page in the same application, I have created an interactive report that queries all of the data from the interactive grid. One of the columns in that interactive report is set to type "Link" and the link attribute is set to #LINK#. So each cell in that column contains a hyperlink for one of the URLs stored in the interactive grid.

The problem is that when I click on the hyperlink, I lose my session state and and am redirected to the login page. When I do then login, I am directed to the page in the application that the link was supposed to direct me to. The link only works if I hard code my current session ID in the URL in the database. But I'm trying to find a suitable substitution string for the session ID so that I don't have to hard code the session ID. I have tried the substitution strings &SESSION. and :APP_SESSION and &APP_SESSION. and V('SESSION') and nothing has worked.

Does anyone have any ideas of how to achieve this so that I don't lose my session state?

Thank you in advance.

Update:

enter image description here

enter image description here


Solution

  • Apparently there is no problem with the url formed.

    Could you inspect the element and display the generated html on the page?

    I think you should not fill in the "link attributes" field, it should be blank. Click "Target" and there put the value #LINK# in the "URL" field. enter image description here

    enter image description here