DataTables Deep Dive - Replacing Portals - Part 1

Portals and list views represent one of the biggest reasons for using a database for managing data. You can view the data in a myriad of ways and FileMaker provides the tools to modify the views quite easily.

FileMaker's list view happens to be the most powerful when compared to portals. We don't really have the same feature set presented within a portal. Using a portal it's an all or nothing approach to sorting by default and you can't really search the portal contents. You can certainly hack in some method of controlling the sort and the old standby of simply adding new copies of the same portal, just sorted in different directions, has always been a go-to workaround.

Well, has the time come to simply abandon your portals? What?!?!! Abandon portals? Is that even possible in FileMaker?

Actually, it is, with what FileMaker now offers with bi-directional support within Web Viewers, it may be more viable than you've ever considered. In this two part video series I show you exactly how easy it is to simply retrieve some data, then present that data within a web viewer. Essentially, replicating a portal - except for the constant data connection.

In many ways, this has become a prime opportunity to choose either a portal or web viewer. The days of always using a portal may have come to an end. But, I'll let the video speak for itself and you can choose if you want to leave your portals behind in favor of what can now be done within a web viewer.

AttachmentSize
DataTablesDeepDive.zip98.46 KB

Comments

Is it still true that any solution exposed to users via web direct precludes the use of web viewers in this way.

Michael White

but the onClick method does not kick in. I copied the scrips over from your file and changed the data portion
sorting works moving columns works but neither the view button not the row click does anything
where could I look??
Thanks
Peter

Peter Cortiel

In FileMaker <19 you have to use the preference for urls within the Privilege set. In FileMaker 19+ you need to make sure you enable the option directly on the web viewer.

Allow JavaScript to perform FileMaker scripts is a checkbox option on the web viewer.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Hi Matt,

Always great content. DataTables is awesome.

One quick note. At about the 6:18 mark you mentioned that a Summary field with a "List of" option selected cannot reference an unstored calculation. I agree it is not the greatest scenario to use a "List of" Summary on an unstored calc, but it is allowable. Perhaps this wasn't possible in an earlier version?

J. Ray

I thought you couldn't reference unstored calcs, but maybe you can.

They have been changing a lot of things in recent years. For example, you used to be able to have a valid relationship using globals without having any records in the found count. But they changed that and you now have to have at least one record.

Thanks for the heads up!

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Love the information. Super helpful. I have a website with a table I need to scrape the data from, however, the table is only displaying 20 at a time. I need to pull thousands of rows, and there is no 'Show All' button. Can I use jQuery or some function to open up the table?

You mentioned a relationship is required for the List portion of the calc.
You are the one that introduced me/us to the beyond awesome Custom Function "CustomList" which probably would work here without the need for a relationship?!

Leland Long
Senior Developer
Keller Interiors, Inc.
lelandlong@kellerinteriors.com
www.kellerinteriors.com

Given this code ......

$('#table tbody tr').on('click', 'button#view', function () {
let id = table.row($(this).parent()).data()[0];
//console.log(id);
FileMaker.PerformScriptWithOption('$script3', id, 0);
} );

How can I add an addition parameter? Would I just add my 'DetailView' like this ...

FileMaker.PerformScriptWithOption( '$script3', id , 'DetailView' , 0 );