New in this prerelease of version 13.1 of the
MBS FileMaker Plugin:
- Updated DynaPDF to version 4.0.72.208.
- Changed SQL functions to log SQL statements when trace is active.
- Added flag 32 for Text.TextToHTML function to use paragraphs.
- Adjusted various internals for future FileMaker versions.
Download at
monkeybreadsoftware.com/filemaker/files/Prerelease/, in
DropBox folder or ask for being added to the DropBox shared folder.
For 13.1 we get new Archive functions to build a zip archive on the fly. One of the use of deprecated ZipFile functions was to assemble an archive in memory from various files or containers. You can now do that with our Archive.Create function. Just call it to either start an on-disk or in-memory archive using the compression format and compression filter of your choice. We usually use zip for maximum compatibly, but you can also do tar or 7zip.
Next you can add content. For that you may use Archive.AddContainer to pass a container value as variable or pass a field reference. We read the content of the container and compress it in memory. If you have existing files on disk, you can use Archive.AddFile function. Please note that you can pass a list of files with relative path parts, e.g. "Documents/email.pdf¶Documents/answer.pdf" and then the base path to find them like "C:\Users\cs\Desktop\". The relative file paths end up in the archive, so they are used when expanding the archive. If you like to add a file based of text, you can use Archive.AddText to create a text file directly in the new archive.
Let us show you an example script to zip up a few PDFs in records:
Set Variable [ $r ; Value: MBS( "Archive.Create"; "zip"; "deflate") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to create zip archive." ; $r ]
Exit Script [ Text Result: ]
End If
#
Go to Record/Request/Page [ First ]
Set Variable [ $destPage ; Value: 1 ]
Loop
Set Variable [ $r ; Value: MBS( "Archive.AddContainer"; Merge PDFs::InputPDF) ]
Go to Record/Request/Page [ Next ; Exit after last: On ]
End Loop
Set Variable [ $zip ; Value: MBS( "Archive.Close"; "test.zip") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to create zip archive." ; $r ]
Else
Set Field [ Merge PDFs::FinalPDF ; $zip ]
End If
As you see, we create an in-memory archive, loop over records and add PDF containers to it. Then we close the archive passing the file name and store it in a container field.
(more)
This blog has his 15th anniversary today. We hope you enjoy reading it!
If you have idea for future blog posts, please let us know.
New in this prerelease of version 13.1 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.
Since their invasion of Ukraine, the Russian military has bombarded Ukraine for twelve months. As of today, both sides still belief they can win the war, so we have no negotiations. And don't be fouled: This war could be over tomorrow, when Russia decides to move out of Ukraine.
And I don't think the majority of Russian people supports this war. The average Russians has no benefit and may see their relatives and friends get conscripted and die in a war they don't want. The war is certainly not about supporting some Russian people in Ukraine, but more likely to get a land bridge to Crimea with the Russian naval base in Sevastopol. And no idea why they didn't start 20 years ago to move the base to Russian territory on the Black Sea.
The biggest change for us in all the war time is to get independent on our power supply. Shortly after the invasion started, we requested offers for photovoltaik systems. Solar cells, battery pack and a controller system to make sure we use our own power as long as possible and just use the grid as backup. And when I look around on the other houses, I see quite a lot of people coming to the same conclusion: We as a country have to reduce imports of fossil fuel and what individual houses owners can do is to first to use solar energy to heat water (to support e.g. a gas heating) and second to use photovoltaics to make our own power. Don't forget the battery to store power and use your own energy at night.
As of today our photovoltaik system is working and already produces a lot of energy. On sunny winter days about 50 kWh, which is enough to fill the battery and serve our own needs. And even on cloudy days it produces a few kWh and reduces our power purchases a lot. We ordered a battery extension already to make sure we can store more energy to avoid buying energy even further. And we ordered the extension to run the system standalone without power from the grid.
On a bigger level like state or county, we can support efforts to build wind turbines and new power cables to connect them. We may get wind turbines nearby in the next years here. Not as efficient as a the coast, but a possibility to reuse an older one from the coast, which got replaced with a better one and is paid off.
This war changes the world and in a few years, it may be over. But the world will be different and I expect Russia will not come back to its previous power and less exports as they used to. Not to mentioned that they loose a lot of people in the war or due to evading conscriptions.
Let's do our best to help the Ukraines to get back peace by kicking out the Russian Army!
New in this prerelease of version 13.1 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.
You have a SQL data source and you like to get JSON from it inside FileMaker to pass that JSON on to a web services or DATA API? Or you have a SQL source and you like to move records from it to FileMaker easily? Or other direction?
Since MBS Plugin supports CubeSQL, Centura SQLBase, DB2, DuckDB, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher and Sybase as data source, we can help here. ODBC itself can of course be used for many more here.
Let us show you a script to connect to a data source by its name used in the system. This means you define in ODBC control panel on macOS, Windows or Linux to define an ODBC data source. You can use the GUI on each operation system to enter the credentials and store them there, install required driver or set whatever parameter is needed. You can alternatively check our help page for SQL.Connect to see how to put these parameters to connect into the connection string.
Once you are connected, you can run a SQL command with SQL.NewCommand and SQL.Execute and grab some records. You may put in the field names in the query if you like to define the order or only pick a few fields. If your field names contains special characters like spaces, please use \" when coding them, e.g. \"My Field\". You may rename a column with AS command inside the SQL like e.g. CityName as City. And you can always put in static data as text, date or number or even use SQL functions like concating two texts like e.g. (FirstName || ' ' || LastName) as FullName. Of course these things are depending on what database you talk to and for SQL Server you would use CONCAT() function like this: CONCAT(FirstName, ' ', LastName) as FullName.
(more)
There is more to come based on questions and feedback.
IMAP
If you like to change our IMAP example to use oAuth, please use script steps like this:
Set Variable [ $r ; Value: MBS("
CURL.SetOptionURL"; $curl; "imaps://outlook.office365.com/INBOX") ]
Set Variable [ $r ; Value: MBS("
CURL.SetOptionXOAuth2Bearer"; $curl; "eyJ0eXAiOi...") ] // your oAuth token
Set Variable [ $r ; Value: MBS("
CURL.SetOptionUserName"; $curl; "test@outlook.com") ] // no password needed!
You remove the CURL.SetOptionPassword there and add the CURL.SetOptionXOAuth2Bearer with the token. For the URL make sure you have the imaps protocol with the s. A typo in the URL and nothing will work. Don't forget the user name, which is usually the email from the account. This may be or may not be the same as the from or sender email.
(more)
Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch.
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.
We talk about what is new in MBS FileMaker Plugin 13.0 including MongoDB, DynaPDF, CURL, new checkboxes in preferences and more.
(more)
Did you know that Windows 10 has a built-in OCR engine?
For
MBS FileMaker Plugin 13.1 we add new
WindowsOCR functions. These functions allow the plugin on Windows 10 to use the built-in OCR classes and expose them as functions to you in FileMaker. This was made possible by dropping Windows 7 support, so we can now use the functionality from Windows 8 to use these classes. Although if you call them on Windows 8, they will return an error. Please use
WindowsOCR.Available in your script to check whether it returns 1.
Once you know you run on Windows 10 (or 11), you can check the available languages with
WindowsOCR.AvailableRecognizerLanguages function. This function can return you the list of languages with either display name (in user's language), language tag or the name within the language itself. e.g. "German" vs. "Deutsch". You can use our
WindowsOCR.CurrentInputMethodLanguageTag function to query what language the user has for the current method of input. The user may have multiple languages installed, but this one is used when you create a recognizer without specifying the language.
(more)
You are an advanced developer using FileMaker? Then you probably know regular expressions already. Where you can write search terms to find interesting things in texts. Let us use them for our search field.
The old way to search was to enter multiple texts. We split by space characters and take each word and search for all them in a line. If all are found, the line turns yellow. That is what you know and we expect that the majority of users only types one thing to find. But there is a small fraction of power users, that ask for more.
For version 13.1 we use regular expressions for each of this words, so you can do OR searches or search with wildcards better. But since you like to search for $ variables, we escape a $ or $$ on the beginning of the search word for you. Otherwise you may do backslashes for escaping some special characters like $ or brackets.
Let us show you a few examples:
(more)
New in this prerelease of version 13.1 of the
MBS FileMaker Plugin:
- Added more WindowsOCR functions.
- Added shouldPrintBackgrounds parameter for WebView.SetPrintParameter for use in WebKit 1 and 2.
- Fixed a crash in JSON.ToHTML function.
- Added MongoDB.Command, MongoDB.AggregateDatabase and MongoDB.AggregateCollection functions.
- Updated LibXL to version 4.1.
- Added XL.Book.IsWriteProtected, XL.Sheet.DefaultRowHeight, XL.Sheet.GetTabColor, XL.Sheet.GetTabColorRGB and XL.Sheet.SetDefaultRowHeight functions.
- Added 45 new functions for XL functions to work on form controls and XL.Sheet.FormControlCount function.
- Added XL.Sheet.AddSelectionRange, XL.Sheet.GetActiveCell, XL.Sheet.RemoveSelection, XL.Sheet.SelectionRange and XL.Sheet.SetActiveCell functions.
- Added flags parameter to Matrix.Text function and a flag for Matrix.CSV and Matrix.Text to include column names in first row.
- Added the | character for script search to search for multiple words, if you use | to separate them, e.g. "abc|def|ghi" for an OR search. Multiple words otherwise do AND. Both can be combined, e.g. "abc|def x".
- Updated tiff library to version 4.5.0.
Download at
monkeybreadsoftware.com/filemaker/files/Prerelease/, in
DropBox folder or ask for being added to the DropBox shared folder.
We got a bit annoyed with the NAS being busy all day with various backups. And whenever two or three Macs do their Time Machine backups at the same time, the performance of the NAS goes way down with all the seeking of the hard disks.
Let's change Time Machine to run less often. As you may know Apple doesn't allow much configuration there for the backup interval and you can't change the system launch agent. But we can disable Time Machine in system preferences and make our own launch agent.
First you make a new text file (e.g. with BBEdit) with this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.monkeybreadsoftware.runbackup</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/tmutil</string>
<string>startbackup</string>
<string>--auto</string>
<string>--rotation</string>
</array>
<key>StartInterval</key>
<integer>43200</integer>
<key>StandardOutPath</key>
<string>/tmp/runbackup.output.log</string>
<key>StandardErrorPath</key>
<string>/tmp/runbackup.error.log</string>
</dict>
</plist>
(more)
LibXL version 4.1.0 is available with this news:
- added the conditional formatting support for xlsx files
(new ConditionalFormatting and ConditionalFormat classes)
- added the possibility to get/set an active cell and selection ranges
- added the possibility to get a color from sheet tabs
- improved the string overwriting performance for xls files
- improved the reading performance for xlsx files
- improved the sorting performance in AutoFilter (xlsx)
- added ARM64 support for Windows
- fixed a bug with cutting sheet names to less than 31 characters in Chinese
- fixed a bug with loading some xls files ("Label size is incorrect")
- fixed a bug with union multiple column filters in the Sheet::applyFilter() method (xlsx)
- fixed an issue with loading some xls files (error message "invalid jpg file")
- fixed an issue with encoding dates before the 1st of March 1900 in the Book::datePack()
- fixed an issue with loading some xlsx files with special unicode character BOM (byte order mark)
at unexpected position inside XML files
- fixed issues with copying existing sheet with named ranges in the Book::insertSheet() what led to corrupted output files
- fixed a new-delete-type-mismatch memory issue on Linux and now LibXL works with jemalloc properly
- fixed an issue with saving UTF-8 encoded filename in the Book::save() method on Windows (xlsx)
- fixed a hanging issue with loading some xls files
- fixed a bug with saving xlsx files with a lot of OLE objects
- removed the PY_SSIZE_T_CLEAN warning in python interface
The LibXL library can be used with MBS Plugins in Xojo and FileMaker. Updated plugins will be available soon. As usual we add the new functions soon. If you need help or want to try the new version early, let me know.
For our German speaking clients we have a workshop day:
In Zusammenarbeit mit der DenkForm GmbH bieten wir eine Schulung zum MBS Plugin an. Am 29. März, 15. Juni, 27. September und 29. November 2023 können Sie in Wiesbaden an einer eintägigen Schulung teilnehmen.
Lernen Sie die über 7000 Funktionen einmal näher kennen und wie Sie sie effektiv einsetzen. Sammeln Sie Ideen und verbessern Sie ihre FileMaker Lösungen durch den Einsatz unseres Plugins.
Das Monkeybread Software Plugin für FileMaker stellt eine vielseitige Erweiterung der eigenen Datenbank dar. Der Kurs bietet nicht nur einen tiefgreifenden Überblick in die Benutzung und Entwicklung, sondern bietet auch die Chance das Plugin günstiger zu erstehen.
- Einführung in das MBS Plugin
- Überblick über die Funktionsbereiche
- Neues im MBS Plugin dieses Jahr
- Rundgang durch ausgewählte Beispiele
- Gemeinsames Implementieren von Plugin Funktionen in eine Datenbank:
- Upload/Download mit CURL auf einen HTTP/FTP Server
- Ausfüllen eines Formulares auf einer Webseite
- Bilder bearbeiten
- PDF Verarbeitung
- Druckerfunktionen
- Web Hooks.
- Fragen und Antworten
Die Themen können je nach den Interessen der Teilnehmer geändert werden und wir zeigen natürlich gerne, was gerade neu und gefragt ist.
Die Teilnahme kostet 238 Euro inkl. MWSt. und Verpflegung.
Details und Anmeldung bei der Denkform.
You may know the
GetLiveText function in FileMaker 19.5 and newer?
We had our
Vision.RecognizeText function since
MBS FileMaker Plugin 9.4 in 2019. We improved our function over time, so e.g. it works on PDF documents since version 12.3.
For the next version 13.1 (now in beta), you can use our function even on Windows to quickly recognize text from images. If you need more control, you can always go to the
WindowsOCR functions.
To learn which languages are available, you can use the
Vision.SupportedRecognitionLanguages function. If you need more languages, you can install language packs on Windows, but usually there is only the language installed for the current user's language.
New in this prerelease of version 13.1 of the
MBS FileMaker Plugin:
- Added Audit.BaseTableNameForID function.
- Added ContinuityCamera.CanImport and ContinuityCamera.HasPopupMenu functions.
- Added dot as valid character for field names for syntax coloring.
- Added DynaPDF.ChangeNamedDest function.
- Added DynaPDF.SaveAndSignFileExt1 and DynaPDF.SaveAndSignFileExt2 functions to sign a PDF using external PKCS7 signature provider.
- Added FM.TextWithDataType function.
- Added iOSApp.AddSwipeGestureRecognizer and iOSApp.ClearSwipeGestureRecognizer functions to recognize a swipe gesture on your layout.
- Added JavaScript.LoadLibrary and JavaScript.Available functions.
- Added MongoDB.GetOptions, MongoDB.GetTLS and MongoDB.SetDatabase functions.
- Added PDF/UA-1 for DynaPDF.SetPDFVersion function.
- Added Plugin.IsMaintenanceExpired function.
- Added Plugin.State function.
- Added Queue Length parameter for WebHook.Listen function.
- Added shouldPrintBackgrounds to WebView.SetPreferences and WebView.GetPreferences for WebKit 2 to control printing of backgrounds.
- Added support for JavaScriptMac functions to work on Windows and Linux if you provide a JavaScriptEngine library file to load.
- Added Windows support for Clipboard.SetPDF and Clipboard.GetPDF functions.
- Added Windows support for Container.ReadImage and Container.ReadImageFile functions to e.g. load HEIF/HEIC files on Windows.
- Added WindowsML.List function.
- Added WindowsUserNotification.List function.
- Added WindowsUserNotification.SetExpiresOnReboot and WindowsUserNotification.GetExpiresOnReboot functions.
- Added WindowsUserNotification.SetExpiresOnReboot and WindowsUserNotification.GetExpiresOnReboot functions.
- Added WindowsUserNotification.SetGroup and WindowsUserNotification.GetGroup functions.
- Added WindowsUserNotification.SetNotificationMirroring and WindowsUserNotification.GetNotificationMirroring functions.
- Added WindowsUserNotification.SetPriority and WindowsUserNotification.GetPriority functions.
- Added WindowsUserNotification.SetRemoteId and WindowsUserNotification.GetRemoteId functions.
- Added WindowsUserNotification.SetSuppressPopup and WindowsUserNotification.GetSuppressPopup functions.
- Added WindowsUserNotification.SetTag and WindowsUserNotification.GetTag functions.
- Changed all SystemInfo functions to be free to use without license.
- Changed CURL.SetOptionPassword function to not show password in log.
- Changed search field for relationship graph on Windows to be a combo box.
- Deprecated PHP functions.
- Deprecated SystemInfo.isLeopard, SystemInfo.isSnowLeopard, SystemInfo.isLion and SystemInfo.isMountainLion.
- Deprecated SystemInfo.isWindows2000, SystemInfo.isWindowsXP, SystemInfo.isWindowsVista and SystemInfo.isWindows7.
- Deprecated SystemInfo.WinCSDVersion and SystemInfo.WindowsAero functions.
- Deprecated SystemInfo.WinServicePackMajor and SystemInfo.WinServicePackMinor functions.
- Enabled the WindowsML functions again for the public release.
- Fixed a bug in MongoDB.ChangeStreamErrorDocument, MongoDB.ChangeStreamResumeToken and MongoDB.NextChange functions.
- Fixed a bug with library loading for aarch64 on Linux for libusb, libidn2, libiconv and libldap.
- Fixed a link error in the simulator plugin for Apple Silicon which prevented it from loading when used in newer iOS SDK versions.
- Fixed a problem with CURL.SetProgressScriptName causing a crash when transfer went too fast.
- Fixed a problem with export dialog tooltips not showing when using the script step.
- Fixed a timing crash with option click on Set Field in newer FileMaker Pro being too quick.
- Fixed Clipboard.SetPicture to better pass transparency.
- Fixed CURL.GetProgressFileName and CURL.GetProgressScriptName functions.
- Fixed FM.SQL.InsertRecords, FM.SQL.InsertRecordsToSQL, Matrix.InsertRecordsToSQL and Matrix.InsertRecords to quote the table name for the SQL used internally.
- Fixed JavaScript.New to work on iOS again.
- Implemented local Hotkeys for Windows. So if HotKey.Register is passed Local = 1, we run a different code path to monitor keyboard instead of registering global hotkey.
- Implemented Vision.RecognizeText for Windows using WindowsOCR functions.
- Improved Clipboard.GetPicture to take JPEG, PNG or GIF directly from the clipboard if available. Falls back to bitmap if that is not available.
- Improved Clipboard.SetPicture to put PNG on the clipboard in addition to a bitmap for applications, that can read PNG forever.
- Patched SQLAPI to work again with Field() query without FetchNext.
- Rewrote the WindowsUserNotification functions.
- Updated DynaPDF to version 4.0.71.204.
- Updated DynaPDF.GetBookmark and DynaPDF.GetBookmarksAsJSON functions to return Action and NamedDest properties.
Download at
monkeybreadsoftware.com/filemaker/files/Prerelease/, in
DropBox folder or ask for being added to the DropBox shared folder.