Conditional Link on Interactive Report

I'm trying to make the link column conditional on an interactive report. That is, I only want the pencil icon on the rows which have a field that is greater than 30. So, assume my query says:
select DEPT_ID, USER_LEVEL
from my_table;
I only want the link icon to appear on rows that have USER_LEVEL > 30. I tried (unsuccessfully) to get this to work by adding a condition of "Expression1 = Expression2", and I used the #USER_LEVEL# substitution string. (Note: I know this would be exactly what I want because I want the condition to be on all values > 30, but I couldn't even get this to work when I put #USER_LEVEL# in Expression1 and "30" in Expression2 and looked at the records that had a USER_LEVEL value of exactly 30).
In the end, I had to create a much more complex query like this...
select
case
when USER_LEVEL >= 30 then
'<a href="f?p=&APP_ID.:21:&SESSION.::&DEBUG.::P2_DEPT_ID:' || DEPT_ID || "><img src="#IMAGE_PREFIX#menu/pencil16x16.gif" alt="Edit" /></a>'
else ' '
end as edit_icon,
DEPT_ID, USER_LEVEL
from my_table;
This doesn't seem right to me. Can someone confirm that I'm doing this the right way?

Hi -
It really bugs me this forum has such a problem with code examples, so for a while at least I posted quick example on Google:
[Conditional Column|http://docs.google.com/Doc?id=dd2tkvv6_212dbzw2ftq]
Not to complicate too much, but if you wanted to not have empty column except one row, you could of course apply this trick to the column that actually holds the user name in your table... in other words, the user could click right on their own name to go to edit screen, but every other user name but theirs would not be a hyperlink. But that is as they say an exercise for the reader :)
Good luck.

