DataTables Deep Dive - Replacing Portals - Part 2

This is Part 2 of a series about using the DataTables JavaScript library in order to simply pull data you wish to display and doing so within a Web Viewer.

While standard FileMaker Portals present one of the easiest methods for showing related data, it's now a viable option to simply use a Web Viewer to present data to the user. With the bi-directional support of JavaScript within FileMaker 19 and higher we can take advantage of what JavaScript does best - being fast!

In this video we focus specifically on the initialization and interaction between a Web Viewer using DataTables and how you can add buttons and features which make using DataTables a joy within FileMaker.

AttachmentSize
DataTablesDeepDive.zip98.46 KB

Comments

Awesome video. Thank you for all your presentation.

I did a test with the scripts in this video but I have a limitation for the table I have used:

"totalRecordCount":882, "foundCount":463, "returnedCount":100

How can I show all the records of the query without the limit of 100

There are two solutions to this. Since it seems like you're opting for the Data API method, you need to supply the limit fragment or opt for the global field method.

You'll find the documentation here under the section of Work with Records >> Get a range of records

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Great set of videos. Incredibly powerful and useful. Thanks for the great content.

I really enjoy digging out the little gems and then presenting them to my fellow users and developers!

-- Matt Petrowsky - ISO FileMaker Magazine Editor

I have been reviewing these welcome additions to Filemaker extensibility. Having the right background with Web languages and HTML/CSS leads perfectly to your working examples and the relevant docs. RTFM indeed.
Brilliant

+--------------------------------------------------------+
Michael A Clasen
mclasen@mclasen.com
Filemaker Developer
http://www.mclasen.com
+--------------------------------------------------------+

+--------------------------------------------------------+
Michael A Clasen
macc@mclasen.com
Filemaker/Lasso
FSA Associate
http://www.mclasen.com
+--------------------------------------------------------+

it there a way to add a total ???

Hey Matt!

Thank you again for making these data table videos. Using your video and sample file as a guide, I was able to implement this technique in one of my database solutions. I work at a University and we keep track of all the institutions from which our students come. The list of institutions has grown quite long, which meant that prior to using this technique, users would have to scroll a whole lot in order to select the proper institution for a particular student. Now, users can simply search for an institution in the list and quickly select it for the student's record. Using data tables for this purpose is an AWESOME technique!

these two scripts don't seem to work now (using fm19). Receiving [5] command is invalid error. Has something changed with "Perform Javascript in webviewer"?

Hello, I'm just getting started with this problem, but is it possible to make invisible buttons above each cell? I need a table with lines: service name and columns - dates from 1-31 (a given month). I know how to download it from the Filemaker database via SQL (on the server), but I do not know if it is possible to click on it (each cell) while displaying it in the table and receive a refund of the selected date and service?

I need to program a base of services - equipment rental (equipment represented in verses) that can be rented for a few days (at least 3) or a maximum of 3 weeks. So I need a full month view (horizontal).

Does it make sense or it is better to switch to the calendar - fullcalendar.io - about which there is also another movie and it will be easier there?

For example, I did it with Filemaker - only it is slow (screenshot here: https://megawrzuta.pl/download/56cdc66a92f1759bbbad4ac6631bfb1f.html )

Thanks for any the help!

how can i right-align the "zip/postal" column?
{ "targets": 6, render: $fn.datatable.render.number(',', '.', 0 )}

does not work.

I have spent the day testing this solution with 100k records. Best to do something different to pass that many records. Most of the time a developer won't need to pass that many records, but in rare cases they may need to and I have such a case where a client works with very large data sets and this would not work because the replace field contents strategy would take very long to replace the contents of the global field. I thinking about how to pass that much data at a time and I think I try using a stored calc for each record that contains the JSON for that record (something like: ["","Lysandra","Vasquez","Quisque Tincidunt Incorporated","Kaliningrad","Cagayan Valley","34535-22588"] as an example) . Then test different methods of gathering that data. This video was a great help to me though getting started with datatables. I have worked with a lot of js libraries and it is always nice when someone you trust has reviewed it for you and taken the time to help the FileMaker community. That's why I'm a subscriber :)

Matt Lambert