« Rome FileMaker Week 2… | Home | MBS @ FMTraining.TV -… »

News in MBS FileMaker Plugin 14.2

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


For MBS FileMaker Plugin 14.2 we include new XL functions to create conditional formatting in an Excel file created in a script. While you can always load an existing document with conditional formatting or diagrams and just fill the cells with data, we now can create the rules for conditional formatting in a script. Our blog article explains exactly how this works: Conditional Formatting in Excel exports from FileMaker. Just take a look and try it out.


We have added new functions to the JSON component. With the JSON. Merge function, we can merge several JSON objects or JSON arrays. We specify the individual objects or arrays in the parameters and receive our merged JSON as a result. For arrays, we check if the value is already there and if not, we add it. For objects, we check the values for each key. If it doesn't exist, we copy it over. If it exists, we check arrays and objects again, but other values just get replaced.

Another new function is the JSON.ReplaceEvaluate function. It searches for all values that match a JSONPath expression and replaces them with the result of a given evaluation. If the JSONPath evaluation fails, it returns an error. The two new functions JSON.CurrentMatch and JSON.CurrentMatchPath are particularly useful in the expression. They return a JSON for the current find, or the corresponding current match path.

See also: JSON Replace with evaluate.


Imagine you have a container value and this container value also contains a preview image that you don’t want at. You can now remove this preview from your container by calling the new function Container.RemovePreview. If a PDF contains a JPEG or PNG for preview, this function removes it. Also removes JPEG preview for PNG or TIFF images. The function then returns the container value without preview.


With the new Math.MovingAverage function, you can now also determine the moving average. In the parameters of this function, you first specify the type of algorithm you want to use for the calculation. This can be Simple, Weighted or Exponential. Then follows our list of values and finally we enter the window size that we want to use for smoothing. This can look like this, for example:

MBS("Math.MovingAverage"; "simple"; 
"100.99¶101.75¶103.02¶104.43¶102.77¶101.79¶100.93¶99.08¶99.24¶" & 
"100.21¶101.83¶102.12¶102.37¶102.41¶102.8¶104.34¶104.40¶103.81¶" & 
"104.85¶104.53¶106.14¶105.66¶105.31¶104.95¶104.13¶103.04¶101.88¶" & 
"100.95¶99.25¶99.63¶97.99¶97.73¶98.33"; 5)

Result: 100.99 101.37 101.92 102.5475 102.592 102.752 102.588 101.8 
100.762 100.25 100.258 100.496 101.154 101.788 102.31 102.812 103.268 
103.556 104.044 104.386 104.746 104.998 105.298 105.318 105.238 104.618 
103.862 102.99 101.85 100.95 99.94 99.11 98.586


The next new function we introduce is the Dictionary.HasKeys function. We can use it to check whether there are certain keys in a dictionary. We simply enter the keys we are looking for in the parameters next to the dictionary reference. This second parameter is a list with the searched key names.


To decide whether close boxes are displayed in your list dialog, we have now added the two functions ListDialog.GetShowCloseBox and ListDialog.SetShowCloseBox.

We set ListDialog.SetShowCloseBox to 1


The new QuickList.HasValues function allows us to determine whether a quicklist contains certain values. To do this, we specify a list of values in the parameters, which is compared with the quicklist. If the values are included, they appear in the list returned by this function.

Let( [
	list = MBS("QuickList.New"; "Hello¶World¶123"); 
	found = MBS("QuickList.HasValues"; list; "World¶Other¶123"); 
	r = MBS("QuickList.Release"; list)

]; found)


MongoDB also has a few new functions that we would like to introduce to you now. With the functions MongoDB.GetAppName and MongoDB.SetAppName you can get or set the client application name.

Under MongoDB you can now also execute client commands. MongoDB.ClientCommand Execute a command on the server, interpreting options according to the MongoDB server version. The function MongoDB.ClientCommandWithServerId goes even further and we can specify a server id in the parameters with which we specify a specific server.

The new function MongoDB.ClientCommandQuery creates a cursor which will execute the command when MongoDB.CursorNext is called on it.


There are also new features for Mac and the iOS SDK


With the new functions in the Files component, we can now determine and set whether a file is system or user-related Immutable. To do this, the corresponding flag is read or set. Please have a look at our Files.IsSystemImmutable, Files.IsUserImmutable, Files.SetSystemImmutable, Files.SetUserImmutable functions.


There is also a new function in the PDFKit area: PDFKit.SelectPrinter. With this function you call the printer picker and can select a printer in your iOS app. If the user has selected a printer, we receive a return of 1. If a printer was selected before, we pre-select it for the next time you show the dialog.

See also Controlled printing for iOS in FileMaker.

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

21 05 24 - 08:34