Collect and display data in a structured way
Overview
In this example, we use Scaffolding to create a form for a user to fill in with data. Then, 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 six rows and two columns.
Fill in the table as shown:
Customer |
|
|---|---|
Junior Developer |
|
Senior Developer |
|
Support |
|
Start Date |
|
End Date |
|
Step 2 - Use Scaffolding macros to create form fields
In the cell adjoining Customer, create a Text Data macro and provide a relevant name, for example,
customer.
In the cell next to Junior Developer, create a List Data macro. Inside the List Data macro:
Add a User Options macro.
Edit the User Options macro according to your requirement (groups, space(s), user(s) etc.).
Repeat 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 the Name parameter to
startdate.
In the cell next to End Date:
Add a Date Data macro.
Set the Name parameter to
enddate.
Make sure to set each macro with a unique and identifiable name.
Your editor view must look something like this:
Customer | |
|---|---|
Junior Developer | |
Senior Developer | |
Support | |
Start Date | |
End Date |
Click Save.
Step 3 - Enter data into the form fields
Click Edit Contents at the top of the page.
The form created in the previous step loads.
Fill in the form with relevant data. The form table must look similar to this:
Click Save.
Step 4 - Create another table to display retrieved data
Edit the page again.
Create a table similar to the following:
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
Use the Get Data macro to retrieve the data that was saved in the form fields.
In the cell next to Project Initiation, insert a Get Data macro.
In the Preview window, enter
seniordev(or, whatever name given 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 |
Click Save.
Ensure that each Scaffolding element has a unique ID, as having the same ID for different elements may cause issues.
Macro names are like variables that store data and these names allow the data to be retrieved at a later time.
Dates from Date Data can be formatted (for example,
dd-MMM-yyyy).
Result
The resultant table is similar to the table shown below: