4 Replies Latest reply on Oct 10, 2018 2:38 PM by Becky-IT

    Create multiple clickable links in an item

    Becky-IT

      Hello!

       

       

      I'm using Apex 4.2.6.  The database is on LInux.

       

      I have a shuttle of document numbers.  The user selects one or more documents.

      To the right of the shuttle, I want to display one or more clickable links to these documents.  It cannot be a separate region.

      The following is the PL/SQL code:

       

      The tables:

      SUPPORT_AGRMNT

      ID                NUMBER

      SUPPORT_AGRMNT_NO VARCHAR2(40)

       

      TASKER_SUPPORT_AGRMNT 1 to many table

      ID             NUMBER

      SA_ID          NUMBER

      TASKER_ID      NUMBER

       

      TASKER

      ID              NUMBER

      TASKER_TYPE     VARCHAR(1)

      TASK_NO         VARCHAR2(20)

       

      In my package my_package, I created the following function.  I need to display all the links for the selected documents in the shuttle.

       

      Function report_etask_sa(p_id In Number) return VarChar2 Is

         l_return VarChar2(7000);

      Begin

         For i In (Select sa.id,

                          '<div><a href="'||g_apex_url||':5:&SESSION.::NO:5:P5_ID:'||sa.id||'">'||sa.support_agrmnt_no||'</a></div>' support_agrmnt_no

                   From   support_agrmnt sa,

                          tasker_support_agrmnt tsa

                   Where  p_id = tsa.tasker_id

                   And    tsa.sa_id = sa.id

                   Order by sa.support_agrmnt_no)

         Loop

            l_return := l_return||i.support_agrmnt_no;

         End Loop;

         return l_return;

      End report_etask_sa;

                  

      I created an item on the same row as the shuttle

      Name: P2_SUPPORT_AGRMNT_LINKS

      Display As: Display Only

      Source:

         Source Type: PL/SQL Expression

         Source value or expression:  my_package.report_etask_sa(:P5_ID);

       

      The result is the display of the actual url, not a clickable link.

       

      I do not want to use the Pre or Post Element Text as these go away in APEX 5.

      How can I make this a clickable link?

       

      Thanks so much!

      Becky