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 how cell clicks work and why you may want to use this option over another type of integration.
In this post, we continue learning about the various integrations, changing our focus to Button Clicks. Adding a button to each row of your DataTables report can enhance the user experience and provide a clear way to trigger specific actions.
Configuring Button Clicks
To begin adding button clicks to your DataTables report, you’ll need to access the gear icon in the Integration tab of the Builder. Choose the “Button Click” option to get started. As with row and cell clicks, you’ll be presented with integration options, but there are a few additional options we have not seen yet.
Button Click Similarities
Like On Click Rows, when you select “Each Row” for button clicks, you have two choices: “Entire Row” or “Specific Value.” This choice determines what your button click action will return to your FileMaker script. You can either return the entire row of data or a specific value. This flexibility allows you to tailor your interaction to suit your application’s needs.
The actual code for button clicks in Codence DataTables is quite similar to that of row clicks. When you choose “Entire Row,” you’re simply passing the entire row as your object, making it accessible to your FileMaker script. However, when you opt for “Specific Value,” you’ll be passing only the value you’ve specified.
Button Click Differences
The Visual Impact: Adding Buttons
Adding a button to your DataTables report involves creating a new column. This is akin to how we manage other columns in the report. The key difference is that, while your data fields originate from the report’s data source, buttons must be created as a new column to appear on the report. When you choose the button integration for a row, the code behind the scenes essentially builds this column for you.
Button Labeling and Placement
When this new column is first created, it comes with some default values for it to properly appear on the report. However, just like any other column, by accessing the Column’s Builder, you can control the visibility, column’s title and other setting we have learned about when modifying columns. You also have complete control over the button’s label, allowing you to customize it to align with your application’s needs. Additionally, you can adjust the position of this new column to determine where the button appears within the table.
Customizing and Stylizing
Button clicks offer a powerful way to engage with your data and trigger actions within your FileMaker solutions. The ability to return specific values or entire rows, coupled with custom labeling and placement, allows you to fine-tune your user experience. In future series, we’ll explore additional aspects of buttons, including how to style and format your buttons, adding even more depth and functionality to your DataTables reports.
In the final post of this series, we expand on the button click options in the DataTables Builder. We learned how to add a button to each row of the table, but now we are going to look at adding a button to the entire table. Although similar in code, there are fundamental differences between the two options. We’ll learn about those difference and why you would want to use one over the other.
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.
Jody has been working with Claris FileMaker for over 19 years in various industries. She has a Masters in Business Administration and has worked in several “Analyst” roles over the years, always leveraging the power of Claris FileMaker along the way. She lives in central Minnesota, the Land of 10,000 lakes, with her husband, three teenagers, and a sweet English Cocker Spaniel. When not at work, you can either find Jody at her kid’s sporting events, coaching her daughter’s basketball team, or appreciating the outdoors.