RETURN TO BLOGS

Master DataTables Series: 1.3 Adding your Data

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 explored the importance of Naming your Build, Report Settings and actions you can take with each build you create.  We also discussed the concept of your own DataTables Build library.

In this post, we will delve into adding data to your reports, the first step to bringing your DataTables creations to life.

Data: The Essential Step

In this video, we will focus on an essential step – adding data to the builder.

We need data, properly formatted in JSON, in order to design and display a build. This blog series assumes you have some knowledge on how to construct properly formatted JSON.  In a future video series, we will explore various way to collect JSON data for your builds, but in the meantime we will work with sample data to assist in the learning process

What’s new?

As the video series progresses, we will continue to build on our previous lessons. I will inform you of the changes made from the previous demo file so you can learn along the way. 

In the demo file included with this post, you will find the following updates:

  • the addition of a table for sample data called “Contacts,”
  • an updated relationship graph,
  • a new layout called “Contacts,”
  • two custom functions, and
  • a script called “Contacts Collect the Data.”

Understanding Data Population

Let’s dive into the demo file and see how we can add data to the builder.

The section at the top of the builder, highlighted in green, is where we’ll be adding and displaying our data in a formatted view. We’ll be working with the “Contacts” table in this lesson and adding meaningful information to our report.

Creating a New Report for Contacts

To work with the “Contacts” table, we’ll first duplicate the previous report (video 1.2) and name it “1.3.” This step ensures we can keep track of our progress and manage multiple reports effectively. Additionally, the relationship graph and layout for “Contacts” have been updated to accommodate the new data.

Populating Data Using Scripts

With the “Contacts” report selected, we’ll need to add data to the data tab. To do this, we use a custom script called “Contacts Collect the Data.” This script performs a find on the “Contacts” layout, retrieves the necessary data using a JSON constructor function, and copies it to the clipboard for pasting into the builder. You’ll see how we construct and format the JSON data for a clean and organized view.

During the process, we notice some unnecessary table occurrence information in the JSON data. We’ll quickly correct this by adjusting the JSON constructor function to display only the relevant information without the additional table occurrence data.

What’s Next?

We’ve successfully added data to the builder and constructed a clean and organized JSON view.

In the next post, we’ll take the final build step and identify the columns for the report. We will be one step closer to preview our very first report using the DataTables Builder.

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

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.