MBS FileMaker Plugin 12.5 News
In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 12.5.
One Plugin for FileMaker AND Claris
Recently, the first version of the Claris product line has been released.
We are proud to announce that our plugin will also work on the new platform and you can use it there as usual.
The best thing is that you can use the same plugin file for FileMaker and the new Claris. This is the first and currently the only plugin worldwide that works on both platforms equally.
|Watch video about MongoDB
MongoDB and MBS - A look under the hood
Since version 12.3 there is the possibility to connect your FileMaker solution directly to a MongoDB and work with the data on both sides. Normally, each change in the database is immediately committed as soon as it has been made. But this is not always desirable, e.g. when it comes to security relevant things where multiple records have to be changed. If in the meantime the connection breaks we don't know in which state our database is, which records have been changed, which not. For this we have the so called transactions, with which we can command the database to make all changes at the same time. We have now implemented this transaction for you in context with MongoDB. With the function MongoDB.StartTransaction we start a transaction, then we can use the rest of the functions to make changes to the database. At the end we decide if we want to commit these changes to the database with the function MongoDB.CommitTransaction or if we want to abort the transaction. For this we use the MongoDB.AbortTransaction function. If a transaction is currently running in the database we can check with MongoDB.InTransaction. The current status of a transaction can be checked with the MongoDB.TransactionState function which distinguishes between None, Starting, InProgress, Committed or Aborted.
We are happy to report that some developers did speed testing and our plugin is certainly faster performing than using a web service to talk to MongoDB since we can cache some things locally and keep a connection for multiple requests. And in contrast to some other mongo DB connectors, we can write records.
The Matrix component has been in the MBS FileMaker Plugin family for a few years. The two-dimensional list is made up of rows and columns and can store data. Whether it is numbers or strings. Until now you could only assign names to individual rows and columns. Especially with large matrices this could be very annoying if we had to do it by hand. For this reason we have developed the two new functions Matrix.SetRowNames and Matrix.SetColumnNames. You can pass these functions a list in the parameters that name your rows or columns. You may use the row names also to associate UUIDs to the records without having the UUID within one of the columns.
Another new function in the Matrix section is Matrix.ConvertDataType. With it you can convert the data types of the whole matrix or a certain area into a certain data type. For example, if you have a matrix with only numbers as text strings, but you want to have these values as numbers, you can use this function to convert the values to numbers. You can convert the values of a matrix into Number, Container, Date, Time, TimeStamp or Text. Just specify the type you want in the parameters. You can also convert only a part of the matrix into a certain data type by defining the range in optional parameters, for this you specify the first and last row and the first and last column of this range. A call of the function can then look like this.
Set Variable [ $r ; Value: MBS( "Matrix.ConvertDataType"; $matrix; "number"; 0; 2; 0; 2) ]In this example, the values in the range of First to Third Row and First to Third Column are converted to numbers.
Since a long time we have the component LDAP in our plugin. FileMaker can use LDAP or Active Directory for authentication. You can manage users in FileMaker database and send updates to your authentication server via our plugin. You can query different attributes for a directory. With the new functions LDAP.GetBinaryKeys and LDAP.SetBinaryKeys you can set and query information which attributes should be handled as binary data. By default we handle attributes ending in name with uuid or guid as binary.
You probably already know that many of our functions work with references into the main memory.
This makes our functions very efficient.
You can have several references in memory at the same time.
To have an overview of the references of a certain type we have a function in many components that lists these references.
In this release we add some list functions in different areas.
The Current Window
We also have another interesting function that you can use on Mac and Windows on the desktop and macOS. With the new App.GetFocussedWindowTitle with this function we query the name of the window currently in focus. This may be used in calculations triggered by context menu or hotkeys to know which window is in front.
Photo Picker for iOS
There is also a new feature for iOS: the Photo Picker. Now you can integrate a panel to import images from photos library in your iOS SDK App. It queries the photos library without the need of a permission dialog. With 16 new functions you can handele your photos easily.
With the PhotoPicker.Available function you can check if you can use the functions on the system where your app is installed. With the function PhotoPicker.SetSelectionLimit you can limit the amount of photos you can select. The PhotoPicker.Present function presents the photo picker view. In this view we can select the photos. After selecting the photos we want to do something with the photos, for this we have to set a script that will be called after the photos are selected. We set the script, that will be started, before opening the Photo Picker, with the PhotoPicker.SetScript function. With the function PhotoPicker.ImageCount we can then determine how many images were selected and PhotoPicker.File can read out the filepath by specifying the index. With the function PhotoPicker.Error we can determine whether and which error occurred while loading the image. We have included an example to try it out in the plugin. A more detailed description you can find in the blog article PhotoPicker for iOS with FileMaker iOS SDK
There is a new great functionality for Windows
Windows users can now celebrate,
because we have a new search field in the relationship graph with which you can search in this graph.
In the Mac, we have this control already built-in a while ago. But until now it was not possible in Windows despite all our efforts. We wish you a lot of fun with this goodie. If you want to know more about it, please have a look at our article Search relationship graph for Windows.
Please send us your feedback as we may improve this in the future.
There are two new functions for Windows that you can use to read and set whether a file or folder is read only. With the function Files.IsReadOnly you read the read only flag and with the function Files.SetReadOnly you set the flag. Both files need a native path, so you know with which file you should work. Did you know that MBS also provides a function to convert FileMaker internal paths to native paths? Just use the Path.FileMakerPathToNativePath function.
We hope you will also find some interesting new features. We wish you a lot of fun with MBS FileMaker Plugin Version 12.5. If you need a license or have any questions, please contact us.