Jump to content

Recommended Posts

Posted

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

Saxon

A completely new area that we plan to further expand in the next releases is the connection to the Saxon library. Saxon is a widely used and high-performance software library that specializes in the processing and transformation of XML and XSLT data. It enables developers to manipulate data efficiently and convert it into the desired formats. We would now make these functions from the library available to you in FileMaker. We have already included several functions in this release, but there will certainly be more to come in the future. To find out what the plugin can already do, take a look at the blog article Saxon in MBS FileMaker Plugin

CURL

This time we also have a new function in the CURL area. With CURL.GetEarlyDataSent we get the number of bytes sent as TLS early data. if this amount is negative, the sent data was rejected by the server. TLS allows a server that announces support for early data to reject any attempt to use it at its own discretion. When for example 127 bytes had been sent, but were rejected, it reports -127 as the amount "sent".

JSON

We have 3 new functions in our JSON area. With the function JSON.ArraySlice we can slice a JSON array. We can specify the desired range in the parameters and can even decide whether we want to get the array back as text or as a reference. Here you can see an example: 

Set Variable [ $res ; Value: MBS("JSON.ArraySlice"; "[\"Banana\", \"Orange\", \"Lemon\", \"Apple\", \"Mango\"]"; 0; 3) ]

As a result, we get back the array ["Banana", "Orange", "Lemon"]. 

 

Also new are our two functions JSON.SetVariables and JSON.ClearVariables. With JSON.SetVariables we can define one or more local variables in a script via a JSON and then use them in the further process. Here you can see an example: 

Set Variable [ $JSON ; Value: "{}" ]
Set Variable [ $JSON ; Value: JSONSetElement ( $JSON ; "Name" ; "Smith" ; JSONString ) ]
Set Variable [ $JSON ; Value: JSONSetElement ( $JSON ; "FirstName" ; "Anna" ; JSONString ) ]
Set Variable [ $JSON ; Value: JSONSetElement ( $JSON ; "Age" ; 23 ; JSONNumber ) ]
Set Variable [ $r ; Value: MBS("JSON.SetVariables"; $JSON; "") ]
Show Custom Dialog [ "Variables" ; "Name: " & $Name & "¶FirstName: " & $Firstname & "¶Age: " & $Age ]

We first compile a JSON with the individual variable values and then set these as variables in the script. They can then be used here. We output them in a dialog. 

 

FM15.0_B1.png

The JSON.ClearVariables function resolves these variables.

DynaPDF

There are also a few new features in the DynaPDF area. First, we have the functions DynaPDF.GetLastTextPosXAbs and DynaPDF.GetLastTextPosYAbs. These two functions provide us with the X and Y coordinates of the last printed text. This is the absolute position after the coordinate transformation. If you want to determine the relative position, use the DynaPDF.GetLastTextPosX and DynaPDF.GetLastTextPosY functions. 

With the new function DynaPDF.CheckEmbeddedFileCheckSum you can now check the checksum for an embedded file. We get a 1 as a return if the checksum is correct and a 0 if it is invalid. If there is no checksum, we get a -1 as return.

Next, I would like to introduce you to the DynaPDF.ConvToFreeTextCallout function. This function converts a regular FreeText annotation to a FreeTextCallout annotation.

The last new DynaPDF function we would like to introduce today is the DynaPDF.DeleteOutputIntent function. A PDF file can contain more than one output intent. We can even count them by calling the DynaPDF.GetOutputIntentCount function. With the new DynaPDF.DeleteOutputIntent function we can remove one or all output intents. In the parameters we can enter the index of the output intent we want to delete. If we enter -1 here, all will be deleted. The result of the function is the number of remaining output intents. 

XL

Our XL area, which provides functions for working with Excel, also has new functions. With the functions XL.Book.SetCoreProperty and XL.Book.GetCoreProperty we can now set and query CoreProperties. To do this, we only need to set the name of the property, we want to set or query in the parameters. You have the following properties available: Categories, Comments, Constructor, Created, CreatedAsDouble, Creator, LastModifiedBy, Modified, ModifiedAsDouble, RemoveAll, Subject, Tags, or Title. With the function XL.Book.RemoveAllCoreProperties we can remove all core properties.

With the function XL.Book.RemoveAllPhonetics we can remove all phonetics data (furigana) from a workbook. 

Furthermore we have the two new functions XL.Sheet.ColFormat and XL.Sheet.RowFormat With these functions you can determine the Row and Column format. 

Shell

Today I would like to introduce you to our two new functions, Shell.SetMergeErrorAndOutput and Shell.GetMergeErrorAndOutput in the Shell area. With these two functions we can set and query whether one or two pipes should be used for output and error. 

DragDrop

We also have a new cool function in the DragDrop area. You can use DragDrop.GetPathList to get a list of all documents that were dropped in the DragDrop area during the last drop action. Previously, we only had the DragDrop.GetPath function with which we could read the individual paths one after the other by specifying an index. Now we have a function that outputs these paths as a list in one go. 

Archives

We also have a new function in our Archive topic. Sometimes people forget to close the currently open archive before trying to open a new one. This can cause a lot of confusion in some cases and we have added the Archive.IsOpen function in this area to check whether an archive is currently open. 

Audit

Do you already know our audit functions? With these you can log changes in your databases. In this release we have added 2 new functions. With this function we can set whether we want to ignore fields that are empty during creation. The functions Audit.SetIgnoreEmptyFieldsForCreate and Audit.GetIgnoreEmptyFieldsForCreate are now available for this purpose.

Barcode

When working with barcodes, we have various libraries that you can use to generate and recognize barcodes. Zxing is one of these libraries. If you want to check which version of the zxing library you are currently working with, use our new function Barcode.Version. If you would like to query one of the other libraries, take a look at the functions Barcode.LibVersion and Barcode.ZBarVersion. 

Mac

There are also new features for Mac and the iOS SDK

Image Playground

The new macOS 15.2 also introduced the Image Playground, which allows us to create images with the help of an AI and also integrate existing images into this process. We have now also made this Image Playground from Apple available for FileMaker. If you would like to find out more, please take a look at our blog article Use Image Playground in FileMaker. 

ImagePlaygroundFileMaker1.jpg

Storekit

In our StoreKit topic we would like to simplify the handling of errors. With StoreKit.SetRequestFailedTrigger you now have the option of setting a script that is executed when your request fails. We also have the new function StoreKit.LastError with which you can read out the last error that occurred as JSON. This JSON contains the information code, domain and localized message. 

Dialog

We have two new functions in the dialog area. The functions Dialog.GetKeyEquivalent and Dialog.SetKeyEquivalent get and set the key equivalent for a button. This allows you to get and set which button is activated with escape key (Char(27)), which is activated by return key (Char(13)) and which is activated by other characters. 

Goodies 

We have also enhanced our goodies for you in this release. We now offer you better auto-completion in connection with own functions. We have also added a corresponding checkbox to our settings dialog. 

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.