2 Replies Latest reply on Feb 27, 2019 2:01 PM by Leo Stalder

    Web Source Modules and Interactive Report

    Leo Stalder

      Hi everyone

       

      Versions:

      Oracle DB Standard: 12.2

      APEX: 18.1

      ORDS: 3.0.12

       

      I have a Web Source Module, which collects data from an already existing Oracle REST API, configured over the ORDS in the SQL Developer.

      The handler returns static 10 rows.

      Query:

      select sb.TABELLE, sf.FELD, sf.FELDPROMPT, sf.FELDWERT, sb.DATUMZEIT, sb.MODULNAME

      from scopebasis sb

      inner join scopefeld sf on sb.zeilenr = sf.zeilenrscb

      where sb.benutzer = :mitarbnr

      order by sb.datumzeit desc

      FETCH FIRST 10 ROWS ONLY;

       

      Response:

      {

          "items": [

              {

                  "tabelle": "MODULTOSCA",

                  "feld": "TOSCAICON",

                  "feldprompt": "Icon",

                  "feldwert": "einkauf",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T12:03:11Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULTOSCA",

                  "feld": "APPL",

                  "feldprompt": "Applikation",

                  "feldwert": "E",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T12:02:49Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULTOSCA",

                  "feld": "TOSCAICON",

                  "feldprompt": "Icon",

                  "feldwert": "einkauf",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T12:02:49Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULTOSCA",

                  "feld": "MODULNAME",

                  "feldprompt": "Kurzname",

                  "feldwert": "E235",

                  "feldwert_bez": "drucken Lieferanten-Mahnungen",

                  "datumzeit": "2019-02-12T12:02:49Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULSPRUNG",

                  "feld": "MODULNAME",

                  "feldprompt": "ist enthalten in",

                  "feldwert": "X310",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T12:01:26Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULSPRUNG",

                  "feld": "MODULNAME",

                  "feldprompt": "ist enthalten in",

                  "feldwert": "S300",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T12:01:25Z",

                  "modulname": "M720"

              },

              {

                  "tabelle": "MODULAUSFUEHRUNG",

                  "feld": "DRUCKPROZESSID",

                  "feldprompt": "ID des Jobs",

                  "feldwert": "194328",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T09:15:52Z",

                  "modulname": "M782"

              },

              {

                  "tabelle": "MODULAUSFUEHRUNG",

                  "feld": "KSTKTR",

                  "feldprompt": "Firmanr",

                  "feldwert": "444",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T09:15:52Z",

                  "modulname": "M782"

              },

              {

                  "tabelle": "MODULAUSFUEHRUNG",

                  "feld": "MODULNAME",

                  "feldprompt": "interne Kurzbezeichnung des Moduls",

                  "feldwert": "E235",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T09:15:52Z",

                  "modulname": "M782"

              },

              {

                  "tabelle": "MODULAUSFUEHRUNG",

                  "feld": "SPRACHE",

                  "feldprompt": "Sprache",

                  "feldwert": "D",

                  "feldwert_bez": null,

                  "datumzeit": "2019-02-12T09:15:52Z",

                  "modulname": "M782"

              }

          ]

      }

       

      The Report does now following:

      He executes the request endless times and just list the responses  among each other...

      How can I stop him from doing that?

       

      Second question:

      The Report always adds a "?limit=51"in the end of every Request... I don't want that actually, we have our own logic to do the pagination.

       

      I would be super grateful for everything what brings me a bit forward...

      Thanks and best regards

      Leo

        • 1. Re: Web Source Modules and Interactive Report
          Carsten Czarski-Oracle

          Hi Leo,

           

          the report adds the ?limit=51 because you created the Web Source Module as type "ORDS". That leads to APEX leveraging standard ORDS pagination and filtering:

           

          -) ORDS allows to request a specific set of rows by appending ?offset=X&limit=Y to the endpoint URL. APEX uses that to fetch exactly the rows which are needed for the Interactive Report

          -) ORDS allows to pass a JSON filter as the request body or as the "q" URL parameter. APEX will translate IR end user filters to that syntax.

           

          So if you go with your own pagination, you cannot use the Web Source Module type "ORDS" any more.  You will have to go with "Simple HTTP".

           

          However, my question would be why you're running your own pagination. When using ORDS pagination, APEX can fully leverage that and you don't have to bother with pagination any more - even is multiple HTTP requests are needed to get the full set of data, APEX will transparently execute the required HTTP requests. However, that can only work for a pagination scheme which APEX understands - e.g. the ORDS pagination scheme. As of today, APEX does not understand custom pagination schemes - we plan support for those in a future release ...

           

          I hope this helps

           

          Best regards

           

          -Carsten

          1 person found this helpful
          • 2. Re: Web Source Modules and Interactive Report
            Leo Stalder

            Hi Carsten,

             

            thank you very much for your help! The problem is solved with using "Simple HTTP".

            The reason why I use "FETCH FIRST 10 ROWS ONLY" is because the user is just allowed to see the last ten entries. It has nothing to do with pagination.

             

            Thanks and best regards

            Leo