4.3 Displaying Data in Tables (Page Builder & Element Config)
BetterForms provides powerful options for displaying tabular data, from simple list views to advanced data tables. This section covers when to use each approach and how to implement them effectively.
Two Main Approaches to Displaying Data
1. List Views (listrows)
listrows)Simple multi-row data entry forms
Add/remove rows functionality
Good for data input scenarios
Limited sorting and filtering
2. Data Tables (tables2)
tables2)Advanced data display with sorting, filtering, pagination
Read-only data presentation
Complex interactions and custom formatting
Based on Vue-Tables-2 library
When to Use Each Approach
Use List Views When:
Use Data Tables When:
Users need to add/edit rows
Displaying read-only data
Simple data entry forms
Large datasets requiring search/filter
Contact lists, address books
Reports and analytics
Product catalogs (editable)
User management interfaces
Max 20-30 rows
Hundreds or thousands of rows
List Views (listrows) Implementation
listrows) ImplementationWhere to Add List Views in the IDE
Open your page in the BetterForms IDE
Navigate to Page Builder tab
Search for "listrows" in the snippets
Copy and paste into your page schema
Basic List View Structure
Data Model for List Views
Your page's data model should include an array for the list data:
Advanced List View Example
Data Tables (tables2) Implementation
tables2) ImplementationWhere to Add Data Tables in the IDE
Open your page in the BetterForms IDE
Navigate to Page Builder tab
Search for "table" in the snippets
Copy and paste into your page schema
Basic Data Table Structure
Data Model for Data Tables
Your page's data model should include an array of objects:
Advanced Data Table with Custom Formatting
Row Click Actions
Adding Row Click Functionality
Using Named Actions with Row Data
In your Named Action:
Custom Column Formatting with Slots
Adding Custom HTML to Columns
Child Row Expansion
Display additional details when a row is expanded:
Integration with FileMaker
Loading Data from FileMaker
Use the onFormRequest hook to populate table data:
FileMaker Script:
Triggering FileMaker Actions from Tables
Table Filtering and Sorting
Basic Filtering
Custom Sort Functions
For numeric sorting of text fields:
Performance Considerations
For Large Datasets
Use Server-Side Pagination
Load data in chunks from FileMaker
Implement search on the server side
Optimize FileMaker Queries
Use efficient finds
Limit returned fields
Use
getColumnAsArrayfor better performance
Consider Data Caching
Cache frequently accessed data
Use development data model for testing
Table Performance Tips
Best Practices
1. Choose the Right Component
Use
listrowsfor data entryUse
tables2for data displayConsider user workflow needs
2. Optimize User Experience
Provide clear column headers
Use consistent formatting
Add loading states for large datasets
3. Handle Mobile Responsiveness
Test table behavior on mobile devices
Consider hiding non-essential columns
Use responsive design principles
4. Security Considerations
Validate user permissions for row actions
Sanitize data before display
Use proper authentication for sensitive data
Troubleshooting Common Issues
List Views Not Showing
Check that the data model contains the correct array
Verify the
modelproperty matches your data structureEnsure
schema.fieldsare properly configured
Data Table Not Loading
Verify the data model array structure
Check that column names match data properties
Ensure
modelproperty is correctly set
Row Actions Not Working
Check action syntax in
actions_onRowClickVerify named actions are properly defined
Test with simple actions first
Next Steps
Now that you understand data display options, you can:
Style your tables - See 4.4 Basic App Styling
Integrate with authentication - See Users & Authentication
Explore advanced features - See Data Table Reference
Last updated