Recently I got a client complaining about a crash in FileMaker Server with a script using plugin functions. A look on the trace output from our plugin via MBS("Trace"; $path) function call to write a log file showed the problem. The loops where running endless. And an endless loop eventually causes trouble when some resource is limited, e.g. available memory.
Looking on the script we basically found this a couple of times:
Go to Layout [ “MyTable” (MyTABLE) ; Animation: None ]
Perform Find [ Restore ]
Go to Record/Request/Page [ First ]
Loop
# process record
#
# next
Go to Record/Request/Page [ Next ; Exit after last: On ]
End Loop
For privacy reasons, I removed the code to process the record and renamed the layout and file here. But otherwise the script contains a few of those loops and not all loops work well. Does the script look fine? Look and decide before you continue to read.
In this article I want to introduce you to the new functions from the MBS FileMaker Plugin in version 10.1.
JavaScript
In the last plugin version we introduce the new JavaScript component. With those functions it is possible to use JavaScript without the help of a web viewer. In this version we have added some features, that simplify the work with JavaScript functions.
Times and dates in JavaScript are passed as floating pointer numbers. The function “JS.Now” returns us the number of milliseconds since the 1st January 1970. So we can determine the current time in combination with the “JS.TimeToDateComponents” function. This function returns us a JSON object with the individual specifications like year, month, day, hours, minutes, seconds, milliseconds, weekday, timezone and weekday
Here you see an example script: Set Variable [ $JS ; Value: MBS( "JS.New" ) ]
Set Variable [ $time ; Value: MBS("JS.Now";$JS) ]
Set Variable [ $Res ; Value: MBS( "JS.TimeToDateComponents"; $JS;$time) ]
Set Variable [ $r ; Value: MBS( "JS.Free";$JS ) ]
If you combine this function with the “JS.UTCDateToTime” function you can get such a JSON of a FileMaker timestamp. “JS.UTCDateToTime” convert a FileMaker timestamp to the time format that the function “JS.Now” uses. Additionally there is a function that converts the millisecond output back to a FileMaker readable timestamp. This function is called JS.TimeToUTCDate.
We have also added counting functions that count the number of objects and global strings. In an empty JavaScript environment there are already about 1000 strings and about 400 objects. So if you want to find out how many objects and strings are added, you have to subtract the basic amounts.
(more)
Heute findet der FileMaker Stammtisch Braunschweig virtuell statt via Zoom: Mittwoch, 11. März um 19:00 Uhr.
Die Chance für alle deutschsprachigen FileMaker Freunde drumherum diesmal live dabei zu sein.
Marcel Moré erzählt bestimmt was zum neuen Claris Connect und den anstehenden Konferenzen.
Vermutlich zeige ich was wir neues im MBS Plugin dieses Jahr haben mit diversen Beispielen (keine Folien).
Nickenich, Germany - (March 10th, 2020) -- MonkeyBread Software today is pleased to announce MBS FileMaker Plugin 10.1 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.1 has been updated and now includes over 6100 different functions, and the versatile plugin has gained more new functions:
Optimized syntax highlighting for MacOS to be faster on scrolling. You can now pick a font via preferences dialog or via SyntaxColoring functions to use a custom font for script workspace and calculation dialogs. The MBS Plugin now remembers column widths for themes, custom menus, data sources, security and privileges and value lists dialogs in FileMaker. We added new context menu entries for several lists in FileMaker to sort entries, e.g. to sort layouts or fields by name.
For Windows check the new WebView.PostURL function. Use it to load a website with GET or POST method and include POST data, e.g. to send a form directly and show resulting webpage. Pass additional headers with the request including a different user-agent, e.g. to pass a browser check which do not like Internet Explorer. Our preferences dialog for Windows can take your license key directly.
With SharedMemory functions you can store named values in memory shared with other applications on the computer. The content persists till a reboot or when you delete it and can be read even when FileMaker is quit in-between.
In GraphicsMagick functions we can now extract thumbnail from EXIF data in a JPEG image. And you can check the font map used for annotating with text using GMImage.FontMap.
The CLGeocoder functions can now return result as JSON block. For Windows Media Foundation Player, you can now take screenshots and play the video/audio as loop. With DynaPDF you can now use the Windows certificate store to pick a certificate using a standard dialog when signing a PDF document. Using FM.SetDisableContextualMenus you can now disable context menus for FileMaker.
Our JavaScript functions got new functions to convert time to/from JavaScript. We got an automatic type detection mode for FileMaker XML on the clipboard. Our styled text handling on MacOS can now handle strikethrough attribute. Using ScriptWorkspace.StyledScriptText and ScriptWorkspace.CopyScriptText you can automate to save scripts.
Finally we updated to newer Plugin SDK, CURL version 7.69.0, DynaPDF to 4.0.37.107, SQLAPI to 5.0.5 and SQLite to 3.31.0.
10. März 2020 - Monkeybread Software veröffentlicht heute das MBS Plugin für FileMaker in Version 10.1, mit inzwischen über 6100 Funktionen eines der größten FileMaker Plugins überhaupt. Hier einige der Neuerungen:
Wir haben die Syntaxeinfärbung für das Scrollen unter MacOS optimiert. Sie können über den Voreinstellungsdialog oder über die SyntaxColoring Funktionen eine eigene Schrift auswählen, die das MBS Plugin dann für Berechnungen oder Skripte verwendet. Unser Plugin kann sich jetzt die Spaltenbreite für mehr Listen merken bei externe Datenquellen, Designs, Eigene Menü, Sicherheit und Wertelisten. Über einen neuen Eintrag im Kontextmenü können Sie mehrere Listen in FileMaker automatisch sortieren lassen, z.B. die Liste der Layouts oder Felder.
Für Windows probieren Sie bitte die WebView.PostURL Funktion um eine Webseite mit GET oder POST aufzurufen. Übergeben Sie optional POST Daten, z.B. um ein Formular abzuschicken und direkt das Ergebnis zu sehen. Mit zusätzlichen Header Einträgen können Sie beispielsweise einen anderen User-Agent angeben. Damit überlisten Sie die ein oder andere Browser Überprüfung, die vielleicht den Internet Explorer nicht mag. Für Windows haben wir einen Voreinstellungsdialog um direkt die Lizenzdaten einzugeben.
Mit den neuen SharedMemory Funktionen können Sie Daten im Arbeitsspeicher ablegen und mit anderen Programmen austauschen. Der Inhalt bleibt auch im Arbeitsspeicher, wenn FileMaker zwischendurch beendet wird.
Für Kontakte haben wir die CNContact.DeleteValue Funktion um leichter Werte zu löschen. Nutzen Sie CNContact.Show um einen Kontakt auf dem Bildschirm anzuzeigen. Mit CNContactPicker.Show rufen Sie, für MacOS und iOS,einen Dialog auf um einen Kontakt aus dem Adressbuch zu wählen.
Die GraphicsMagick Funktionen können ein Vorschaubild aus den EXIF Daten eines JPEG Bildes laden. Sie können die Schriften Liste mit GMImage.FontMap einsehen, die wir für Annotationen verwenden.
Für DynaPDF können Sie jetzt per Dialog aus dem Windows Certificate Store ein Zertifikat zum Signieren eines PDF Dokumentes auswählen. Per FM.SetDisableContextualMenus können Sie Kontextmenüs für FileMaker deaktivieren.
Unsere JavaScript Funktionen können jetzt Zeitwerte von/nach JavaScript konvertieren. Für unsere XML Funktionen, betreffend FileMaker Daten in der Zwischenablage, haben wir jetzt die automatische Erkennung von Inhalt eingebaut. Die Funktionen für Texte mit Stilelementen für MacOS unterstützen “durchgestrichen” als Attribut. Mit ScriptWorkspace.StyledScriptText und ScriptWorkspace.CopyScriptText können Sie automatisiert den Text des aktuellen Skripts abfragen. Die CLGeocoder Funktionen können das Ergebnis jetzt als JSON Block zurück geben. Beim Windows Media Foundation Player können Sie jetzt, vom aktuell gezeigten Bild, Fotos erstellenund den Film oder Ton als Schleife laufen lassen.
Außerdem haben wir das Plugin SDK aktualisiert, CURL auf Version 7.69.0, DynaPDF auf 4.0.37.107, SQLAPI auf 5.0.5 und SQLite auf 3.31.0.
We'll have a presentation to whatever is new in the MBS FileMaker Plugin 2020. And Vincenzo Menanno presents about InspectorPro.
Looking forward to see a few FileMaker developers there!
If you are interested in private time for consulting, training or discussion MBS or FileMaker topics, we can of course schedule a meeting. Please contact me directly interested.
Did you notice that FileMaker does not remember what column width you set for several dialogs?
We had this feature for some time for 3 dialogs: fields, tables and layouts. Today we extend this to include value lists, themes, custom menus, custom functions, external data sources, security and privileges.
This feature will be included in next MBS Plugin prerelease. If you like to try it now, email us.