Javascript Datatables

Web browsers and their primary language, Javascript, have a very robust ecosystem. In fact, there's few solutions you can't find out in the world of Javascript.

So, in FileMaker, when it comes to our data and its presentation within a user friendly fashion, we can easily create a layout, set it to list view and allow users to simply start using FileMaker.

But, wait, using FileMaker itself isn't always super user-friendly. In fact, you have to learn how to sort by multiple columns by actually heading into a dialog box. Which, admittedly, becomes easier to use, but it's not immediately UI friendly in that you can't just click on the column you want to sort. Let alone select a second or third column and have those sorts apply too.

Enter the world of the Web Viewer and Javascript and it's quite refreshing what you can do and in such a short time. This video walks you through the process of setting up a Javascript library called Datatables. It's a very powerful, and immediately usable UI for working with tabular data. While you can implement the same features within FileMaker itself, it takes quite a bit longer to do so.

AttachmentSize
Datatables.zip151.88 KB

Comments

I would like to click on a line and then see the details (detail view).
Can you tell me / us what we have to do.

This is very cool but useless for me if I'm unable to "jump" to an other layout with native FM objects...

I have copied the example from Datatables.zip,
1) Replaced the js text object with my table's field names,
2) Changed the table referenced in the Let statement of the WebViewer calc,
3) Created jsArray, and jsDataset fields in the table used on the layout. I tested the jsArray and jsDataset fields inside my DataViewer (it's working)
However, my web-viewer is blank.
Not sure what I need to do to make it work.

in the text layout object called "js" do I need to do something with #example?
All I'm trying to do is to get the W.V. to display data from my own database, so I didn't try to do any additional extensions. Just what you demonstrated, but I get a blank web-viewer.
How often do your people check these comments?

Dave17

Imagine this scenario when using Data Tables as portals:

User A and User B are both viewing the same parent record at the same time. User A edits a portal record or adds a new child record. We can use Callback scripts to update the payload for the portal on User A's portal after editing or adding new entries. Now, my question is how do we update the payload on User B's portal to show the modifications done by user A?