Similar Messages

  • Display a conditional link in interactive report

    Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
    This is the sql code.
    Select
    (case
       when mytable.myvalue is not null then ('<a'||' href="'||'f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value||'">'||'<img src="#IMAGE_PREFIX#menu/download_32.gif">
    </a>')
       else null
    end) link
    from
    mytableI also tried apex_uil.prepare_url.
    Select
    (case
       when mytable.myvalue is not null then ('<a'||' href="'||apex_util.prepare_url('f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value)||'"><img src="#IMAGE_PREFIX#menu/download_32.gif">
    </a>')
       else null
    end) link
    from
    mytableAlthough it seems that is correct, instead of displaying the link, the report displays the html text of the link
    (I omitted the first *<* and the last *>* to display the text in the thread):
    value displayed a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></aI did a lot of researchs of implemented solutions, but to me always return the same result.
    I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.
    thanks
    greetings
    Edited by: diapason on Sep 8, 2011 9:09 AM
    Edited by: diapason on Sep 8, 2011 9:19 AM
    Edited by: diapason on Sep 8, 2011 9:33 AM

    >
    Welcome to the forum.
    Please read the FAQ and forum sticky threads (if you haven't done so already).
    Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
    This is the sql code.
    Ah. It looks like you've now found the instructions on how to post code...
    Although it seems that is correct, instead of displaying the link, the report displays the html text of the link:
    value displayed
    <a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></a>I did a lot of researchs of implemented solutions, but to me always return the same result.
    I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.Ensure the Display Text As report column attribute is Standard Report Column rather than the default Display as Text (escape special characters).

  • Hide logout link in interactive report

    Hi,
    Can anyone tell how to hide logout link in interactive report?
    Thanks,

    Hi,
    Sorry, I do not understand question.
    How you did get logout link to interactive report ?
    I have never seen that logout link is generated to report automatically.
    But id you go
    Home>Application Builder>Application xxx>Shared Components>Navigation Bar Entries
    and edit your logout link, you can set condition witch page you like it to be displayed or not to be.
    I think you mean that one
    Br, Jari

  • Substitution for DB link in Interactive report

    Hi,
    Is it possible to use substitution strings for DB link in Interactive report in same way like it works in Classic reports (by choosing Generic column) or in any other way.
    Currently when i'm trying to put SQL like :
    select empno, empname from emp@&DB_LINK.
    I receiving the error •Query cannot be parsed, please check the syntax of your query. (ORA-02019: connection description for remote database not found)
    APEX 4.1, Oracle 11.2

    It is possible. We have an application that uses the same code set (pages) where the user can select which target instance will be used at run time.
    The trick is that the DB link substitution variable must contain the "@" character. So your query looks like:
    select ...
    from my_table&TARGET.
    where...
    &TARGET. must be something like "@my_database" .
    At compile time, &TARGET. will be null, and the table name can be resolved, if there really is a table, my_table in your parsing schema, or a vaild synonym.
    You can have a synonym available at "compile" time, when you save the page source. For example, the synonym my_table equates to my_table@your_database, which has to exist.
    There several other things that must be done, but this should get you started.

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • How to send a conditional email with interactive report subscription

    Hi,
    i have an interactive report with subscription.
    I would like to send an email with the attachment only when the query returns one or more records.
    How to to this?
    Apex 4.0.2
    Thanks in advance
    lukx

    Well, to understand your requirements can I ask this:
    You said earlier you want a report sent whenever records that meet a criteria exist, correct? So you want the application to query for a condition, and when that condition occurs (a row with primary Key = X, a select COUNT(1) for rows with column X returns a result of 1 or more)
    Then you would schedule a batch job:
    BEGIN
    -- Job defined entirely by the CREATE JOB procedure.
    DBMS_SCHEDULER.create_job (
    job_name => 'Send_Email_Procedure',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN Test_For_COND_SEND(); END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'freq=hourly; byminute=0',
    end_date => NULL,
    enabled => TRUE,
    comments => 'Job defined entirely by the CREATE JOB procedure.');
    END;
    This would in theory run hourly and run your test_for_cond_Send process, in which you would test for the condition and send an e-mail if it was found that would contain the results from your query/report.
    Here is a link to generate a PDF report that could be sent via e-mail: Re: how to save pdf in APEX 3.0
    Thank you,
    Tony Miller
    Webster, TX
    While it is true that technology waits for no man; stupidity will always stop to take on new passengers.

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link).
    I am running Application Express 4.0.2.00.07 on Oracle 11gR1.
    Any help would be great.

    Hi VANJ,
    Sorry for the poorly written original post. I will be much more specific.
    I have a Interactive Report on page 40. That report has a column named X_UID that is a link back to page 40 and sets a text item named P40_X_UID in a Region we will call "Form X" with the value of the column. That page refresh also then calls a Automated Row Fetch process to fetch all the values needed for the rest of the page items in the "Form X" region. Also "Form X" region has a conditional display on to only display when P40_X_UID is not null.
    What I would like to do:
    When the user clicks on link in the IR for X_UID instead of the "Form X" region becoming visible I would like to become modal. I am trying to use a Plug-In named "ClariFit Simple Modal - Show". I have it working with a Dynamic Action when you click a Page Item. But I would like to to work when the link is clicked and the data populated.
    I hope that helps some.

  • What is best way to link two interactive reports?

    Hi,
    =================
    Basic Set UP
    =================
    I've created two interactive reports-- Project report in Project page and Task report in Task page.
    Project report in Project page can contain multiple projects.
    Task report in Task page can contain multiple tasks.
    One project can have multiple tasks.
    But one task can have only one project.
    =================
    What I'm trying to achieve
    =================
    When I click a Project Name, it should pass Project ID to Task page and display tasks that are pertaining to the project.
    When I create a new task, the passed Project ID should be mapped to the task.
    =================
    Challenges
    =================
    1. How can I pass Project ID from Project page to Task page while clicking Project Name in Project page ?
    2. How can I get Project Name in Task page based on the Project ID passed from Project page ?
    3. How can I display tasks pertaining to the Project Name ?
    4. How can I take Project ID passed to Task page and map it to a new task?
    Thanks,
    Guy

    1. How can I pass Project ID from Project page to Task page while clicking Project Name in Project page ?Create hidden item in Task Page, for example :P2_PROJECT_ID. Than link on required column to Task page:
    Interactive Report -> Edit Column -> Link.
    2. How can I get Project Name in Task page based on the Project ID passed from Project page ? There is two ways you can create a function that will return project name by id or you can post project name to task page (The second way is unsafe, you can miss some parts of your project name if you will have a ',' symbol)
    3. How can I display tasks pertaining to the Project Name ?In interactive report source add condition to your query, for example:
    and task_table.project_id=:P2_PROJECT_ID

  • Edit Link on Interactive Report

    I have an Interactive report with the edit link on each record to call a form. Is it possible for the edit link to show on specific records (instead of all)? I have a security requirement where the users shouldn't be allowed to edit (go the maintenance form) certain records.

    I'm not sure if u're talking about default link?
    If yes u can ignore that one and try to insert Your own image or link as ' a href=... text /a ' as Link
    in a href U can use javascript, or write page url - it should work
    and now answer about Your question - "text" can be inside decode or nvl (nvl2) function where u can combinate with all kind of sql functionality (as query) to specify when it should show text or when it should show null (when it's null U can't clisk on this.
    edit: or as Roel wrote ;) - more easier way

  • Column link in interactive report to run procedure and refresh

    I have an interactive report which displays a report based on a table. This is a summary table populated overnight from some complex spatial analysis, which takes a few hours to run. I have a requirement to allow the user to refresh one row in this table - they would do this during the day if they needed to see the most up-to-date values.
    I have a package with two stored procedures - one which does the full refresh of the table, and one which refreshes one row when PK is passed in.
    One of the columns in the table is 'last_refreshed' which is a date - this is shown in the interactive report including minutes.
    I was thinking that maybe I could include a hyperlink on this 'last_refreshed' date column in the report. When a user clicked on it, it would run the stored procedure for that row and would refresh the report.
    Any ideas on how I could do this? I've hit a bit of a dead end for now.
    Thanks

    OK, I worked it out.
    I created an application item to store a global variable.
    Then in the column attributes of the report, I set the 'last_refreshed' to be a linked column, setting target to the current page and then setting the application item global variable to be the row PK.
    Then I have a Process which runs the required stored procedure reading the application item global variable, set to run on page load.
    Sorted.

  • Display image for BLOB  Download link in Interactive Report

    I have a table containing BLOB data and am displaying the table in an interactive report. I would like to replace the "Download" text link with an icon that represents the MIME type of the BLOB, but can't seem to find a way to make the substitution. Does anyone know how to do this? Thanks.
    -Jeff

    Hey Ben,
    Thanks for the suggestion. I understand what you are saying, the problem is that when you have an interactive report that includes a BLOB and you use the built-in method for displaying a download link, it only gives you the option of using a text link. The method is outlined in the online help under:
    Home > Advanced Programming Techniques> About BLOB Support in Forms and Reports > About BLOB Support in Reports
    This is done by using the following syntax in the Number/Date Format of the column attribute of the BLOB:
    DOWNLOAD:CC_DOCUMENTS:CONTENTS:ID::MIME_TYPE:FILENAME:UPDATED_ON::attachment:View
    Where the last parameter is the link text. The only problem is that there is no option for substituting an image rather than the link text. That's what I'm trying to work around. Sorry if you new all of this already, but I wanted to explain what I've already done. Thanks for any help you can offer.

  • Control break on column displayed as link in Interactive Report

    Hi,
    If someone can help me, i'd greatly appreciate it!
    I created an interactive report - one of the columns has a link attached to url specified in the Report Attributes/ link section.
    When I use the control break feature in the gear icon, the report seems to be grouped by the url/link and not by the actual column value.
    When I remove the link from the column - all is fine and the break does work.
    This column must get displayed as a link. Is there any workaround for this problem?
    Thanks,
    Hindy
    Edited by: hindyp on Dec 2, 2009 7:33 AM

    Hi,
    I don't know the details of the procedure, but you would have something like:
    CREATE OR REPLACE PROCEDURE "print_model_change"
      v_acctnum NUMBER,
      v_model VARCHAR2,
      v_rrcode NUMBER
    AS
    BEGIN
      .. DO SOMETHING WITH v_acctnum, v_model, v_rrcode
    END;This needs to be updated to something like:
    CREATE OR REPLACE PROCEDURE "print_model_change"
      v_manager_model NUMBER
    AS
    BEGIN
      DECLARE
        v_acctnum NUMBER;
        v_model VARCHAR2;
        v_rrcode NUMBER;
      BEGIN
        SELECT ACCTNUM, MODEL, RRCODE
        INTO v_acctnum, v_model, v_rrcode
        FROM .. your report's FROM statement plus ..
        WHERE MANAGER_MODEL = v_manager_model;
        .. DO SOMETHING WITH v_acctnum, v_model, v_rrcode
      END;
    END;and followed by:
    GRANT EXECUTE ON "print_model_change" TO PUBLICto make it available
    The existing code receives all the data it would need (presumably). The updated code receives the manager_model value and, using the same FROM clause that you have for your report PLUS a WHERE clause (or, if you are using a WHERE clause in your report, change this to AND), finds the data that it needs for v_acctnum etc. After it has that data, the rest of the existing code can be used unchanged.
    Andy

  • How to disable edit link in interactive report

    Hi,
    How to disable edit(e3.gif image) link interactive report.
    Thanks,
    nr

    Hi Jari,
    Apex Version:3.2
    I created on Interactive report on emp table I have created edit link on empno using Icon5 image.
    Report Attributes>Column Attributes>Column Link.
    I can Hide the Icon5 using following script but I need to disable only. I did not get any disable() method in Jquery.
    Region Id:R812581842900385833
    $(document).ready(function() {
    var viewOnly=document.getElementById('P1_ITEM1').value;
    if(viewOnly == "0")
    $("#R812581842900385833 img").hide();
    thanks,
    Nr
    Edited by: pnr on Mar 13, 2012 6:09 AM

  • Download Link in Interactive Report isn't Showing

    I'm not sure if this is a bug or not, but I have an interactive report which allows users to download the report (under the Actions menu).
    The download formats that were used previously were HTML, Email and PDF, and it worked perfectly fine. However, I want to remove PDF as one of the options so I unchecked it... but now the Download link won't appear at all.
    Does anyone know how to get the Download link to appear again? Thanks in advance!

    If I turn on everything except PDF it works.
    Also PDF off and CSV off, still works.
    PDF off, CSV off, RTF off it works.
    Only HTML and EMAIL on, it breaks.
    HTML on, EMAIL on, RTF on it works.
    Sounds like there is a bug here and it's a matter (for now) of finding the most acceptable combination to you and your business needs.

  • Link to interactive report with filter values containing : or %

    Hi,
    I have an application written in PL/SQL. The application takes input from users, and then constructs a URL for an interactive report, concatenating the user input as filter values for the report. Sometimes, the input values contain characters such as the colon (:) or the percent sign (%). In these instances, APEX appears to ignore the rest of the URL beyond the first colon or percent sign in the filter values. For example, in the following URL, the first filter value is "Oracle Database 11g: Workshop I":
    http://abc.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_TITLE,IR_PROJECT_STATUS:Oracle Database 11g: Workshop I,Completed
    The Interactive Report displayed for this URL shows all courses whose title contains "Oracle Database 11g" -- in other words, more records are displayed than should have been if the complete set of filters were applied in the query (i.e., TITLE = Oracle Database 11g: Workshop I, and PROJECTS_STATUS = Completed).
    How should I construct the URL so that the colons (:) and percent signs (%) which may be part of the filter values are treated correctly?
    Thanks,
    Jenny

    Thanks to Joel Kallman, here's the answer:
    The ‘f’ procedure has a parameter named p_sep. This is the separator used for the arguments in the ‘p’ parameter in the call to the ‘f’ procedure. The default value for this separator is ‘:’, obviously.
    If you have data values that contain the separator, then you can use a different character for your separator (you may need to manually specify the URL instead of using the declarative link attributes of a column in a report).
    Using the pipe symbol ‘|’, I was able to take:
    http://st-curr.us.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_ROWFILTER:Database 11g: Administration Workshop I
    and change it to:
    http://st-curr.us.oracle.com/pls/apex/f?p=129|8||||8,CIR|IRC_ROWFILTER|Database 11g: Administration Workshop I&p_sep=|
    which now works.

Maybe you are looking for

  • Wow, Acrobat Pro XI crashes constantly ...

    I accidently posted this in the wrong forum, but here's my problem: Hey everyone, I work with large PDF files (sometimes 1000 page documents) and I move pages from one PDF to another sometimes.  I've found that Acrobat XI pro is terrible with it's st

  • Supplied credentials not accepted by the server and Could not validate SPNEGO token

    Hi, We have installed and configured SSO 2.0 SP02 on HP-UX system. We have exported the client policy files, root certificate from SLS and imported the same in the client PC. Then we have installed the SLC in client PC with logging enabled option. No

  • I need a replacement key for left shift, DV4 2106tx.

    This model is new and i can't find a spare key for the left shift key , the retainer broke and i can't do anything about it right now except asking for help, please tell me where and how can i get the spare key with retainers (i am also ready to buy

  • Reservation Stock In MMBE

    Hi friends, I would like to know the table in which the reservation stock has been stored.Iv checked in mard marc mbew but it does not update the quantity of reservation I also checked in rseb table but the quantity does not match with MMBE report.Pl

  • IPhone App Crystal Reports Parameters

    Hi, Is there a way to publish Crystal Reports with parameters on the iPhone App.  I can only publish reports with no parameters.  If I try to publish one with parameters, it fails to display. thanks,