Nayana
Nayana

Reputation: 1

In oracle apex how to navigate to different pages from link column depending on another column data

I have a table with multiple columns in that one column have data like text field in that data is either A or B and another column is of link type link is getting fetched by id column, Now I have a situation by comparing the data in column1 if it's 'A' I want to navigate to page 3 and If it's 'B' I want to navigate to page 4 by click of link column. How to achieve this?

Upvotes: 0

Views: 1527

Answers (2)

Shivanand Patil
Shivanand Patil

Reputation: 1

  1. You need to create Dynamic action on Button. Button -> True -> Action := Execute server-side-code
  2. Settings -> language := PLSQL

FOR PLSQL QUERY enter image description here

3)Items to Submit = P7_NEW,P7_NEW_1 4) Items to Return = P31_URL

This will create URL and Trigger the URL to next page

Upvotes: 0

Littlefoot
Littlefoot

Reputation: 142705

It would probably be easier for us if you actually shared table and its contents instead of describing it; moreover, as you wrote it as a single sentence with no punctuation, it is difficult to understand what you want to say.


The way I understood it, table is used as a source for some kind of a report (interactive or classic?). One of its (reports) columns is used as a link to another page. As link depends on column's value, I suggest you use a case expression and compose link to target page.

I don't know how you are creating the link now, but - if you already don't use it - have a look at GET_URL function which does most of the dirty job for you. In its simplest appearance, you'd just

select id,
       apex_page_get_url(p_page => case when column1 = 'A' then 1
                                        when column2 = 'B' then 2
                                   end) as link
from ...

Upvotes: 1

Related Questions