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

Trigger FileMaker Scripts from JavaScript in FileMaker without fmp URL


Did you know you can have a callback from JavaScript in a web viewer in FileMaker without using FMP URL scheme?

For MacOS and iOS in FileMaker 16 or newer, you can use the WebKit message handler feature. First you call Webview.AddScriptMessageHandler function to register a name:

MBS( "Webview.AddScriptMessageHandler"; Name )

Next you can use it in Javascript to trigger a script in FileMaker from JavaScript:

window.webkit.messageHandlers.test.postMessage({'filename':'WebView Message Handler.fmp12', 'parameter':'Hello World from JavaScript', 'scriptName':'test'});

And you can evaluate an expression in JavaScript:

window.webkit.messageHandlers.test.postMessage({'evaluate':'MBS( "Msgbox"; "Hello from Evaluate in JavaScript" )'});

As you see, we get for our message handler a new entry in the namespace called window.webkit.messageHandlers.test. This allows us to call postMessage method there and this triggers the plugin code to trigger scripts or do evaluation. The parameter to the postMessage must be a Javascript object with a few properties:
  • fileName: The name of the file with the script.
  • scriptName: The name of the script to trigger.
  • parameter: The parameter to pass to the script.
  • evaluate: The expression to evaluation.
This works nice for 2 years now and we'd love to see what you can do with this technique.

You can define a JavaScript function to wrap this and install it with WebView.RunJavaScript into the web viewer or include it in the html document:

function CallFileMaker(FileName, ScriptName, Parameter)
{
    window.webkit.messageHandlers.test.postMessage({'filename': FileName, 'parameter': Parameter, 'scriptName': ScriptName });
}

Works in FileMaker Pro, Runtimes and in apps based on the FileMaker iOS SDK.

ISO FileMaker Magazin Videos


Matt Petrowsky from the ISO FileMaker Magazine has an amazing library of video content related to FileMaker. You can subscribe on the website and enjoy a lot of tutorials and video talks about learning FileMaker.

Currently for the time of the COVID-19 pandemie he provides a new series on Youtube:

Learning FileMaker: Covid 19 Solution.

We are honored to be mentioned in episode #4 where Matt talks about enhancements in FileMaker provided by MBS Plugin:

Learning FileMaker: Episode #4 - Enhancing your development environment

Enjoy the series and have fun learning FileMaker!

We are Claris Partner


We are now a Claris Partner as we just renewed our FBA membership:

It is already 8 years since we applied for this and being a Claris Partner helps:

The listing on the website as well as recommendations to prospects by Claris employers helps to bring business to your company. You get a discount for license purchase so you can make some money selling your solution bundled with the FileMaker licenses and offer one stop shopping to your clients. You can list your products on the marketplace and use Solution Bundle Agreement if you like to sell a lot of bundles. Access to beta versions, extra training sessions, exclusive partner meetings and a few test licenses are included, too.

If you like to become Claris Partner, you can read more on the FileMaker website.

FAQ for our Birthday Sale


Our birthday sale is a way to give every user a thank you with a 20% price reduction. We really do encourage everyone to take advantage of it and make sure you have all your licenses updated to current versions.

The special offer for 20th birthday of Monkeybread Software ends on 30th April. On 1st May we will remove all notices for it and disable thereafter the coupon codes.

If you have a license expired before June 2019, you could buy a new license with discount as that is usually cheaper than multi year updates.

Purchases going through Paypal should get the discount applied automatically, so the amount shown on Paypal website is the reduced price. If you accidentally paid full price here, we may just refund the 20% or add 3 extra months to the licenses.

For our web shows via Share-It and FastSpring, you can use the coupon code 20years and for most links on our website it should be included automatically.

Government entities or public authorities may just order via email & invoice as usual. We still prefer orders through the web shop with an official credit card as that is processed right away.

If you made a purchase in April without applying the discount, we can offer you to simply extend the license for 3 additional months as often a partial refund is not possible.

You can order multi years updates if you like for up to 5 years. If you buy a new license, you can right after buying the new license also buy the updates.

Finally, thanks for your support and for keeping the company running for another 20 years!

PS: Please make sure your license covers summer 2020, so you get current plugin to use with next FileMaker & Xojo versions.

Convert a SVG image to PNG with alpha channel


