Multiple widgets stored in one Mono-Widget

Last week in #Office Hours, I explored the idea of storing different widgets in one main or mono widget. Previously I would champion (and still do) having multiple records in a table that serve as the storage of different widgets.

But I’m embarking on a client dashboard project where we want to have six or more dashboards, and so I tried a different way.

You can review the discussion as part of office hours here: https://www.youtube.com/watch?v=Dgzr0d13mxI (Please like and subscribe).

Over the weekend I did a bit more work on it and came up with this. Review the images below.

As you see in the image there are three functions placed on the window that FileMaker can reach. Each one loads a specific widget (“Chart”, “table”, and “chart2”). And each of these widgets are in separate files. Here’s the “chart” widget:


So in reality I’m creating three separate widgets in their own files (and even folders) in the project. but they’re imported into the index.js file, which is required as the entry point for the index.html file.

And here’s the result:




One file, multiple widgets. One FM record where all the HTML is stored for each of these widgets.

Cool huh?

I’ll show the repository off here in the next few days. And this can be available to you as well.

And come to #Office Hours. We have great discussions by all members of the open time. People share their successes and their problems, and the team helps out.

Join us.