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

Schema Change

With the new SchemaChange functions, you can monitor changes to the schema on the server and, when changes occur, log them in a table, for example, or send an email notification. In order for things to be changed on the server, we must activate this monitoring once with SchemaChange.Enable. With SchemaChange.Changes, we can then query the changes, which are then delivered to us as JSON. You may have a scheduled script running on the server to react to changes. The SchemaChange.TimeStamp function, which provides the last change time, is helpful here. The SchemaChange.Counter function provides us with the current number of changes. With SchemaChange.Clear, we can clear the list of changes. If we want to stop logging, we use the SchemaChange.Disable function. 

SchemaChange2.jpg

Phidgets

A new feature in the Phidgets section is the Phidget.WriteRFID function. This function allows you to write data to an RFID tag with your RFID Phidget, rather than just reading it. To write to a tag, it must be close to the device so that the data can be read. In the parameters of the Phidget.WriteRFID function, you can then set the text you want to write to the tag. In addition, you can lock the RFID tag against future rewriting if desired. You also have the option of selecting the communication protocol, which is PHIDGETS by default, but you may also choose EM4100, ISO11785 FDX B, HID GENERIC, or HID H10301. The chipset can also be set to T5577 or EM4305 FDX B. 

RSA

In the RSA area, we have two new functions for signing and verifying RSA digital signatures with PSS padding. Feel free to use the RSA.SignPSS and RSA.VerifyPSS functions to use RSA with PSS padding.

UUID

FM15.5_Image2.png

In this release, we also have two new functions for the UUID area. With the new UUID.UUIDv7 function, you can create a new UUIDv7 and return it as a formatted string. UUIDv7 is a version of Universally Unique Identifier that combines a Unix timestamp with random bits, allowing for both uniqueness and sortability in high-load databases and distributed systems. It is designed to improve performance and reduce the likelihood of ID collisions compared to previous UUID versions. With this function, we can also choose whether we would like to have curly brackets around the UUID. If you would like to have them, enter a 1 in the parameter. With the UUID.TimeFromUUIDv7 function, you can then query the timestamp for such a UUIDv7. This allows you to sort the UUID by date and time. 

Set Variable [ $UUID7 ; Value: MBS("UUID.UUIDv7"; 1) ]
Set Variable [ $UUID7Time ; Value: MBS( "UUID.TimeFromUUIDv7"; $UUID7) ]
Show Custom Dialog [ "UUID 7" ; $uuid7 & ¶ & $UUID7Time ]

CURL

We have also included new features for CURL in this release. With the CURL.NetworkChanged function, we inform CURL about a network change so it can discard connections or DNS cache entries. We have also added many new functions for querying data for multi-transfer. Please take a look at the functions CURL.GetMultiTransfersAdded, CURL.GetMultiTransfersCurrent, CURL.GetMultiTransfersDone, CURL.GetMultiTransfersPending, and CURL.GetMultiTransfersRunning. 

Container

With the new Container.GetMimeType function, you can display the MIME type for a file in your container. This is very useful for displaying images in web pages.

FM15.5_Image3.png

FM

Since version 11.3, you can use the FM.ErrorMessage function to query error messages for their corresponding error codes. In this release, we introduce a function that allows you to create your own new error codes with corresponding messages. In the FM.AddErrorMessage function, you only need to specify the desired error code and error message in the parameters. 

FM15.5_Image4.png

List

We have added a new function for the List and Quick List areas. With the functions List.DeleteColumn and QuickList.DeleteColumn, you can remove an entire column from a list. This can be seen in the following example:

Set Variable [ $List ; Value: Let([     
   list = MBS("QuickList.New"; "1-a-A¶2-b-B¶3-c-C"; ¶);     
   r = MBS("QuickList.DeleteColumn";    list; "-"; 1);     
   text = MBS("QuickList.GetList"; list);     
   r = MBS("QuickList.Release"; list) ]; 
text) ]
Show Custom Dialog [ $List ]

We create a list with three entries, each with three columns. We do not need the middle column for our output, so we can delete it. To do this, we first specify the list in the QuickList.DeleteColumn function, then the separator that separates the individual columns from each other, and finally we decide which column should be deleted.

 

Markdown

With the new MarkDown.HTMLDocument function, you can convert Markdown text directly into HTML-formatted text, which can then be displayed in Webview, for example.

