Welcome to the multi-part video series that will teach you how to implement DataTables in your Claris FileMaker Pro solutions effectively. If you’re new to this series, we recommend starting from the introduction to maximize your learning experience. You can access the complete series here: Master DataTables with Claris FileMaker Pro.
In the previous post, we explored Integration Settings within the DataTables Builder and how we can configure each type of integration.
In this post, we’ll explore how row clicks work and the options offered within the Builder. Row click functionality allows us to trigger specific actions when we click on a row in our DataTables report.
Understanding Row Clicks
When we refer to row clicks, we are essentially instructing the system to respond to user interactions on a click to any location for each row of the report. The DataTables Builder offers two primary options for row click functionality:
- Return the Entire Row
- Return a Specific Value
Configuring Row Click Functionality
In DataTables Builder, configuring row click functionality is straightforward. Let’s take a closer look at how to configure these options and understand how they affect the data returned.
-
Return the Entire Row:
– When you choose to return the entire row, the code will return all the data within the clicked row as an object.
– This option is great when you need to access and work with multiple data points in your script.
-
. Return a Specific Value:
– In some cases, you might only need a specific piece of information from the clicked row, such as a primary key.
– To achieve this, you can choose to return a specific value. You will be prompted to select the data element you want to return.
– This selection becomes important as it influences the actions in your script based on the specific data point you’ve chosen.
Understanding the Code
Behind the scenes, the DataTables Builder constructs an object that contains the necessary data to be passed to the FileMaker script. The key difference between “returning the entire row” and “returning a specific value” is primarily one line of code.
For “returning the entire row,” the object is structured to contain all the data within the clicked row, while for “returning a specific value,” it’s designed to pass only the selected field and its corresponding value.
This distinction is vital because it empowers you to control what data you send to your script, enabling you to craft customized actions based on the specific information you require.
Practical Demonstration
In our demo file for DataTables v4.2, the two row click options are showcased. You’ll notice that the code to retrieve and process the data is similar in structure, but it’s tailored to the type of row click you have configured. By understanding the options available and the underlying code structure, you can control the data passed to your FileMaker script. This level of control enables you to perform precise actions based on the user’s interaction with your DataTables report.
What’s next?
In the next post, we continue learning about the various integrations built into the DataTables Builder took, this time focusing on the On Cell Click. We will also discuss the code and settings differences between row clicks and why you might use one over the over.
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.
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.