This article explains how to use SQL for Confluence with Run Self Service Reports to display dynamic content on a page.
Instructions
For dynamic value substitution, you need to use $ with the field name. Write a SQL Insert SQL macro in a Confluence page and write a SELECT statement in the SQL macro settings as shown below:
Add the above query inside a runCode Block theme Midnight Select CREATOR,CREATIONDATE from SPACES WHERE SPACEID='$Space Id' AND SPACEKEY='$Space Key';
Info For dynamic value substitution, you need to use $ with the field name.
- Insert another macro: Run with a user form and parameters macro and provide and add the above SQL macro inside this Run macro.
- Provide field values for the form by editing the run Run macro as shown below screenshot:
- Provide the values for the fields as shown below and click on run button and result of the macro with get displayed.
: - Click Run to display the results.
Info |
---|
This example is from the SQL Server database. |
...