You can use GraphicsMagick functions in MBS FileMaker Plugin to convert a SVG to a PNG image with transparency.

To assist there we add a new GMImage.ReadFromContainer function to our plugin. This allows you to create the picture, configure it and then load the picture into the image. When you set background to transparent in a picture with alpha channel, you can preserve the transparency from the SVG. And as you specify a size for the picture and reading it, you can scale the SVG to the size you need:

 

# Load image from container

Set Variable [ $image ; Value: MBS( "GMImage.New"; "500x500"; "transparent" ) ] 

 

# turn on alpha channel and set background to transparent

Set Variable [ $r ; Value: MBS( "GMImage.SetType"; $image; 7 ) ] 

Set Variable [ $r ; Value: MBS( "GMImage.SetBackgroundColor"; $Image; "transparent" ) ] 

 

# Read SVG

Set Variable [ $r ; Value: MBS( "GMImage.ReadFromContainer"; $image; SVG to PNG::InputFile; "500x500"; 0; "SVG" ) ] 

# Output to container and release image

Set Field [ SVG to PNG::OutputFile ; MBS( "GMImage.WriteToPNGContainer"; $image; "test.png") ] 

Set Variable [ $r ; Value: MBS("GMImage.Free"; $image) ] 

If you have questions or need a newer plugin including the new plugin, please don't hesitate to contact us.


MBS FileMaker Plugin, version 10.2pr2


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

MacOS System Preference Links


Since MacOS 10.10 we got links to open system preferences and point user to a specific preference panels.

In general you have "x-apple.systempreferences:" as URL scheme followed by the bundle ID of the preferences panel. Not all preference panes can be accessed this way and some have special parameters for sub panels. Here is the list:
Preference PaneBundle IdentifierCan be opened via URL?
Accountscom.apple.preferences.usersno
Appearancecom.apple.preference.generalno
Bluetoothcom.apple.preferences.Bluetoothno
ClassroomSettingscom.apple.ClassroomSettingsno
DateAndTimecom.apple.preference.datetimeno
DesktopScreenEffectsPrefcom.apple.preference.desktopscreeneffectno
DigiHubDiscscom.apple.preference.digihub.discsno
Displayscom.apple.preference.displaysno
Dockcom.apple.preference.dockno
EnergySavercom.apple.preference.energysaverno
Exposecom.apple.preference.exposeno
Extensionscom.apple.preferences.extensionsno
FibreChannelcom.apple.prefpanel.fibrechannelno
iCloudPrefcom.apple.preferences.icloudyes
Inkcom.apple.preference.inkno
InternetAccountscom.apple.preferences.internetaccountsno
Keyboardcom.apple.preference.keyboardno
Localizationcom.apple.Localizationno
Mousecom.apple.preference.mouseno
Networkcom.apple.preference.networkno
Notificationscom.apple.preference.notificationsyes
ParentalControlscom.apple.preferences.parentalcontrolsno
PrintAndFaxcom.apple.preference.printfaxno
PrintAndScancom.apple.preference.printfaxno
Profilescom.apple.preferences.configurationprofilesno
Securitycom.apple.preference.securityyes
SharingPrefcom.apple.preferences.sharingyes
SoftwareUpdatecom.apple.preferences.softwareupdateyes
Soundcom.apple.preference.soundno
Speechcom.apple.preference.speechyes
Spotlightcom.apple.preference.spotlightno
StartupDiskcom.apple.preference.startupdiskno
TimeMachinecom.apple.prefs.backupno
TouchIDcom.apple.preferences.passwordyes
Trackpadcom.apple.preference.trackpadno
UniversalAccessPrefcom.apple.preference.universalaccessyes
Walletcom.apple.preferences.walletno
(more)

Query FileMaker records as JSON


When you need FileMaker records as JSON, you can just query them via MBS Plugin functions. Use FM.SQL.Execute first to run SQL and get reference number to result in memory. Then call FM.SQL.JSONRecords to get the records as a JSON array. This has high performance and may be faster than looping in a script to build the JSON in pure FileMaker functions.

Once you have the JSON, you may just pass it to FileMaker's data API to move records to another server or pass them as payload for a web service. Within the SQL you can make adjustments to the data. For example you insert fixed values with putting them in the SQL (text in single quotes), you can use CONCAT to concat texts or use CAST() to change data type in SQL. By passing field list to FM.SQL.JSONRecords, you can rename the fields to match whatever you target service expects.

