Collecting and Displaying Data in a Structured Way
Overview
In this tutorial, we will use Scaffolding to create a form for a user to fill in with data. Then, we will reuse that data and display it in a structured way.
Ingredients
Add-on | Scaffolding |
---|---|
Platform | Server, Data Center |
Macros | Text Data, Date Data, List Data, User Options, Get Data |
Step-by-Step Guide
Step 1 - Create a table
create a table with 6 rows and 2 columns
fill in the table with the following data
Customer |
|
---|---|
Junior Developer |
|
Senior Developer |
|
Support |
|
Start Date |
|
End Date |
|
Step 2 - Use Scaffolding macros to create form fields
In the cell next to "Customer"
create a Text Data macro and provide a relevant name.
In this example, we used "Customer".
In the cell next to "Junior Developer”
create a List Data macro
Inside the List Data macro
add another macro by creating a User Options macro
edit the User Options macro according to your needs (groups, space(s), user(s) etc.)
Do the same as the above step for the cells next to "Senior Developer" and "Support".
In the cell next to "Start Date"
add a Date Data macro
set Name to “startdate”
In the cell next to "End Date"
add a Date Data macro
set Name to “enddate”
Make sure to give each macro above a unique and identifiable name.
Your editor view should look something like this:
Customer | |
---|---|
Junior Developer | |
Senior Developer | |
Support | |
Start Date | |
End Date |
choose Save
Step 3 - Enter data into the form fields
choose Edit Contents at the top of the page
The form created in the previous step will load.
fill in the form with relevant data
The form table should now look similar to this:
choose Save
Step 4 - Create another table to display retrieved data
edit the page again
create a table similar to below
Project Initiation |
|
---|---|
Project Analysis |
|
Development |
|
Code Review |
|
QA |
|
Bug Fixes |
|
Support Handover |
|
Documentation |
|
Monitoring |
|
Reporting |
|
Project Period |
|
Step 5 - Retrieve user-entered data and display It
Using the Get Data macro, we can now retrieve the data that was saved into the form fields.
In the cell next to "Project Initiation"
create a Get Data macro
In the preview window that appears
enter "seniordev" (or whatever name you provided in the "Senior Developer" List Data macro) in the Field Name entry field
Do the same for the rest of the table cells with Get Data macros that reference the other data macros that we saved information in.
The table should then look similar to below.
Project Initiation | |
---|---|
Project Analysis | |
Development | |
Code Review | |
QA | |
Bug Fixes | |
Support Handover | / / |
Documentation | / |
Monitoring | |
Reporting | |
Project Period | From to |
choose Save
Result
You should now have a table that looks similar to that below.