Display ExecuteSQL Results in a Web Viewer

In a previous blog post (How to Display FileMaker Data Online), I wrote about how to export data from a FileMaker database into a table hosted on a website using DataTables. DataTables can also be used with FileMaker to create a layout that displays the results of your ExecuteSQL queries.

display ExecuteSQL results in a web viewer

The table is responsive when resizing the window

Exporting Data into DataTables:

I’ve included a demo file at the end of this blog post.

This method:

  1. Queries your database using the ExecuteSQL() function
  2. Converts the results to JSON
  3. Prepares the DataTable code and exports it to an html document
  4. Displays the data in a web viewer

This entire process should take less than 200 milliseconds.

Going further:

  • Geist Interactive (Proof+Geist) has thorough blog posts about using DataTables with FileMaker.
  • You can find information about customizing the style of your table here.

Conclusion:

This method is a quick way to display data returned by ExecuteSQL in FileMaker without having to create a layout or a report script for each set of data that you’d like to generate.


*This article was originally written for AppWorks, which has since joined Direct Impact Solutions. This article is intended for informative purposes only. To the best of our knowledge, this information is accurate as of the date of publication.