# get related teams
Set Variable [ $r ; Value: MBS( "FM.SQL.Execute"; Get(FileName); "SELECT \"UUID\", \"ID\", \"ID_Abteilung\", \"Team.Name\", \"Txt_Anz.Mia\" FROM \"Teams\" WHERE ID_Abteilung=?"; Abteilung::ID) ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "SQL error" ; $r ]
Else
    # fill as json in field
    Set Field [ Abteilung::JSON_Abteilung ; MBS( "FM.SQL.JSONRecords"; $r; "UUID¶ID¶ID_Abteilung¶Team.Name¶Txt_Anz.Mia") ]
    Set Variable [ $e ; Value: MBS( "FM.SQL.Release"; $r ) ]
End If

Don't forget to release memory when you are done by calling FM.SQL.Release function.
Check also FM.SQL.JSONRecord to just get one row as JSON object. Use FM.SQL.InsertRecords to insert records into another table in another file within FileMaker or FM.SQL.InsertRecordsToSQL to insert records to a foreign database, e.g. MySQL. You can use FM.SQL.CSV to get records as CSV for exporting.

This works in runtime applications and may be useful in all FileMaker apps to collect data to send to a web service, e.g. to FileMaker Server's DATA API.

If you have questions, please don't hesitate to contact us.

Virtuelle FileMaker Stammtische


Da aktuell kein Restaurant oder Biergarten offen hat, verlegen sich viele Stammtische ins Internet.

Dienstag war der Virtueller, überregionaler FileMaker Stammtisch vom Holger Darjus organisiert. Immerhin 56 Leute waren zur Spitzenzeit online!

Heute Abend findet dann der Hamburger Stammtisch virtuell statt. 2. April, gegen 19 Uhr per Zoom teilnehmen: Zoom Link.

Voraussichtlich findet der Ulmer Stammtisch die Woche darauf auch virtuell statt.

Der Zürcher Stammtisch findet am 17. April online statt. Anmeldung

Generell bietet es sich an, dass FileMaker Entwickler aus dem ganzen Deutschsprachigen Raum sich regelmäßig treffen. Und reihum können verschiedene Leute die Moderation übernehmen.

MBS FileMaker Plugin, version 10.2pr1


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

MBS Birthday Sale


We celebrate in April 2020 the 20th anniversary of our company. Founded on 1st April 2000 as a sole proprietorship, we later upgraded in 2005 to a GmbH (limited) and over the years even got staff. As we trade as Monkeybread Software, we got a trademark for this name. Since 2001 we provide Xojo plugins and since 2006 we provide a FileMaker plugin.

Thanks to the thousands of customers around the world, who support us by buying licenses over the years. Thank you for the feedback, the greetings and the good testimonials we got.

Our party got moved to 2021 where we celebrate 20+1 years of the Monkeybread Software next year. Same party may also celebrate 15 years of MBS FileMaker Plugin, my 40th birthday and 20 years of our MBS Xojo Plugins.

As a thank you for all our existing and new customers, we offer for April a 20% discount on purchases for all our licenses. Coupon code 20years needs to be entered for web shop to get the discount. For links to PayPal directly from our website, we can just reduce the amount automatically.

If you need a license or an update, please enjoy the discount. This includes our licenses as well as DynaPDF licenses. If your license expires in the future, you can order this month and extend your license for up to five years in the future!

Otherwise have a great spring time at home, stay healthy and see you at the next conferences!

New Examples 2020


ThumbnailNew Examples 2020

(English)

19:05 minutes

We made a new video to show you a few newer examples for MBS FileMaker Plugin this spring. Later download the plugin to try the examples yourself.

Watch on our website or on Youtube.

Topics

0:15Signature Field
2:40Barcode functions on MacOS
8:10WebView.Evaluate on MacOS
11:20Font in Script Workspace
13:50WebView.Evaluate on Windows
14:40Barcode functions on Windows
15:20WebView.PostURL
17:35Windows Media Player (WMPF functions)

Looping over records in FileMaker with error checking


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.

(more)

MapKit functions in MBS Plugins