Set Variable [ $r ; Value: MBS("MarkDown.Create"; "Text attributes *italic*, **bold**, `monospace`, ~~strikethrough~~ .") ]
Set Field [ Tabelle::html ; MBS("MarkDown.HTMLDocument"; $r) ]
Set Variable [ $r ; Value: MBS("MarkDown.Release"; $r ) ]
Set Web Viewer [ Object Name: "web" ; URL: "data:text/html," & Tabelle::html ]

FM15.5_Image5.png

We also have the option of converting Markdown into styled text. To do this, use the MarkDown.StyledText functions.

Text

We also have a few functions for the Text component. With the Text.HTMLtoStyledText function, we can convert HTML text into styled text. It uses tidy to parse the HTML and then convert the nodes to styled text for FileMaker. This way, you can preserve bold, italic, and other styles as much as possible. We also have two new functions for compressing and decompressing text. For this, we use the functions Text.ZLibCompress and Text.ZLibDecompress. Both use lib to compress or decompress the text. In the parameters, you can then specify the input and output encoding, such as Base 64, Hex, or UTF-8. 

Custom Functions

Since 15.3, we have been able to define and use custom functions with FileMaker or JavaScript code. Now, with the Plugin.CustomFunctionIDs function, you can query the IDs of registered functions as a list. Would you like to learn more about your own predefined functions? Then use Plugin.CustomFunctions to query details on all registered custom functions as a JSON. You get the ID, name, type (function or script step), the used engine (FileMaker, WebKit, or JavaScript), globals, and the prototype.

New functionalities for Windows

But we have also included additional functions for WebView in this release for Windows. For example, you can use Webview.GetProfilePath to query the full path of the profile directory. You can also specify the path to the default download folder and query it again if necessary. To do this, use the functions Webview.GetDefaultDownloadFolderPath and Webview.GetDefaultDownloadFolderPath. With the functions Webview.GetPreferredColorScheme and Webview.SetPreferredColorScheme functions, you can query and set the color scheme. The color scheme for WebView2 UI includes dialogs, prompts, and menus by setting the media feature prefers-color-scheme. The default value for this is “auto,” which will follow whatever color scheme the OS is currently set to.

WMIQuery 

The WMIQuery component has been part of our plugin for a long time. It queries the Windows Management Interface to learn about hardware and system configuration. With the new WMIQuery.JSON function, you can now have the information returned in a JSON text. If you would like to learn more, please take a look at our WMIQuery example. You can find it in our examples in the WinOnly folder.

FM15.5_Image6.png

New functionalities for Mac

There are also new features for Mac and the iOS SDK

FoundationModelsFileMaker.png

Foundation Models

AI is on everyone's lips, and Apple has also built its own LLM into macOS 26 and iOS 26. You can now access this model using the MBS functions from the FoundationModels area and use the LLM in your solutions. You can test whether this function is available for your operating system using FoundationModels.Available. To make a request, we first need to initialize the LLM. To do this, we use the FoundationModels.Initialize function. Next, we can open a new session by calling the FoundationModels.BeginSession function. You can then use the FoundationModels.Respond function to make requests in your preferred language. You can find out which languages and regions are supported with the FoundationModels.SupportedLanguages and FoundationModels.SupportsLocale functions. We can also influence the confidence of the model's responses. When working with AI, this factor is called temperature. You can set it using the FoundationModels.SetTemperaturefunction. You can find out the maximum number of tokens you will receive as a result using the FoundationModels.GetMaximumResponseTokens function. With the related function FoundationModels.SetMaximumResponseTokens, you can then specify the maximum number of tokens you can receive. Once you have finished your queries, you can close the session again with FoundationModels.CloseSession. With the FoundationModels.Transcript, you get a full history of interactions, including user inputs and model responses. If you no longer need the model, you can release it again with FoundationModels.Release or FoundationModels.ReleaseAll. If you are interested in this topic, please take a look at our article. Use Foundation Models in FileMaker 

Files

We have also added two new functions in the Files section. The Files.BSDVolumeNamefunction allows you to query the BSD volume name for a volume. The Files.USBSerialNumber function queries the USB serial number for a volume, e.g. an USB stick. 

Syntax coloring

For years, we have been providing several features for developers that you can use with a free license. Once again, we would like to introduce a new feature in this context. You can now format text in the Data Viewer. Regardless of whether it is JSON or HTML for example, clicking on the Format button will format the output text so that you get a better overview of the data. If you want to show or hide the button in the Data Viewer, you can use SyntaxColoring.SetDataViewerFormatButtonEnabled. 

FM15.5_Image7.png

We hope you will also find some interesting new features. We wish you a lot of fun with MBS FileMaker Plugin Version 15.5. 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.