Use the Relational Database Query in the Designer

This topic describes how to apply SQL queries to a page.

Procedure

  1. In the main navigation menu, select APPS.
    The APPS workspace appears, displaying a list of applications created in Operations Hub.

  2. In the Name column, select the application in which you want to create a page.
    The PAGES workspace appears.

  3. Select Add new page.
    The Create Page screen appears.

  4. Enter or select values as described in the following table.
    Field Description
    Page name Enter a name for the page. The name must contain at least one uppercase or lowercase letter.
    Page description Enter a description for the page.
    Include in app navigation Select this check box if you want this page to be included in the application navigation. By default, this check box is selected.
  5. Select Create.
    The page is created, and the page designer appears.

  6. Select Page Data.
  7. To add a Relational Database Query to the page, do the following:
    1. Select the flow type as Query.
    2. Select the Data source type as Relational Database.
    3. Select the required data source.
    4. Select the required query.
    5. Select a result set.
    6. Select Add.
      The query with sub-selected result set will be added to the page. The naming convention will be QueryName - ResultSetName. Inputs and Outputs are assigned to components exactly like that of REST and Entity pages.
    • Applies to Operations Hub 2022 and earlier versions:
      • For SQL queries with multiple result set, if a result set is added to the page, you cannot add that result set multiple times with different inputs to the same page. You need to create a separate query each time you want to add that result set to the page.
      • In case a SQL query with multiple result is added to the page, the inputs and query execution options (check boxes for auto-submit, auto-update, etc.) appear only for the first added result set. Only outputs appear for result sets added subsequently. The selected inputs and query execution options for the first result set apply to all the query result sets.
      • For a query with single result set, you can add it multiple times to the page. But, if the same query output is changed to contain multiple result sets at a later time, then you must remove the second instance of the query before adding the new result set.
    • Applies to Operations Hub 2022.4.1 and later vesions: Every ResultSet in a query is an independent query (inputs and query execution options appear for every result set). This new behavior does not impact the existing apps and queries (created in earlier versions).
    Note: As of Operations Hub 1.7, The inbuilt pagination and infinite scrolling for Grid and Table components will not work with Relational Database Queries. The pagination must be handled using the input and output parameters of the stored procedure.
  8. Select Save App.

    An example is shown in the following figure.

    The changes made to the page are saved.
    Note: View the Page in the End app, by clicking Open App button.