Annotating a Database Table with Notes
Step 1: Set up the report table
To do this, simply insert at Report Table macro
Step 2: Add the reporter
Inside the body of the Report Table macro, add an SQL Reporter macro. This will query the database for any data for the report.
Step 3: Display the database fields
Below the SQL Reporter macro, add Report Column macros for any database field you'd like to output as a column in the report. In most cases, you can use injection to output the value:
Step 4: Add a column for the notes
Add one more Report Column macro after the ones inserted in step 3. Give it a title and make sure to check the "Injected" option.
Step 5: Create a Scaffolding field for the notes
Inside the body of the Report Column macro, add a Text Data macro to hold the notes. For the Name parameter, you will need to generate a unique name per row. This should ideally be based on a key value that will not ever change. In this example, let's assume there is an
id field in the row, the macro would then be:
Here we injected the row id and then appended "-notes" to the field name. This way we can create any number of Scaffolding fields for each row.
Step 6: Try it out
Save the page and Edit Contents. The Scaffolding editor should display a report of the database table with text fields next to each row. You should be able to add notes for each row and save them.