« News from the MBS Xoj… | Home | Configure Audit funct… »

MBS FileMaker Plugin 12.2

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

Error Count for MBS functions

For years we already have the isError function in the MBS FileMaker Plugin. We can call this after a MBS function to see if the previous MBS function returned an error. If you use many MBS functions in a script this can get confusing and it might be enough for you, e.g. if you are testing a script, to know if a plugin function in the whole script throws an error at all. For this we have developed two new functions. With the HadErrors function you get back the number that is currently in the error counter. This will be incremented by one whenever a MBS function returns an error. If you want to log the errors of a script, you first have to call the ClearErrors function to set the Error Count to 0. At the end of the script you can then call the HadErrors function.

Tag list from Word files

We also have a new function for the WordFile section. With the WordFile.Tags function we get a list with all tags that a specific Word file contains. This is especially useful for debugging. The range in which tags are listed depends on the markers set by the WordFile.SetMarkers function. With it we can limit the search range.

JSON

The function JSON.Import that we already have in the plugin since version 5.4 has now got a new RootTableName parameter so that you can specify the name of the RootTable by yourself. By default it is json.

Mac

There are also new features for Mac and the use of our plugin with the FileMaker iOS SDK:

JavaScript for Mac

In the component JavaScriptMac has changed a lot in this release. This component, available in the plugin since version 5.4, allows us to run JavaScript code on a Mac or in the iOS SDK without a WebViewer. You can now call JavaScript functions global in your databases. To do this, you first write a JavaScript function that you can store in a separate database, for example. You register this function with JavaScript.RegisterFunction in a global working environment, which you create with JavaScript.New with which you can now even give its own name, and then call it from another FileMaker database with the new functions JavaScript.CF and JavaScript.CallFunction. The difference between the two new functions is that with the CF Function we can only call functions from the default working environment "js". JavaScript.CallFunction on the other hand gives us the freedom to choose our own JavaScript context.
If you want to know more about it read our blog article: Custom Functions in JavaScript reloaded

The other new features in this component are the two functions JavaScript.GetPropertyJSON and JavaScript.SetPropertyJSON. As the name suggests we can retrieve properties as JSON and also set them with a JSON. This way, a lot of information can be exchanged between the JavaScript engine and FileMaker in one shot.

Dialog Modifications

The DialogModifications functions are now also available for the iOS SDK. This part makes it possible to overwrite the standart texts of FileMaker error messages dialogs with your own texts. In this way we can better customize the dialogs and help the user to better understand the dialog. We can also use the new DialogModifications.List function to output a JSON that lists the dialogs that we have already modified. This lets us as programmers keep a better overview.

Clipboard

The clipboard functions are very handy to put data to the clipboard and query it from there. For Mac and the iOS SDK you can now also put PDF files on the clipboard and retrieve them again. The Clipboard.GetPDF and Clipboard.SetPDF functions are now available for this purpose. When setting and retrieving the PDF, we work both times with container values.

We hope you will also find some interesting new features. We wish you a lot of fun with MBS FileMaker Plugin Version 12.2. If you need a license or have any questions, please contact us.

09 06 22 - 13:42