RETURN TO BLOGS

Master DataTables Series: 1.4 Working with Columns

by Jody Barney - Application Developer

Welcome to the multi-part video series that will teach you how to implement DataTables in your Claris FileMaker Pro solutions effectively. Whether you prefer reading, watching videos, or trying out demo files, we’ve got you covered. If you’re new to this series, we recommend starting from the introduction to get the most out of your learning experience. You can access the complete series here: Master DataTables with Claris FileMaker Pro.

In the previous post, we focused on how to add data to your reports, the first step to bringing your DataTables creations to life.  We showcased a method to take sample data from a Contacts table and populate the data tab into our new build.

In this latest installment, we’ll dive into understanding the role columns play, how they relate to the data and their use in the DataTables Builder.

Columns

Columns play a crucial role in defining how your data is displayed, ensuring a seamless user experience. Mastering the art of working with columns is vital for creating efficient and user-friendly DataTables reports. Understanding the relationship between data and columns, along with utilizing the JSON format, empowers you to display information in a seamless and organized manner. Let’s explore how to map your data to columns effectively for optimal report creation.

Understanding the Relationship Between Data and Columns

Before we proceed, it’s vital to grasp the intricate relationship between data and columns. Your data structure and columns must complement each other. When your data changes, it’s essential to update the corresponding columns accordingly.

In our previous series, we added Contact data in JSON format. Now, we need to “map” the data to the columns so we can view our first report.

Introducing the Column Structure

In the DataTables Builder, each column consists of five attributes, carefully designed to enhance your reporting experience:

1. Data: This attribute defines the mapping between the column and the data element in your JSON. It essentially tells the system which field to display in the column.

2. Title: The title attribute serves as the header display for the column. It represents the column name that users will see in the report.

3. Orderable: This boolean attribute determines whether the column can be sorted by the user. By default, columns are set to be sortable.

4. Searchable: The searchable attribute allows users to perform a search based on the column’s values. However, you might choose to disable searching for certain columns like primary key fields. By default, columns are set to be searchable.

5. Visible: By default, all columns are set to be visible, displaying the data they represent. However, you have the flexibility to toggle visibility for specific columns as needed.  Again, you might choose to disable visibility for certain columns like primary key fields.

Working with Columns in the Demo File

Upon opening the DataTables Builder, we find that the columns have not been automatically built for our new report. However, a simple click on the “Create Default Columns” button generates the necessary structure for us.  I refer to the “Columns” Tab as the Columns Builder. 

The Columns Builder in the DataTables tool follows a JSON format with key-value pairs. This allows for convenient organization and an alphabetical order of columns. Although you can modify these attributes, the tool natively structures the columns alphabetically by data, title, orderable, searchable, and visible.

This Columns Builder creates a default view based on the data supplied. In a future series we will look at the advanced settings of the Columns Builder which will allow you to customize the report further.

What’s Next?

We’ve successfully added data to the builder and constructed the default columns needed to display our first build.

In the next post, we’ll take the final step to preview our very first report using the DataTables Builder!  We will also discuss how to share the generated HTML file with stakeholders and demonstrate how to add the report into your own solution.

Join the Training Series Now

Subscribe to our YouTube channel to keep up with the video training series. Comment on the YouTube videos to interact with us and share your thoughts and questions. Also, don’t forget to join our mailing list for updates on new videos and additional resources.

Please enter your contact information to download the Demo file.

This field is for validation purposes and should be left unchanged.
DOWNLOAD

Comments

  1. Adrian
    2 months ago

    Next post link on 1.4 is wrong. Links to 1.3 instead of 1.5

    Reply
    • Danielle Borges
      2 weeks ago

      Thanks for letting us know. We corrected it.

      Reply

Leave a comment

Your email address will not be published. Required fields are marked *

Your email address will not be published. Required fields are marked *

Built with you in mind

Speak to one of our expert consultants about making sense of your data today. During
this free consultation, we'll address your questions, learn more about your business, and
make some immediate recommendations.

REQUEST A TOUR GET A FREE CONSULTATION

Stay in touch!

This field is for validation purposes and should be left unchanged.