1

I'm working on an app in Oracle Apex. I have an Interactive Report based on the following query.

SELECT NAME, DATE, '' LINK_TO_PAGE
FROM APPLICATIONS

From the above query we can see that I have 2 columns(Name, Date) from the table Applications and an empty column(Link_to_page).

For the empty column Link_to_page I have set the attributes

  • Type : Link
  • Target : Page 2
  • Link Text : Apply
  • Link Attributes : class="t-Button t-Button--simple t-Button--hot t-Button--stretch"

What I want to do is disable the button in the Link_to_page column if the sysdate is greater than the date in the Date column.

How can I accomplish this?

1 Answer 1

2

One option is to do it directly in query, e.g.

select name, 
       date, 
       case when sysdate > date then null
            else '<span class="t-Icon fa fa-box-arrow-out-ne"></span>'
       end link
from applications

(Note that date is an invalid column name in Oracle; it is reserved for datatype).

LINK column's

  • type = Link
  • Link's
    • target = Page 2
    • link text = #LINK#
    • link attributes = class="t-Button t-Button--simple t-Button--hot t-Button--stretch"

and that's it ... CASE will make sure that button isn't even displayed (so it won't actually "disable" it, as you wanted). See if it helps.

2
  • Thanks for the help. But is it possible to disable or not display the button without changing the query?
    – user9991
    Nov 25, 2020 at 8:18
  • 1
    it is more efficient to do that in your sql, otherwise you will need javascript Nov 25, 2020 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.