3 Replies Latest reply on Mar 29, 2013 4:48 PM by fac586

    Help with passing parameters in select lists

    Ryansun-Oracle
      4.2.1

      Hi,

      I have two pages, a select list in each. P1_TIME and P2_TIME.

      P1 page has a report with counts. which is hyperlinked using standard link column attributes. In that I am passing P1_TIME and populating P2_TIME with the value of P1_time

      now both lists have values 1 day, return 1, 10 days (return value 2)

      So although the select shows 1 day and 10 days in the list it returns 1 and 2 respectively. I then use the value of :P2_TIME in the report on page 2.

      This works fine except for the fact that when I pass the value from P1_TIME to P2_TIME, it passes the "return value" which is then visible in the P2_TIME select list.

      So P2_TIME then has three values,

      1 day, 10days and 2 If I have passed 10days from P1_TIME)

      How can I avoid this? I was hoping to set the P1_TIME to 10days and the underlying report in that page will take the return value 2 and use it in the sql.

      Any suggestions please?

      Thanks,
      Ryan
        • 1. Re: Help with passing parameters in select lists
          Howard (... in Training)
          How about, in one of the header processes, set P2_TIME back to it's description value.
          Begin
            IF :P2_TIME = '1' THEN
               :P2_TIME := '1 day';
            ELSE
               :P2_TIME := '10 days';
            END IF;
          end;
          Would that work?

          Howard
          • 2. Re: Help with passing parameters in select lists
            Nattu
            Hi,

            If I understand your requirement correctly, You need to pass the value of :P1_TIME to :P2_TIME and let the user to select the value of :P2_TIME again?. Are you using the same LOV for both the select lists (:P1_TIME and :P2_TIME), if it is the case, the second select list :P2_TIME show only these to values but to set the value 10 Days (Return value 2) as selected. It must be some thing wrong with your lov for the second list, check again. Also, for the select list page control, there is an option "Show extra value", set it to No, it wont show any extra value.

            If still you have issue, produce this issue in apex.oracle.com and let us know.

            regards,

            Natarajan
            • 3. Re: Help with passing parameters in select lists
              fac586
              ryansun wrote:
              4.2.1

              Hi,

              I have two pages, a select list in each. P1_TIME and P2_TIME.

              P1 page has a report with counts. which is hyperlinked using standard link column attributes. In that I am passing P1_TIME and populating P2_TIME with the value of P1_time

              now both lists have values 1 day, return 1, 10 days (return value 2)

              So although the select shows 1 day and 10 days in the list it returns 1 and 2 respectively. I then use the value of :P2_TIME in the report on page 2.

              This works fine except for the fact that when I pass the value from P1_TIME to P2_TIME, it passes the "return value" which is then visible in the P2_TIME select list.

              So P2_TIME then has three values,

              1 day, 10days and 2 If I have passed 10days from P1_TIME)
              This suggests that "2" is not a value defined in the P2_TIME LOV.
              How can I avoid this? I was hoping to set the P1_TIME to 10days and the underlying report in that page will take the return value 2 and use it in the sql.

              Any suggestions please?
              What are the LOV definitions for the 2 items? How are these values used in the report SQL?

              As these select lists use the same values they should be based on a common LOV defined in Shared Components, such as
              STATIC2:1 day;1,10 days;2
              (Although I would be inclined to make the return values match the duration specified, i.e. 1 and 10 rather than 1 and 2...)