Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to input data through into a form and retrieve data it from the database using Run Self-Service Reports for Confluence and SQL for Confluence apps.

Instructions

  1. Make sure that a database connection is successful using SQL for Confluence app.
    1. Select the (Cog wheel) > Manage apps
    2. Select the SQL app > View and modify data source profiles and ensure that connection to the database is successful.
  2. Insert an SQL macro inside a Run with a user form and parameters macro:
  3. Insert the SQL statement as per the requirement. In the example below, we considered consider retrieving data from the table persons:

  4. Edit the Run macro and add Field settings:

  5. Select the Field type and add Field key. Here the Field key is considered as per the SQL statement mentioned above that is (PersonID):

  6. To enter more than one field, click on Add field:
  7. Save the Macro macro settings and publish the page.

  8. Enter the details Provide input and click RunAs per the above SQL statement and details input data entered in the form on the confluence page, data will be is retrieved from the SQL database and will be shown on the confluence page:


Info

Any text in the macro body that begins with $ immediately followed by a key will be replaced by the values provided in the form.

...