This article explains how to update values into the in a database table for a column and display on the them in a Confluence page using Run Self-Service Reports for Confluence and SQL for Confluence apps.
Instructions
Insert a Run with a user form and parameters macro macro in a Confluence page and provide field values for to the form by editing the the Run macro macro as shown below screenshots:
Insert SQL macro in a Confluence page and write enter an update query in the SQL macro body as shown in the below example:
Code Block theme Midnight UPDATE BI_SUPP SET [Status] = @status,'notes' = 'notes' + @notes FROM BI_SUPP WHERE PkTaskId = @pttaskid
Insert another SQL macro and write enter a select query as shown below to get the output of the above update query from previous step:
Code Block theme Midnight Select pkTaskID, Status, Notes FROM BI_SUPP;
- Add the above two SQL macros inside from the step 3 and 4 into the Run macro body as shown in the below screenshot and save the Confluence page.
- Provide the field values for the fields as shown below:
- Click Run to display the macro results.
Info |
---|
This example is from the SQLServer database. |