2 Replies Latest reply: Apr 30, 2013 8:05 AM by Gus C RSS

    Problems With URL

    Gus C
      I have a report, that has a conditional link
      select jobid, startdate, enddate, status, 
      decode(type, 'I', 'Inventory', 'S', 'Sales', 'R', 'Receipt', 'M', 'Masterdata', type) type, 
      parameter, logid, jobtype, 
      case when type = 'I' then '<a href = ["f?p=&APP_ID.:10:&SESSION.::&DEBUG.:RP:P10_JOBID:#JOBID#"]>Inventory</a>'
                  when type = 'R' then '<a href = ["f?p=&APP_ID.:14:&SESSION.::&DEBUG.:RP:P14_JOBID:#JOBID#"]>Receipts</a>'
             else type END AAAA
      from scp_job
      where (nvl(:P3_JOB_NAME,'0') = '0' or :P3_JOB_NAME = jobid)
      order by startdate desc 
      I put a couple of [  ] brackets in the code to get it to display on the page

      The links, go to the correct page , but do not set the items with the value from the report column.
      It is probably something really obvious, but I cannot see it today.

      Gus

      Edited by: Gus C on Apr 30, 2013 5:04 AM

      Edited by: Gus C on Apr 30, 2013 5:04 AM
        • 1. Re: Problems With URL
          fac586
          Gus C wrote:
          I have a report, that has a conditional link
          select jobid, startdate, enddate, status, 
          decode(type, 'I', 'Inventory', 'S', 'Sales', 'R', 'Receipt', 'M', 'Masterdata', type) type, 
          parameter, logid, jobtype, 
          case when type = 'I' then '<a href = ["f?p=&APP_ID.:10:&SESSION.::&DEBUG.:RP:P10_JOBID:#JOBID#"]>Inventory</a>'
          when type = 'R' then '<a href = ["f?p=&APP_ID.:14:&SESSION.::&DEBUG.:RP:P14_JOBID:#JOBID#"]>Receipts</a>'
          else type END AAAA
          from scp_job
          where (nvl(:P3_JOB_NAME,'0') = '0' or :P3_JOB_NAME = jobid)
          order by startdate desc 
          I put a couple of [  ] brackets in the code to get it to display on the page

          The links, go to the correct page , but do not set the items with the value from the report column.
          It is probably something really obvious, but I cannot see it today.
          <tt>#JOBID#</tt> won't be substituted in URLs generated in the query. You have to use concatenation in this case:
          case when type = 'I' then '&lt;a href="f?p=&APP_ID.:10:&SESSION.::&DEBUG.:RP:P10_JOBID:' || jobid || '"]>Inventory</a>'
                      when type = 'R' then '&lt;a href="f?p=&APP_ID.:14:&SESSION.::&DEBUG.:RP:P14_JOBID:' || jobid || '">Receipts</a>'
                 else type END AAAA
          • 2. Re: Problems With URL
            Gus C
            Thanks again for your help

            Gus