Search code examples
dynamicoracle-apex-5

In oracle apex, if the value of Upload Status column is NEW, then the Edit Button icon should be disabled


In oracle apex, if the value of Upload Status column is NEW, then the Edit Button icon should be disabled in Interactive Report. I am aware that some dynamic action has to be added. The name of my table is intg and it has a column named upload_status. If the value of it is NEW then I should not be able to edit that record.


Solution

  • From my point of view, the simplest option is to disable link column in Interactive Report's attributes and create your own link as part of the select statement. Something like this:

    select case when upload_status <> 'NEW' then
                     '<img src="#IMAGE_PREFIX#ed-item.gif" border="0">'
           end as link_icon,
           id,
           name,
           whatever
    from your_table;
    

    As the link_icon column contains HTML tags, you'll have to set "Escape special characters" to "No" for this column (otherwise you'll actually see the tags instead of the icon).

    Then, in column's properties, set its type to "Link". Edit "Link" section and set it to navigate to another page in this application (you know which one, and which parameters to pass).

    That should do it.