5 Replies Latest reply: Dec 14, 2012 2:00 AM by VC RSS

    Disable Edit Link

    Vedant
      Dear All,

      i want to disable my EDIT link in report if it satisfy my case condition.

      i am using some code but using this i can unable and disable text link not a image link how can i disable image link like edit link in report.
      select * from (
      SELECT AP.*, CASE WHEN AP.INVOICE_STATUS='C' THEN
      '<font color ="Red"></b>Modify Invoice</b></font>'ELSE
      '<a href="f?p=&APP_ID.:58:&SESSION.:INV_ID:&DEBUG.:58:P58_INV_ID:'
      ||INV_ID||':">
      <font color =BLUE><b>Modify Invoice</b></font></a>'
      END AS Edit,(SELECT count(LINE_ID) FROM AP_SUPPLIER_INVOICE_DIST_V WHERE INV_ID=AP.INV_ID) 
      AS "NO OF LINES" ,
      (SELECT NAME FROM VENDOR_VW
      WHERE SBU_CODE=:P0_SBU_CODE AND CODE=AP.SUPPLIER_ID AND ACTIVE_FLG='Y'
      AND TYPE<>'A'
      )AS "SUPPLIER NAME" ,CASE WHEN AP.INVOICE_STATUS='A' THEN
      '<font color ="Red"></b>Add Lines</b></font>'ELSE
      '<a href="f?p=&APP_ID.:25:&SESSION.:INV_ID:&DEBUG.:25:P25_INV_ID,P25_REQ_ID,P25_INV_NO:'
      ||INV_ID ||','||'payables'||','||INVOICE_NO||':">
      <font color =BLUE><b>Add Lines</b></font></a>'
      END AS "Add Lines",
      CASE WHEN AP.INVOICE_STATUS IS NULL OR AP.PAYMENT_STATUS='P' THEN
      '<font color ="Red"></b>Quick Payment</b></font>'ELSE
      '<a href="f?p=&APP_ID.:98:&SESSION.:INV_ID:&DEBUG.:98:P98_INVOICE_ID,P98_CURRENCY_CODE,
      P98_SUPP_CODE:'
      ||INV_ID ||','||CURRENCY_CODE||','||SUPPLIER_ID||':">
      <font color =BLUE><b>Quick Payment</b></font></a>'
      END AS "Quick Payment",
      
      CASE WHEN AP.INVOICE_STATUS IS NULL THEN
      '<font color ="Red"></b>View Payment Detail</b></font>'ELSE
      '<a href="f?p=&APP_ID.:57:&SESSION.:R1:&DEBUG.:57:P57_INV_ID:'
      ||INV_ID||':">
      <font color =BLUE><b>View Payment Detail</b></font></a>'
      END AS "View Payment Detail"
      
      FROM AP_SUPPLIER_INVOICES_V AP
      How can i do this.



      Thanks

      Edited by: Vedant on Dec 13, 2012 9:42 PM

      Edited by: Vedant on Dec 13, 2012 9:42 PM
        • 1. Re: Disable Edit Link
          VC
          Vedant wrote:
          Dear All,

          i want to disable my EDIT link in report if it satisfy my case condition.

          i am using some code but using this i can unable and disable text link not a image link how can i disable image link like edit link in report.
          you can simply amend your sql to show an image instead of text like this
           select * from (
           SELECT AP.*, CASE WHEN AP.INVOICE_STATUS='C' THEN
           '<font color ="Red"></b>Modify Invoice</b></font>'ELSE
           '<a href="YOUR_LINK"><img src="#IMAGE_PREFIX#edit.gif" alt="Edit"></a>'
           END AS Edit..
          .....
          But see this thread before you continue - {thread:id=702012}

          Thanks,
          Vikram
          • 2. Re: Disable Edit Link
            fac586
            VC wrote:

            .....

            But see this thread before you continue - {thread:id=702012}
            Nice to see somebody else treating that as a valid concern ;-)
            • 3. Re: Disable Edit Link
              VC
              fac586 wrote:
              VC wrote:

              .....

              But see this thread before you continue - {thread:id=702012}
              Nice to see somebody else treating that as a valid concern ;-)
              Yes Paul it is very valid concern, Because we often see people using HTML within their SQL statements without considering its impact on the performance.

              And particularly in this thread the OP's query is based on an E-Business Suite view and the data could be massive.
              Vedant wrote:
              ....
              .......
              FROM AP_SUPPLIER_INVOICES_V AP
              • 4. Re: Disable Edit Link
                Vedant
                Dear VC,

                i have follow your code it's working fine but i wan to pass REQUEST =MODIFY i n link how and where can i pass this in hyper link.

                i have all ready pass two requets in page link.

                My link code
                case when am.INVOICE_TYPE = 'C' THEN 
                
                '<img src="#IMAGE_PREFIX#edit.gif" alt="Invoice Transfered">'
                
                ELSE
                 a href="f?p=&APP_ID.:5:&SESSION.:SBU_CODE,INVOICE_NO:&DEBUG.:5:P5_SBU_CODE,P5_INVOICE_NO:
                '||am.SBU_CODE||','||am.INVOICE_NO||':"><img src="#IMAGE_PREFIX#edit.gif" alt="Edit">
                 END AS Edit ,
                
                i want to pass MODIFY in conditon like
                
                REQUEST=EXPRESSION 1
                
                MODIFY in EXPRESSION 1
                How can i pass MODIFY as a REQUEST In page link.


                How can i do this.


                Thanks

                Edited by: Vedant on Dec 13, 2012 11:12 PM

                Edited by: Vedant on Dec 13, 2012 11:12 PM

                Edited by: Vedant on Dec 13, 2012 11:12 PM

                Edited by: Vedant on Dec 13, 2012 11:13 PM
                • 5. Re: Disable Edit Link
                  VC
                  Please see Using f?p Syntax to Link Pages

                  Include MODIFY in the position of Request
                  f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly