Our Blog, FileMaker only, Xojo only, Archive (older)     Follow us on Twitter, Xing, LinkedIn or Facebook.

Custom Functions in JavaScript

We saw a presentation at dotfmp conference from Philipp Puls about him storing his custom functions in a table inside the database. With help of one custom function in FileMaker itself, he can run them all. This dispatcher function would use execute SQL functions in MBS FileMaker Plugin to query the expression by name, then add the parameter inside and evaluate it. Quite convenient to have all custom functions stored in one database. Based on that idea we developed two new ways at MBS to do custom functions in JavaScript and later without.

Custom Functions in JavaScript

Since MBS FileMaker Plugin comes with a built-in JavaScript engine, which works without web viewer and even on a server side script, we can use it to define custom functions, which we can call anywhere in FileMaker:



This example database included with 11.3pr2 shows how to do it. It sets up the whole thing in the start script. With JS.New we make a new JavaScript environment with the special name "js". Instead of getting a handle number from the plugin, we define the identifier ourselves. This way we can refer to this JavaScript environment everywhere. It's global for all files and all solutions opened in FileMaker and can be initialized in FileMaker Pro, Server (Scripting + Web Direct) as well as FileMaker iOS SDK based applications. (more)

Follow up on good virtual conferences

Event planning strategies for virtual conferences, online events and hybrid meetings

After my blog post What is needed for a good virtual conference from last weekend, I got some feedback. Thanks for everyone replying. The setup listed in the blog post was heavily inspired from the dotfmp conference, but other conferences may have a different and less chaos in the setup.

After over a year of virtual conferences, online meetings and a lot of cancellations, people are eager to get back to normal live. While some enjoy the virtual conferences, others dislike them. When we talked about the user group, it looks like some groups like to stay virtual, but others want to go back to local meetings in-person. Other groups may mix virtual meetings for presentations and in-person restaurant meetings for the social gathers. Like one month virtual and other month in-person. Quite a few people want to travel again, so long term virtual only conferences may no longer happen. (more)

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

A few days ago Christian Schmitz from Monkeybread Software joined a live episode to talk a bit about the MBS FileMaker Plugin. Watch it on YouTube.


Do you like this video?
Please let Richard know and send him your wishes or ideas for future live broadcast as well as topics for training videos. And check out the FileMaker Training bundles as well as their new book for FileMaker, updated for2021.

Check for Adobe Reader for IE11

If you use WebViewer in FileMaker or HTMLViewer in Xojo on Windows with IE11 engine and you show PDF documents, you need a PDF plugin for IE. To check whether you have Adobe PDF Reader browser support installed for IE11, please start Internet Explorer (not Edge!), then go to the menu (gear icon in the toolbar on the right) and to the Manage Add-ons dialog:



Select toolbars and extensions first on the left, then go down to pick all add-ons in the popup menu. Then on the right, you should see Adobe PDF Reader in the list. This should show 32-bit and 64-bit versions there. If one is missing, repair your Adobe Reader installation. Seems like one version of Adobe Reader shipped this year where the 64-bit part was missing. You may get current one where it is included again.

PS: See also Windows updates breaks PDF display in FileMaker

Windows updates breaks PDF display in FileMaker

Please be aware that Microsoft Windows got an update KB5003637, which breaks FileMaker displaying PDFs in an interactive container.

You may want to not install this update for some time or uninstall it when you find it installed.

An upcoming FileMaker release may switch to use Edge/Chrome for rendering PDF documents, so this will get fixed soon by Claris.

Alternatively you can use our MBS FileMaker Plugin to render PDF pages (DynaPDF.RenderPage) and have them show as JPEG or PNG pictures in a container.

See also posting in Claris Community: Suddenly PDF are not shown in FileMaker (since today !) in multiple computer / different customer

MBS FileMaker Plugin, version 11.3pr2

New in this prerelease of version 11.3 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/, in Dropbox folder or ask for being added to the dropbox shared folder.

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

On Wednesday, 9th June 2021 at 1 PM PDT (22:00 o'clock in Germany), we may show you a few MBS Plugin examples and answer questions:



Please bring questions!

What is needed for a good virtual conference


Let's collect what you may need to run a virtual conference. This blog post may be updated later to add more details, so please send us feedback. MBS has hosted over 10 conferences/events in the past, but since we may run a virtual one someday, let's think about what may be needed for a company to run such a virtual conference:


Attendees

  • Virtual conference, so no per person cost like food or chairs, so make it free to join.
  • Use existing logins for company's forum/community to avoid people register again. Preferable single sign-on for everything.
  • Email all your users, prospects and customers to let them know, early to mark dates in calendar and later to remind them.
  • Take signups before and while the conference runs.
  • Let attendees sign a checkbox or so for them being okay with recordings showing them if they ask a question or present in a session.
(more)

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

A few days ago Christian Schmitz from Monkeybread Software joined a live episode to talk a bit about the DynaPDF functions in the MBS FileMaker Plugin. Watch it on YouTube.



Next video stream with MBS will be on Wednesday, 9th June 2021. And the recording from the Q&A session from 4th June 2021 should be available soon.

Do you like this video?
Please let Richard know and send him your wishes or ideas for future live broadcast as well as topics for training videos. And check out the FileMaker Training bundles as well as their new book for FileMaker, updated for2021.

MBS FileMaker Plugin, version 11.3pr1

New in this prerelease of version 11.3 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/, in Dropbox folder or ask for being added to the dropbox shared folder.

MBS FileMaker Plugin, June 2021 News

For dotfmp 2021 we present what is new this year in MBS FileMaker Plugin:

ThumbnailMBS FileMaker Plugin, June 2021 News

(English)

36:32 minutes

Watch on Youtube

Subscribe to our podcast feed
(more)

DynaPDF for iOS

We rebuild the the DynaPDF library for iOS, so you can use the current version of DynaPDF with your FileMaker iOS SDK apps when using the MBS FileMaker Plugin.

We include four variants in our download:
  • DynaPDF for iOS Device
    64-bit for device
  • DynaPDF for iOS Simulator
    64-bit for simulator
When building your iOS app, just include the dynapdf framework file in the frameworks folder inside the app and call DynaPDF.Initialize in the start script passing the framework name and your license key.

The result should be OK if everything worked. If you get an error message including "mach-o, but wrong architecture", well you did copy the wrong framework file.

Download: DynaPDF iOS 4.0.53.147.dmg or DynaPDF iOS 4.0.53.147.zip

We use a 3 component version number for the framework as required by Apple. For testing on your own device, please make sure the framework has your code signature.

New in MBS FileMaker Plugin 11.2

In this article I want to introduce you the new functions from the MBS FileMaker Plugin in version 11.2.

In general we are ready for Apple Silicon as this plugin ships with arm64 code for macOS included. And our Linux version of plugin should load on Ubuntu. And for macOS in the Script Workspace we got option-click to jump right into calculation for set fields and variable script steps.

SQL

Let's start with the new functionalities from the component SQL. We got support in SQLite for ICU libraries. The SQL.InternalSQLiteLibrary.SetICUEnabled function enable or disable the use of ICU libraries. Suitably to this we have the function SQL.InternalSQLiteLibrary.ICUEnabled that queries whether ICU libraries are enabled. Normally we load them when SQLite initializes and we add the ICU extension if we find the library. But with the SQL.InternalSQLiteLibrary.LoadICU function we can explicit load them now. If we want to know whether the ICU libraries were loaded we can query the status with SQL.InternalSQLiteLibrary.ICULoaded. If we want to know whether the ICU libraries are used, we can use the SQL.InternalSQLiteLibrary.ICUUsed function. If this function returns 1, they are used. If they are not used we get a 0 as result.

We also have two new functions to convert timestamps between another database and FileMaker. A time, date or timestamp in FileMaker has a different format than a time in a SQL query. We can use the SQL.ConvertDateTimeToSQL function to convert a FileMaker time to a SQL time. The SQL.ConvertDateTimeFromSQL function does the opposite. It converts a time value that we get from SQL of another database into a format that is readable by FileMaker.

(more)

Find new records with RowID

We regularly get the question whether our plugin could tell you the IDs of new records created by the plugin.

The answer is that this information is not available, since FileMaker doesn't have a way in SQL to get the ID of last primary key created. Databases like mySQL have a function called LAST_INSERT_ID to return the serial number generated for a primary key via auto increment. FileMaker doesn't do that and also that wouldn't work for UUIDs, too.

Since all tables have a RowID column, you can always query the maximum RowID like this:

Set Variable [ $RowID; MBS("FM.ExecuteFileSQL"; ""; "SELECT MAX(RowID) FROM \"Contacts\" ")


This queries it for our Contacts table in a test database. Feel free to put your table name there in the quotes. You get back the internal RowID value of the newest record. The RowID increments and is independent of whatever you use a key in the table. This way we can use the same calculation for different tables without knowing what fields are inside.

Now you can use this to query the key field of the last record, e.g. the ContactIdentifier field in our example:

Set Variable [ $ContactIdentifier; MBS("FM.ExecuteFileSQL"; ""; "SELECT \"ContactIdentifier\" FROM \"Contacts\" WHERE RowID = ?"; 9; 13; $RowID)


Now you have the latest ID field value. If you do batch inserts via plugin and you need IDs of all the new records you can do a script like this:

# first make a query to get newest RowID before import
Set Variable [ $RowID; MBS("FM.ExecuteFileSQL"; ""; "SELECT MAX(RowID) FROM \"Contacts\" ") ]

# now create/import new records
Set Variable [ $Status; MBS( "FM.InsertRecordCSV"; ""; "Contacts"; "FirstName¶LastName¶City"; $tsv) ]

# now query IDs of new records
Set Variable [ $NewIDs; MBS("FM.ExecuteFileSQL"; ""; "SELECT \"ContactIdentifier\" FROM \"Contacts\" WHERE RowID > ?"; 9; 13; $RowID)


Finally you have the IDs for your new records. Unless someone else created one in-between with another session on the same server. But that may be another topic.
Let me know what you think about using RowID values!

See also: ROWID in FileMaker SQL Commands

MBS FileMaker Plugin 11.2 - More than 6500 Functions In One Plugin

Nickenich, Germany - (May 18th, 2021) -- MonkeyBread Software today is pleased to announce MBS FileMaker Plugin 11.2 for macOS, iOS, Linux and Windows, the latest update to their product that is easily the most powerful plugin currently available for Claris FileMaker produce line. As the leading database management solution for Windows, macOS, iOS and the web, the Claris FileMaker Pro Integrated Development Environment supports a plugin architecture that can easily extend the feature set of the application. MBS FileMaker Plugin 11.2 has been updated and now includes over 6500 different functions, and the versatile plugin has gained more new functions:

Our plugin now ships with Apple Silicon support included. Claris announced they will support Apple M1 chip soon, so we are ready.

Our JavaScript functions can now JS.InitModules function to define modules in JavaScript, which can then be referenced later with require.

For SQL function we got support in SQLite for ICU libraries and we enabled math and geopoly functions in our internal SQLite library.

Within the Script Workspace (on macOS) you can now press option-key for the gear in Set Variable/Field script lines to jump right into the calculation dialog, thus saving you an extra mouse click.

For our XL functions to read/write Excel document we added XL.Book.AddFontFromBook and XL.Book.AddFormatFromBook functions to copy font/format definition from one document to another one. With XL.CopyCellValue function you can now copy cell values. With XL.Sheet.SetRows function you can now define height for a range of rows.

The Process.List function can list all applications running on the computer. And for Windows the RemoteControl.GetWindowsListAsJSON function can list all windows on the computer with details about them.

We added millisecond support to several functions including Files.CreationDate, SQL functions, XL functions and JavaScript functions.

Our trace functions got upgraded. We can log on server the stderr and stdout messages. Trace can be paused and includes progress messages from DynaPDF functions and for Audit we log which field is audited.

For ListDialog functions we added column width and alignments. OCR functions are per thread, so they can run in parallel on server side scripts. We added SystemInfo.LinuxSystemInfo to query information about linux computer. We added SystemInfo.WindowsSystemInfo and SystemInfo.WindowsMachineInfo to query information about the environment on Windows like the CPU architecture.

Finally we updated CURL to version 7.76.1, DynaPDF to 4.0.52.146, SQLAPI to 5.1.4 with new DuckDB support and our Linux build machine to Ubuntu 18.04.

See release notes for a complete list of changes.

Neues MBS FileMaker Plugin 11.2

18. Mai 2021 - Monkeybread Software veröffentlicht heute das MBS FileMaker Plugin für FileMaker in Version 11.2, mit inzwischen über 6500 Funktionen eines der größten FileMaker Plugins überhaupt. Hier einige der Neuerungen:

Unser Plugin wird jetzt mit Apple-Silicon-Unterstützung ausgeliefert. Claris hat angekündigt, dass sie bald den Apple M1-Chip unterstützen werden, wir sind also bereit.

Unsere JavaScript-Funktionen können nun mit der Funktion JS.InitModules Module in JavaScript definieren, die dann später mit require referenziert werden können.

Für SQL-Funktionen haben wir Unterstützung in SQLite für ICU-Bibliotheken bekommen und wir haben Mathe- und Geopoly-Funktionen in unserer internen SQLite-Bibliothek aktiviert.

Innerhalb des Skript-Arbeitsbereichs (unter macOS) können Sie jetzt die Optionstaste für das Zahnrad in Setzte Variable/Feld-Skriptzeilen drücken, um direkt in den Berechnungsdialog zu springen, was Ihnen einen zusätzlichen Mausklick erspart.

Für unsere XL-Funktionen zum Lesen/Schreiben von Excel-Dokumenten haben wir XL.Book.AddFontFromBook und XL.Book.AddFormatFromBook Funktionen hinzugefügt, um Schrift-/Formatdefinitionen von einem Dokument in ein anderes zu kopieren. Mit der Funktion XL.CopyCellValue können Sie nun Zellwerte kopieren. Mit der Funktion XL.Sheet.SetRows können Sie nun die Höhe für einen Bereich von Zeilen definieren.

Die Funktion Process.List kann alle auf dem Computer laufenden Anwendungen auflisten. Und für Windows kann die Funktion RemoteControl.GetWindowsListAsJSON alle Fenster auf dem Computer mit Details über sie auflisten.

Wir haben Millisekunden-Unterstützung zu mehreren Funktionen hinzugefügt, darunter Files.CreationDate, SQL, XL und JavaScript-Funktionen.

Unsere Trace-Funktionen protokollieren jetzt besser. Wir können die stderr- und stdout-Meldungen auf dem Server protokollieren. Trace kann pausiert werden und enthält Fortschrittsmeldungen von DynaPDF-Funktionen und für Audit protokollieren wir welches Feld protokolliert wird.

Für ListDialog-Funktionen haben wir Spaltenbreite und Ausrichtungen hinzugefügt. OCR-Funktionen sind pro Thread, so dass sie parallel auf serverseitigen Skripten laufen können. Wir haben SystemInfo.LinuxSystemInfo hinzugefügt, um Informationen über Linux-Computer abzufragen. Wir haben SystemInfo.WindowsSystemInfo und SystemInfo.WindowsMachineInfo hinzugefügt, um Informationen über die Umgebung unter Windows abzufragen wie die CPU Architektur.

Schließlich haben wir CURL auf Version 7.76.1, DynaPDF auf 4.0.52.146, SQLAPI auf 5.1.4 mit neuer DuckDB-Unterstützung und unsere Linux-Build-Maschine auf Ubuntu 18.04 aktualisiert.

Alle Änderungen in den Release Notes.

MBS FileMaker Plugin, version 11.2pr8

New in this prerelease of version 11.2 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/, in Dropbox folder or ask for being added to the dropbox shared folder.

Improving our OCR functions for FileMaker Server

When we made our OCR functions back in September 2012, we designed them without reference numbers, so you can only have one current OCR job. Since FileMaker Pro always runs one script at a time (others are waiting), this is not a problem. But what happens on a server?

On a FileMaker server scripts may run in parallel. For a lot of customers this is no problem when occasionally a script runs, which may use OCR. But our active power users tend to do more and run scripts in parallel on multiple CPU cores. And there the mess starts with one script clearing the results of the other one since we hold the OCR state in a few global variables. You can mitigate this yourself with our Mutex functions, which allow you to have a script wait for another script to finish accessing a shared resource. While intended for our SharedMemory functions to synchronize memory access, it works fine to control access to OCR functions, too.

To fix the issue, we move to using per thread variables for our version 11.2 of the plugin. That means you can now have independent OCR setups on a FileMaker Server. Since FileMaker Server uses different threads to run scripts in parallel, you may have each script basically do the initialization, use OCR and do cleanup. If one script runs on first thread and initializes and later another script on second thread tries to access it, it may not see the initialization. You may detect this state by OCR.IsInitialized function. (more)

MBS FileMaker Plugin, version 11.2pr7

New in this prerelease of version 11.2 of the MBS FileMaker Plugin:
  • Added SystemInfo.LinuxSystemInfo function.
  • Changed OCR functions to separate different threads on server better.
  • Updated DNS functions for Windows.
  • Updated DLL linking for Windows to direct link functions requiring Windows 7. Plugin works on Windows Server 2008r2 or newer, too.
  • Changed trace output for audit to show field name audited.
  • Fixed problem on Windows with AVRecorder.AddPreviewWithControl and AVRecorder.AddPreviewToWindow not using the FileMaker window, but a separate one.
  • Fixed problem with XML.ExtractText and XML.GetPathValue not seeing all text if there are XML nodes within a text block.
Download at monkeybreadsoftware.com/filemaker/files/Prerelease/, in Dropbox folder or ask for being added to the dropbox shared folder.

Bitsundso Download

For everyone watching regularly the Bitsundso Plus stream, we got a nice utility app (made in my spare time) to download the current episode as video:



You can download current version here: BitsundsoDownload.dmg

You need to specify the ID and password for the login. Than you specify where the ffmpeg command line tool is and where to store the video file. By default it will be put on desktop. Our tool just performs a login on Bitsundso website, gets the video stream URL, picks the 720p stream and downloads it by running ffmpeg. It shows you progress and opens video file on the end. Settings are saved for next run, so you can just run it every week, when you got the push for the new episode.
We have it in use for years now. With this update Apple Silicon is included and we made adjustments for Big Sur. Great for offline watching.

Have fun!

Older blog entries:

2021-05-10 Linux System Info
2021-05-04 MBS FileMaker Plugin, version 11.2pr6
2021-05-04 RFID reader for use with FileMaker
2021-05-04 One month till dotfmp 2021
2021-05-01 MBS FileMaker Plugin, version 11.2pr5
2021-04-30 MBS Plugin Quiz
2021-04-25 Customize your FileMaker solution
2021-04-23 Linux Compiler Upgrade
2021-04-22 Drei Monate bis zur Deutschen FileMaker Konferenz 2021 in Malbun
2021-04-21 Option Click for FileMaker Script Workspace
2021-04-21 MBS FileMaker Plugin, version 11.2pr4
2021-04-19 Query MBS Version from plugin in container
2021-04-18 MBS Plugin versions shipped
2021-04-18 GMail for emails with MBS Plugin
2021-04-15 Lost messages
2021-04-14 MBS FileMaker Plugin, version 11.2pr3
2021-04-09 Claris switches to Ubuntu for Linux servers
2021-04-08 Thank you for the birthday cards
2021-04-08 We are Claris Partner
2021-04-07 MBS FileMaker Plugin, version 11.2pr2

Archives

Jun 2021
May 2021
Apr 2021
Mar 2021
Feb 2021
Jan 2021
Dec 2020
Nov 2020
Oct 2020
Sep 2020
Aug 2020
Jul 2020
Jun 2020
May 2020
Apr 2020
Mar 2020
Feb 2020
Jan 2020
Dec 2019
Nov 2019
Oct 2019
Sep 2019
Aug 2019
Jul 2019
Jun 2019
May 2019
Apr 2019
Mar 2019
Feb 2019
Jan 2019
Dec 2018
Nov 2018
Oct 2018
Sep 2018
Aug 2018
Jul 2018
Jun 2018
May 2018
Apr 2018
Mar 2018
Feb 2018
Jan 2018
Dec 2017
Nov 2017
Oct 2017
Sep 2017
Aug 2017
Jul 2017
Jun 2017
May 2017
Apr 2017
Mar 2017
Feb 2017
Jan 2017
Dec 2016
Nov 2016
Oct 2016
Sep 2016
Aug 2016
Jul 2016
Jun 2016
May 2016
Apr 2016
Mar 2016
Feb 2016
Jan 2016
Dec 2015
Nov 2015
Oct 2015
Sep 2015
Aug 2015
Jul 2015
Jun 2015
May 2015
Apr 2015
Mar 2015
Feb 2015
Jan 2015
Dec 2014
Nov 2014
Oct 2014
Sep 2014
Aug 2014
Jul 2014
Jun 2014
May 2014
Apr 2014
Mar 2014
Feb 2014
Jan 2014
Dec 2013
Nov 2013
Oct 2013
Sep 2013
Aug 2013
Jul 2013
Jun 2013
May 2013
Apr 2013
Mar 2013
Feb 2013
Jan 2013
Dec 2012
Nov 2012
Oct 2012
Sep 2012
Aug 2012
Jul 2012
Jun 2012
May 2012
Apr 2012
Mar 2012
Feb 2012
Jan 2012
Dec 2011
Nov 2011
Oct 2011
Sep 2011
Aug 2011
Jul 2011
Jun 2011
May 2011
Apr 2011
Mar 2011
Feb 2011
Jan 2011
Dec 2010
Nov 2010
Oct 2010
Sep 2010
Aug 2010
Jul 2010
Jun 2010
May 2010
Apr 2010
Mar 2010
Feb 2010
Jan 2010
Dec 2009
Nov 2009
Oct 2009
Sep 2009
Aug 2009
Jul 2009
Apr 2009
Mar 2009
Feb 2009
Dec 2008
Nov 2008
Oct 2008
Aug 2008
May 2008
Apr 2008
Mar 2008
Feb 2008
XML: RSS Feed XML: Atom Feed

Start Chat