Stefanie made a poster for our MapView functions in MBS FileMaker Plugin:



Learn more:
Available for Xojo via MBS Xojo MacFrameworks Plugin: MapKit classes.

20 year party moved to 2021


After long discussions we decide to move our 20 year party to the year 2021. Same location, same setup, but simply a year later.

In April 2020 our company will turn 20 years old and we celebrate a bit at home.
We'll plan to have a big party next year in Germany near our office with over 100 guests.

All people invited for this year will be asked to contact us in early 2021 whether they join the party in April 2021. We'll send new invitations next year to remind everyone.

The new date has the advantage that it's close to XDC 2021, so customers from America may extend their stay in Europe and join our party.

Please stay healthy and enjoy some time home with family.

New in the MBS FileMaker Plugin 10.1


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)

Trip to New York and Nashville cancelled


Due to the decision of the US government to ban us from coming to the USA (see press release), we cancel our trips to the USA.
  • For the FileMaker meeting on Thursday we'll try to join via WebEx.
  • The Xojo meeting in New York in the steak house could take place, but just without us.
  • For the Xojo.Connect conference we expect to find some solution. We'll probably provide our session as video on our website. Maybe we can hold it via video conferencing from today. This also offers the chance for Xojo Inc. to allow virtual attendance to the conference by streaming the sessions.
  • The Claris Engage conference is in August and we hope the flu season is over by then. But we will not book/pay a booth and tickets until we know the ban is liften and doesn't get extended till summer.

PS: The Xojo.Connect conference is cancelled. Also the PauseOnError in St. Louis for FileMaker developers is cancelled.

FileMaker Stammtisch Braunschweig (virtuell)


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).

Mehr Informationen: xing.com/events/filemaker-stammtisch-braunschweig-virtuell

Checking out the party location


We went to the party location for our 20 years Monkeybread Software event. Our mascot directly found a chair at the bar, but the bartender didn't show up that day.

In April 2020 our company will turn 20 years old and we celebrate.
We'll plan to have a big party here in Germany near our office with over 100 guests.

We hope for good weather and plan to do some barbecue and have a bouncy castle for the kids. They have a lovely terrasse for sitting outside, a big smoker for some great barbecue and be hired a DJ to entertain us.

If you like to join and you miss an invitation, you can contact us and ask whether your invitation got lost. Today we sent a few more invitations. In total something like 600 people invited, but most can't come. As people confirm they are coming, we'll add them to the guest list. If we run out of space, we may put people on the wait list. If you can't make it, please respond soon, so we don't need to contact you again later.

MBS FileMaker Plugin 10.1 - More than 6100 Functions In One Plugin


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.

For Contacts we got CNContact.DeleteValue to delete a value and CNContact.Show to show a contact on screen. Please use CNContactPicker.Show to show a picker to pick a contact from your address book on MacOS and iOS.

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.

See release notes for a complete list of changes.

Older blog entries:

2020-03-10 Neues MBS FileMaker Plugin 10.1 - Über 6100 Funktionen in einem Plugin
2020-03-08 Sort Layouts and Fields in FileMaker
2020-03-08 New York FileMaker Meeting
2020-03-05 MBS FileMaker Plugin, version 10.1pr7
2020-03-03 Permanent column widths for FileMaker
2020-03-02 MBS FileMaker Plugin, version 10.1pr6
2020-03-01 20 Years Monkeybread Software Party
2020-02-28 MBS Syntax Colorizing saves the day!
2020-02-28 The new JSON.EqualContent function
2020-02-26 Upcoming deprecations for MBS FileMaker Plugin
2020-02-25 Merge PDF with table of contents
2020-02-24 MBS FileMaker Plugin, version 10.1pr5
2020-02-20 Heute anmelden zur Deutschen FileMaker Konferenz 2020 in Malbun
2020-02-18 Signed up as sponsor for Claris Engage 2020
2020-02-15 MBS FileMaker Plugin, version 10.1pr4
2020-02-13 Improve your work live balance with do not disturb
2020-02-12 Automate login to FileMaker Admin Console in web viewer
2020-02-12 Core Location Geocoder with JSON
2020-02-10 MBS FileMaker Plugin, version 10.1pr3
2020-02-10 FileMaker vs. CURL versions

Archives

Apr 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