How to input data in a form and update database using the Run Self-Service Reports for Confluence app

This article explains how to update your database with values taken from a form using the Run Self-Service Reports for Confluence and SQL for Confluence apps.


  1. Make sure that database connection is successful using the SQL for Confluence app.
    1. Log into your Confluence instance as an Administrator and navigate to Cog wheel ()  > Manage apps.
    2. From the left sidebar, select the SQL for Confluence app > View and modify data source profiles tab and ensure that connection to the database is successful.

  2. Insert an SQL macro nested in a Run with a user form and parameters macro.
  3. Enter a query as required in the SQL macro. In the following example, the query updates the existing information of the persons table (the entries in the form must match the field list):
  4. Edit the Run with a user form and parameters macro and click Add my first field in Field settings.
  5. Select the Field type and add the Field key. Here, specify the Field key from the field list as per the query mentioned in step 3.

    Refer to this page for more information about field types.

  6. To enter more than one field, click Add field.

  7. Save the macro settings and publish the page.

  8. Enter the required details and click Run. As per the query and the details entered in the form on the Confluence page, changes are made to the database.

Any text in the SQL macro body that begins with $ immediately followed by a Field key from Run with a user form and parameters macro is replaced by the values provided in the form.