Collecting and Displaying Data in a Structured Way
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.
|Platform||Server, Data Center|
|Macros||Text Data, Date Data, List Data, User Options, Get Data|
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 Datamacro.
- 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", type Date Data.
Do the same as the above step for the cell next to "End Date".
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 Date862px
- Click Save.
Step 3: Enter Data into the Form Fields
- Click Edit Contents at the top of the page.
The form you created in the previous step will load.
- Fill in the form with relevant data.
The form table should now look similar to this:
- Click Save.
Step 4: Create Another Table to Display Retrieved Data
- Edit the page again.
Create a table similar to this:
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 something like this:
Project Initiation Project Analysis Development Code Review QA Bug Fixes Support Handover
Monitoring Reporting Project Period
- 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 (e.g. dd-MMM-yyyy)
You should now have a table that looks like this: