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

Run scripts via Data API with FileMaker Plugins


As you may know the FileMaker Server Data API does not load plugins. If you need to run a script using plugins, you need to use a little trick. You query the application version of the script engine running the script. If you get back "FileMaker Data API Engine 18.0.1", you know the script is run via Data API. Now you can branch to the same script on the server scripting engine. That is a different process on the FileMaker Server which does load plugins. Then you return the result back to the calling script. Let us show you an example script:

If [ Position ( Get(ApplicationVersion) ; "Data API" ; 1 ; 1 ) > 1 ]
    # forward call to Server Scripting Engine
    Perform Script on Server [ Specified: By name ; Get(ScriptName) ; Parameter: Get(ScriptParameter) ; Wait for completion: On ]
    Exit Script [ Text Result: Get(ScriptResult) ]
End If

Exit Script [ Text Result: "MBS: " & MBS("Version") & ", Server: " & Get(ApplicationVersion) ]

As you see we forward parameter and get back the result. So without the trick with the if block, we get back from the script:

"MBS: ?, Server: FileMaker Data API Engine 18.0.1"

and with the if loop and our forward:

"MBS: 10.0.0.9, Server: Server 18.0.1"

And you can use MBS Plugin on the server via Data API.

We recommend to check LastError via Get(LastError) function call after Perform Script on Server to see if you got "Hosts capacity exceeded" with error number 812. In that case it may be good idea to make a 10 second script pause and try again.

PS: See also product idea: Support plugins in Data API

Xojo Meeting in Berlin


We are coming back to Berlin in June, so we plan a Xojo developer meeting for 2nd June 2020.

Topics may be the last and upcoming Xojo conferences, what's new in recent Xojo and MBS Plugin releases and your experiences in development.

Interested? Please contact us soon to be added to the attendee list, so we reserve enough space.
We may have a few give aways, as usual.

CRC function in FileMaker using JavaScript


Recently a client asked how to leverage JavaScript in FileMaker to do a specific calculation. For this blog post we replace the client's function with a CRC function to show you how to do it.

 

Up until a few weeks ago we would have pointed to loading JavaScript in a web viewer and using WebView.RunJavaScript to run the JavaScript. But now we would point to WebView.Evaluate and just run it. See the example script in our documentation for this CRC function.

 

With MBS FileMaker Plugin in version 10.0 we got our own JavaScript functions using the DukTape engine. We have an example in the documentation to run the CRC function right in a Let command and the JS.Evaluate command. But instead of initializing it each time in a Let statement, you may prefer to split this into three scripts, so you do the initialization only once.


(more)

MBS FileMaker Plugin 10.0 - More than 6000 Functions In One Plugin


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

In this release we include with JavaScript functions our own JavaScript engine based on the DukTape opensource project. Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint. You can evaluate JavaScript snippets, get and set global properties and add custom functions written in JavaScript. Those JavaScript functions work on FileMaker Server for server side scripts including WebDirect and PSoS.

For web viewer on Windows using Internet Explorer you can use WebView.Evaluate function to run JavaScript and get the result back. Call JavaScript function with WebView.CallFunction function and pass parameters and receive results. We convert between FileMaker data types and JavaScript, so numbers are passed as numbers and not converted to text. WebView.Evaluate is supported on MacOS, Windows and iOS.

With MacOS Catalina and iOS 13 Apple includes new machine learning capabilities, which you can use in your applications to update a model on device with new training data. Improved SyntaxColoring.AddContextMenuCommand for MacOS to add separators and add hotkeys to menu entries.

For Windows use WMFP functions to play video/audio independent of FileMakers's container field control. This includes playing audio in background. We added more parameters to Printer.SetPrinter function to set paper format, orientation and source.

In your FileMaker iOS SDK application use DocumentCameraScan functions to scan documents via camera on iOS, rectify them and store them in container fields or files. Use ContinuityCamera functions to scan documents or take pictures on iOS and store them in your database on Mac. Use EIDSDK functions and Zetes Bluetooth card reader on iOS to scan Belgian ID cards.

Use Window.PositionNextDialog function to position dialogs in FileMaker on MacOS and Windows. Check network statistics with SystemInfo.NetworkStats function and copy multiple files parallel with Files.CopyFiles function. Added DynaPDF.CreateGoToAction and related to add links to tables in PDF. We improved XML.ToJSON, SmartCard.ReadFile and performance for EventMonitor functions on Windows and receiving data in CURL for POP3 and IMAP protocols.

Finally we updated DynaPDF to version 4.0.37.101, CURL to 7.67.0, LibArchive to 3.4, SQLAPI to 5.0.3, zint to 2.7, LibXL to 3.8.8 and Xcode to version 11.3.

See release notes for a complete list of changes.

MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0


Nickenich, Germany - (January 14th, 2020) -- MonkeyBread Software today is pleased to announce MBS Xojo Plugins 20.0 for macOS, Linux and Windows, the latest update to their product that is easily the most powerful plugin collection currently available for Xojo. MBS Xojo Plugins have been updated and now includes over 2600 classes and 67,000 documented features, and the versatile plugins have gained more new functions:

In this release we include with JavaScriptEngineMBS class our own JavaScript engine based on the DukTape opensource project. Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint. You can evaluate JavaScript snippets, get and set global properties and add custom functions written in Xojo or JavaScript.

For HTMLViewer on Windows using Internet Explorer as engine, we got new classes like IEDocumentMBS to offer many more features. We deprecated the older IE methods on HTMLViewer to declutter auto complete. And our new class brings you an Evaluate function to run JavaScript and get back the result as variant. You can call JavaScript functions and pass Xojo variants for parameters, so we pass numbers as numbers and not convert them to text. Use SetInternetExplorerVersion function to request a newer Internet Explorer version for HTMLViewer.

With MacOS Catalina Apple includes new machine learning capabilities, which you can use in your applications to update a model on device with new training data. Enjoy new events in WKWebViewControlMBS control to decide policy for navigation and load HTML files easier. Use the WKBackForwardListMBS class to navigate the history.

Enjoy ImageMagick in version 7 and use it with 8 to 64-bit color depth per pixel component and optionally HDRI support. For LCMS2TransformMBS class you can now use multi threading to run transformation in parallel.

For Windows use MFPMediaPlayerMBS to play video/audio independent of Xojo's MoviePlayer control. If you use WindowsPlayerMBS class to play mp3 files, you can now choose the audio device.

Use LMFitMBS and related classes for Levenberg-Marquardt least squares fitting algorithm. Solve boolean satisfiability problem with LGLMBS class. When using iTunesLibraryMBS class to read iTunes library content, you can now do initialization in a thread to not block user interface.

Finally we updated DynaPDF to version 4.0.37.101, CURL to 7.67.0, LibArchive to 3.4, SQLAPI to 5.0.3, zint to 2.7, LibXL to 3.8.8 and Xcode to version 11.3.

See release notes for a complete list of changes.

Neues MBS FileMaker Plugin 10.0


14. Januar 2020 - Monkeybread Software veröffentlicht heute das MBS Plugin für FileMaker in Version 10.0, mit inzwischen über 6000 Funktionen eines der größten FileMaker Plugins überhaupt. Hier einige der Neuerungen:

Diese Version bring eine eigene JavaScript Umgebung mit zum Ausführen von JavaScript Skripten. Mit der Open Source DukTape Bibliothek haben wir eine eingebettete, portable und kompakte JavaScript Laufzeitumgebung. Berechnen Sie Ausdrücke in JavaScript, lesen oder setzen Sie globale Variablen und definieren Sie eigene Funktionen. Diese JavaScript Funktionen können Sie auf dem Server in Skripten verwenden inklusive WebDirect.

Für den WebViewer unter Windows mit Internet Explorer haben wir eine neue WebView.Evaluate Funktion um JavaScript auszuführen und das Ergebnis in FileMaker zu verarbeiten. Rufen Sie JavaScript Funktionen direkt über die WebView.CallFunction Funktion auf und übergeben Sie mehrere Parameter. Wir konvertieren zwischen JavaScript und FileMaker Werten, so dass Zahlen als Zahlen übergeben werden und nicht als Text. Wir unterstützen WebView.Evaluate auf MacOS, Windows und iOS.

Mit MacOS Catalina und iOS 13 bring Apple neue Funktionen für Maschinelles Lernen mit, so dass wir ein Modell jetzt auf dem Gerät mit neuen Trainingsdaten anpassen können. Mit der verbesserten SyntaxColoring.AddContextMenuCommand Funktion können Sie Tastenkombinationen definieren und Separatoren einfügen.

Für Windows verwenden Sie die neuen WMFP Funktionen zum Abspielen von Audio/Video Dateien unabhängig von interaktiven Containerfeldern, inklusive dem Abspielen von Musik im Hintergrund. Wir haben neue Parameter für die Printer.SetPrinter Funktion um das Papierformat, Orientierung und Papierquelle anzugeben.

In Ihrer Anwendung basierend auf dem FileMaker iOS SDK können Sie die DocumentCameraScan Funktionen verwenden um Dokumente unter iOS zu scannen, gerade auszurichten und in ein Containerfeld oder eine Datei abzulegen. Mit den ContinuityCamera Funktionen können Sie Bilder mit einem iPhone oder iPad erstellen und das Bild in die Datenbank am Mac einfügen. Mit den EIDSDK Funktionen steuern Sie den Zetes Bluetooth Kartenleser an und lesen belgische Personalausweise aus.

Positionieren Sie Dialoge in FileMaker mit der Window.PositionNextDialog Funktion bei MacOS und Windows. Fragen Sie die Netzwerkstatistiken ab mit SystemInfo.NetworkStats und kopieren Sie mehrere Dateien parallel mit Files.CopyFiles. Mit der DynaPDF.CreateGoToAction Funktion können Sie Aktionen anlegen und mit Tabellenzellen in PDF Dokumenten verknüpfen. Wir haben XML.ToJSON und SmartCard.ReadFile verbessert und die Geschwindigkeit für EventMonitor Funktionen bei Windows sowie den Empfang von Daten in CURL für IMAP und POP3 verbessert.

Außerdem haben wir die DynaPDF Bibliothek auf Version 4.0.37.101 aktualisiert, CURL auf 7.67.0, LibArchive auf 3.4, SQLAPI auf 5.0.3, zint auf 2.7, LibXL auf 3.8.8 und Xcode auf Version 11.3.

Alle Änderungen in den Release Notes.

Different colors for variables in FileMaker


Did you know you can define different colors for your calculations in FileMaker for macOS?
  • Normal variables: $test
  • Global variables: $$test
  • Variables in Let starting with tilde: ~test
  • Variables in Let starting with cent: ¢test
  • Variables in Let starting with underscore: _test
  • Specific variables like $$UserID with a different color, so you see when it's misspelled.
Those colors can be useful to distinguish different variables to read code easier and find logical mistakes in your code better. Please use SyntaxColoring.AddTag function in MBS FileMaker Plugin to change values as needed. Check fmSyntaxColorizer database from MrWatson included with our examples to define your own color set.

Xojo Developer Conference 2020


Just about two months till the XOJO.CONNECT 2020 in Nashville, Tennessee, USA starts. Today is the last day to get tickets for early bird prices with a $100 USD off.



It will be held March 25-27, 2020 in Nashville, TN at the Sheraton Music City Hotel. This conferences is the best place to meet Xojo developers from around the world in real live, make contacts, present yourself as expert and learn what is new in Xojo. Registration is currently $100 off full price till Tuesday night (14th January). Please sign up early to get the best deal.

Don't forget to reserve a hotel room. Can be cancelled later free of charge, so you don't loose anything by reserving one now. If you find a better deal, you can cancel it.

Check out the conference highlights video if you want to see what it's like - or ask one of the many attendees from the forum!

Speakers wanted for Claris Engage 2020


Claris Inc. is looking for speakers for the upcoming Claris Engage conference. Apply here.
As speaker you receive a complementary ticket and hotel room for the conference. This year



Claris International Inc. hosts the Claris Engage conference in Nashville, August 3-6 2020.
We will probably attend and have a booth as usual, so see you there!

Individual licenses for MBS Xojo Plugins


As you may know we have currently 40 plugins for Xojo. We offer licenses for 37 plugins as a package, named the Complete Set. But still DynaPDF, SQL and ChartDirector plugins cost us royalties, so those are not included in the set. The other 37 plugins can be purchased separately. Our web site shows in the order page about 20 parts with direct links.

For next release 20.0 we upgraded our license key system to be able to generate keys for all parts individually. For the store we just added an "other" item as place holder. A few people asked over the last year for licenses to individual licenses, so we got this now.

Please notice the dependencies list. For example when you would purchase AVFoundation plugin, you also need Main, MacBase, MacCG, MacCocoa, MacControls and MacCF installed. Those plugins must be installed to build an application using a single AVFoundation class. If you use one of the classes from he other plugins, you may need the other plugin license, too. That is the reason we offer users interested in those plugins the whole package to avoid them later run into an issue with a missing license.

Nevertheless, if you can't afford Complete Set and you need one of the plugins, you are welcome to order a license. If you take the other item in the store, we'll ask you which one you want. And if you later prefer Complete Set within a few weeks, we may just refund the old part.

MBS Xojo Plugins, version 20.0r8


New in this prerelease of the 20.0 plugins:
  • Updated DynaPDF to version 4.0.37.101.
  • Added EqualContent method to JSONMBS class.
  • Changed OpenStream for PortAudioStreamBufferedMBS class to always change format to Float32.
  • Fixed ReadError and ReadOutput for WindowsProcessMBS class to return empty string when called with value zero.
  • Added parameter for FindValueInArray and FindValueInObjectArray in JSONMBS class to compare by content.
  • Updated JavaVMMBS constructor to better find Java libraries.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 10.0pr8


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

MBS FileMaker Plugin, version 10.0pr7


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

MBS Xojo Plugins, version 20.0r7


New in this prerelease of the 20.0 plugins:
  • Added threaded parameter for Constructor in iTunesLibraryMBS class.
  • Changed the text file embedded in xojo plugin files to include a random build UUID which is different each time a plugin is built as well as a Plugin UUID which doesn't change for the same plugin.
  • Implemented synchronous EvaluateJavaScript for 32-bit in WKWebViewControlMBS control and fixed bug in 64-bit.
  • Added ChannelMask and DeviceID properties to WindowsPlayerMBS class.
  • Added OpenDialogItemMBS class.
  • Added Items and Files methods to OpenDialogMBS class.
  • Added WindowsPlayerDeviceMBS class.
  • Fixed problem with Progressive property in JPEGExporterMBS not always being used.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

Document Camera Scan functions for FileMaker iOS SDK


We just added DocumentCameraScan functions for use with FileMaker iOS SDK to scan documents right with the camera and insert them right in a container field the database:



Just call DocumentCameraScan.Initialize on startup and later call DocumentCameraScan.Scan function to show the dialog. When you set a script with DocumentCameraScan.SetScript to be triggered after the scan, you can use DocumentCameraScan.PageCount to query number of pictures. You can get the pictures with DocumentCameraScan.PageImage function and put them into container. Or use PDFKit functions to build a PDF document.

Included later tonight in 10.0pr7 plugin version.

MBS Workshop in Malbun bei der FileMaker Konferenz


In Zusammenarbeit mit dem Verein FM Konferenz bieten wir eine Schulung zum MBS Plugin an. Am 17. Juni 2020 können Sie in Malbun, Liechtenstein an einer eintägigen Schulung teilnehmen. Lernen Sie die über 6000 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 und in der dann aktuellen Version
  • 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 Formulars auf einer Webseite
    • Bilder bearbeiten
    • PDF Verarbeitung
    • Druckerfunktionen
    • Barcodes und Zahlungsscheine
    • Einbinden von Webservices with JSON/XML für REST/SOAP.
    • Senden und Empfangen von Emails.
  • Fragen und Antworten
Die Teilnahme kostet 150 CHF (Frühbucher bis 20. Februar 2020) bzw. 200 CHF inkl. Verpflegung und MWSt.. Trainer ist der Plugin Entwickler und Monkeybread Software Geschäftsführer Christian Schmitz persönlich. Beginn gegen 9 Uhr und Ende gegen 17 Uhr.

Anmeldung bei Monkeybread Software.

Am Abend vorher treffen wir uns zum gemütlichen Beisammensein im Restaurant vom Konferenzhotel. Im Anschluss an die Schulung können Sie gleich rüber zum Apero gehen und die anderen Teilnehmer kennen lernen.

Bei Fragen und Themenwünschen melden Sie sich bitte direkt bei uns.
Weiter Schulungstermine: 6. Feb 2020, 7. Mai 2020 und 3. Sep 2020 bei der Denkform in Wiesbaden.

MBS FileMaker Plugin, version 10.0pr6


New in this prerelease of version 10.0 of the MBS FileMaker Plugin:
  • Added WebView.CallFunction to call any JavaScript function on Windows.
  • Added WebView.Evaluate function to evaluate JavaScript expression and get back result for Windows.
  • Fixed problem with plugin detecting runtime as normal FileMaker Pro.
  • Improved conversion from Windows VARIANT to FileMaker value for Windows functions (WMI, WIA and WebView).
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

MBS Xojo Plugins, version 20.0r6


New in this prerelease of the 20.0 plugins: Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

Evaluate JavaScript for web viewer in Windows


Imaging what you could do in a web viewer in FileMaker or HTMLViewer in Xojo if you could evaluate JavaScript and get back the result?



Coming soon for MBS FileMaker Plugin for MacOS, Windows & iOS and MBS Xojo Plugins for MacOS, Linux & Windows.

Array size allocation in Xojo


When you allocate an array in Xojo, you may wonder how many bytes are allocated and when.

We measured a bit and it looks like allocating an empty array will just allocate the array structure, but not allocate data for the array values. Then when you append the first value, the memory is allocated for 16 values, byte size depending on byte size of elements. Then whenever the appended values fills the allocated space, the allocation is resized to make room for more values. The number of values added is doubled each time as you see in our table:

From UboundSize in BytesNumber of values
-100
01281616
163844832
4889611264
1121920240128
2403968496256
49680641008512
10081625620321024
20323264040802048
40806540881764096
8176130944163688192
163682620163275216384
327525241606552032768

When you do a redim on the array, you set the allocated size to the array to an explicit value. So unless redim has already the value of ubound, a new memory block will be allocated and data is copied. There is no optimization to just change internal ubound and keep array allocation if e.g. size is just shrinking by one or two. We made a feedback request to ask for optimization: Feedback 58755.

What to do? Whenever you fill an array and you know the final ubound in advance, you can use redim beforehand and then set values. Otherwise you use append or insert methods which dynamically allocate new memory when you hit the current allocation limit.


Older blog entries:

2020-01-04 Whether to order updates or not
2020-01-03 MBS Meeting in Netherlands
2020-01-03 xDev 18.1 Issue
2020-01-02 MBS FileMaker Plugin, version 10.0pr5
2020-01-02 MBS Xojo Plugins, version 20.0r5
2020-01-01 Welcome 2020
2019-12-31 Upgrading our HTMLViewer functions for Internet Explorer
2019-12-30 SerialPort functions in MBS Plugin
2019-12-29 Can FileMaker connect to a Microsoft Access database?
2019-12-29 Three days till year's end
2019-12-28 Position and resize FileMaker's dialogs
2019-12-28 Xojo Plugins for EyeOne Devices
2019-12-26 Windows Media Foundation Player for FileMaker
2019-12-24 Merry Christmas
2019-12-22 ChartDirector with Korean alphabet
2019-12-20 Zooming video containers on Windows
2019-12-20 MBS Xojo Plugins, version 19.6pr4
2019-12-20 MBS FileMaker Plugin, version 9.6pr4
2019-12-18 Using pinned certificates with our CURL plugin functions
2019-12-17 Train machine learning models on device

Archives

Jan 2020
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