Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My Favorite Features in the MBS Plugin

Featured Replies

My Favorite Features in the MBS Plugin

20Years.jpg

20 years of the MBS FileMaker Plugin—that’s quite an impressive time span. For two decades, the plugin has been enhancing FileMaker with features that go far beyond what’s possible with the platform’s built-in tools. I’ve been working at MBS since 2019 and, since then, of course have also been working with the MBS FileMaker Plugin. During this time, I’ve discovered, tested, and used countless features in FileMaker projects. Some of them are little helpers that save a lot of work in everyday tasks. Others open up possibilities that you might not have even thought were possible without the plugin. To mark the 20th anniversary, I’d like to share a few of my personal favorite features that have guided me on my journey as a developer.

DynaPDF: Combining PDFs and Adding Page Numbers

Let’s start with a few features from the DynaPDF topic, because that’s where I started. With DynaPDF, you can handle a wide range of PDF-related tasks. I wrote my first article in the German FileMaker Magazine in 2019 on the topic of combining PDFs and inserting page numbers. First, I imported all the PDF files one after another into the working environment using DynaPDF.ImportPDFFile, and then, in a second loop, I wrote the page numbers onto the pages using DynaPDF.WriteFTextEx.

20Years_DynaPDF.png

Goodies

20Years_Goodies.jpg

The features I use most in our plugin are, of course, the Goodies, as is probably the case for most of you. These free tools have been making life a little easier for Mac developers for years. Often, these little helpers are no longer even noticeable in everyday use because we’ve become so comfortable with them that they seem like a standard feature. Whether it’s automatic variable checking, syntax highlighting, or searching within scripts. A new feature has just been added this year, that Windows users will also appreciate. A search across all scripts. You can now perform searches using a variety of search options, and the results are displayed in a window showing script names and line numbers, so that you can, for example, make changes to a global variable one by one as you go through the list—across all scripts.


GraphicsMagick

Advent22-12-24_B3.png

The first MBS Advent calendar published on this blog in 2022 focused on GraphicsMagick. With GraphicsMagick, you can edit images, crop them, resize them, convert them, and much more. What I remember most from that Advent calendar was the 24th entry, where we turned a square image into a round one. Of course, the image wasn’t actually round, but it appears that way because we made everything outside the circle transparent. The trick was to use an image with a black circle as a mask and then use the GMImage.CompositeXY function to set the unwanted pixels to transparent.

Set Variable [ $r ; Value: MBS( "GMImage.CompositeXY"; $Cut; $GM; 0; 0  ; 2  ) ] 

You're welcome to read more about how we made it back then in Door 24 of our Advent calendar.

Barcodes

One of my favorite things in our plugin is barcodes, and that’s probably because they have such an incredibly wide range of applications. Whether in postal mail, on business cards, invoices, or on any product in the supermarket, with the plugin you can generate over 90 different barcodes and read over 10 different barcode types. Because, as you’ll learn later, I’m a big fan of JSON, the Barcode.DetectAsJSON and Barcode.GenerateJSON functions are some of my favorites. Barcode.DetectAsJSON returns all barcodes detected in an image in a JSON. In addition to the content and type, you’ll also receive a bunch of other information.

[
	{
		"format":	"UPC-E",
		"text":	"11234562",
		"isValid":	true,
		"ecLevel":	"",
		"contentType":	"Text",
		"hasECI":	false,
		"orientation":	0,
		"isMirrored":	false,
		"isInverted":	false,
		"version":	"",
		"sequenceId":	"",
		"sequenceSize":	-1,
		"sequenceIndex":	-1,
		"symbologyIdentifier":	"]E0",
		"isLastInSequence":	false,
		"isPartOfSequence":	false,
		"lineCount":	60,
		"position":	{
			"topLeft":	{
				"x":	20,
				"y":	0
			},
			"topRight":	{
				"x":	121,
				"y":	0
			},
			"bottomLeft":	{
				"x":	20,
				"y":	59
			},
			"bottomRight":	{
				"x":	121,
				"y":	59
			}
		},
		"bytes":	[49, 49, 50, 51, 52, 53, 54, 50]
	}
]

20Years_Barcodes.png

The Barcode.GenerateJSON function, on the other hand, takes a JSON object as input that contains all the information needed to generate the barcode. This allows you to specify all the settings in a single JSON object. Settings for which you previously had to call a separate function for each one. This makes working with barcodes even easier.

Set Variable [ $img ; Value: MBS( "Barcode.GenerateJSON"; 
	"{\"Symbology\": \"QRCode\", \"Text\": \"Hello World\", 
	  \"Scale\": 4, \"BorderWidth\": 4}") ]
If [  MBS("IsError") = 0 ]
	Set Variable [ $r ; Value: 
		MBS( "GMImage.WriteToPNGContainer"; $img; "Barcode.png") ]
	Set Field [ Barcode::Barcode ; $r ]
	Set Variable [ $r ; Value: MBS( "GMImage.Release"; $img ) ]
End If

JSON

Even back in university, I was fascinated by the possibilities JSON offers for communicating with APIs. FileMaker already provides some great built-in functions for working with JSON. But if you want to build your own JSON or need more advanced functionality, the MBS FileMaker Plugin is here to help. I’d like to take a closer look at one function that’s particularly powerful in this area: JSON.Query. This function works with JSON Path, which opens up a wide range of query possibilities. This means we can not only navigate to a specific point in our JSON using dot notation, but we can also formulate conditions to effectively filter our JSON based on specific criteria.

For example, suppose you have this JSON:

{
	"persons":	[
		{
			"name":	"Juchmes",
			"firstName":  "Stefanie",
			"hobbies":   ["programming", "reading", "photography"],
			"dog":	{
				"name":	"Bella",
				"age":	6,
				"LikeTreats":  true
			}
		}, 
		{
			"name":	"Miller",
			"firstName":  "Jon",
			"hobbies":   ["cooking", "writing", "watching movies"],
			"dog":	{
				"name":	"Ruby",
				"age":	2,
				"LikeTreats":  true
			}
		}
	]
}

We want to find the name of the person who has a dog named Ruby; you can easily do this in a single query using JSON Path.

Set Variable [ $res ; Value: MBS("JSON.Query"; $JSON; 
	"$.persons[?(@.dog.name=='Ruby')].name"; 0) ]

The $ symbol represents the root element of our JSON; from there, we navigate to the “persons” key. This key contains an array of objects. So first, we need to find the object that belongs to the owner who has a dog named Ruby. To do this, we need to include a condition in our path. This condition is introduced by the question mark. The path to the dog’s name follows in round brackets. The @ symbol indicates the position we’re currently at in the JSON and from which we’ll move on. To compare, we use the == operator and set the value to Ruby. This selects the object belonging to that owner. Now let’s move on to the owner’s name.

If we run this line of script with the JSON, we’ll get an array containing the name “Miller.” If there were multiple owners who have a dog named Ruby, their names would now be listed here, separated by commas.

20Years_JSON.png

SQL

The plugin allows us to execute SQL commands both within FileMaker and on a wide variety of external databases. In my work, I regularly use the functions for internal SQL commands. These offer several advantages. For example, if I’m going through the records in a table and want to create a new record—such as a new customer—in connection with the records in another table, thanks to the plugin function “FM.InsertRecord,” I don’t have to switch layouts to insert this record. Instead, I can add the new user in a single line and then simply continue with the next record.

Set Variable [ $r ; Value: MBS("FM.InsertRecord"; Get(FileName); "customer"; 
	"FirstName"; "Tim"; "Name"; "Miller"; "YearOfBirth"; 1983) ]

You can also perform a search using an SQL command. For example, you can determine how many people named Miller are in your database and how many fields have been assigned to them. To formulate the query, we can use the FM.SQL.Execute function here. We define the SQL query in the parameters. The function returns a reference, which we can then use with FM.SQL.RowCount and FM.SQL.FieldCount to get the number of records and fields that were found.

Set Variable [ $SQLRes ; Value: MBS("FM.SQL.Execute" ; Get(FileName); 
	"SELECT* FROM customer WHERE Name='Miller'" ) ]
Set Variable [ $CountRow ; Value: MBS("FM.SQL.RowCount"; $SQLRes) ]
Set Variable [ $CountField ; Value: MBS("FM.SQL.FieldCount"; $SQLRes) ]

Elf.png

Last year, I even had the opportunity to publish 24 blog posts on the topic of SQL within FileMaker as part of the Advent calendar 2025.

As mentioned earlier, MBS not only provides functions for working with SQL within FileMaker databases, but also allows you to connect to an external database and work with it using SQL. MBS allows you to run queries, execute SQL statements, and work with stored procedures on CubeSQL, Centura SQLBase, DB2, DuckDB, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher, and Sybase databases.

MapKit

In 2019, I had the opportunity to give my first FileMaker presentation on MapKit at a conference in Hamburg. There, I demonstrated how to integrate Apple’s native map engine into a solution using the MBS FileMaker Plugin and how to use it. In the example, Sabine the bee needed to fly to her flower meadows and required a FileMaker solution to do this. The MapView.PlanRoute function helped her plan her route. In this function, you first specify a reference to the MapView, which you can obtain, for example, using the MapView.CreateWithControl function and then specify the start and destination locations in the parameters. You also specify how the route should be displayed on the map. Here, you can choose from various options and combine them according to your needs. Optionally, you can also specify the mode of transportation, as well as the identifiers for the start and end points and their colors.

Set Variable [ $map ; Value: MBS("MapView.CreateWithControl"; 0; "Map") ]
Set Variable [ $Route ; Value: MBS("MapView.PlanRoute"; $Map; "Bonn"; "Hamburg"; 1+4+8+16+32) ]
Set Field [ Map::Route ; $Route ]

In this example, we are planning a route from Bonn to Hamburg. The route should be displayed on the map (1), the start and end pins should be shown on the map (4+8), the map should zoom in on the route (16), and the information from each route step should be output in JSON (32).

20Years_MapKit.jpg

Inline graphics

One article I remember very well is the one about inline graphics in emails. With the MBS FileMaker Plugin, you can embed inline graphics into your emails in a way that makes them look especially nice. For example, you can add a header and footer to your email. To do this, you create an HTML file that describes how the email should look. First, we convert the text we want to include in the email into HTML using Text.TextToHTML, then place the header section before it and the footer section after it. But before we define the footer and header, we insert placeholders for them that will be replaced later. The HTML structure is then built around these.

Set Variable [ $HTML ; Value: MBS( "Text.TextToHTML"; Mail::Text; 1) ]
Set Variable [ $HTML ; Value: "$$Header$$" & $HTML & "$$Footer$$" ]
Set Variable [ $HTML ; Value: "<html><body>" & $HTML & "</body></html>" ]
Set Variable [ $HTML ; Value: Substitute ($HTML; "$$Header$$"; "<img src=\"cid:Header.png\">") ]
Set Variable [ $HTML ; Value: Substitute ($HTML; "$$Footer$$"; "<img src=\"cid:Footer.png\">") ]

You can then send this email using the CURL functions in the MBS FileMaker Plugin. I particularly enjoyed writing this article because the work was very creative and, as I later learned, helpful to a wide range of readers.

20Years_InlineGraphics.png

XML

The developers among you who are from Germany will immediately smile and know what I’m talking about when I tell you why the next feature made it into my favorites, even though I’ve been sometimes at loggerheads with it. The reason was that the e-invoice format ZUGFeRD was rolled out nationwide in Germany, and it was necessary to be able to put invoice data into an XML file that follows a very specific structure. For this reason, I developed an example that builds such an XML file. An invoice like this can become very complex, so the XML.SetPathValue function was used very, very often. It allowed me to build my XML piece by piece exactly as I needed it.

MBS( "XML.SetPathValue"; $XML; "CrossIndustryInvoice.SupplyChainTradeTransaction.ram:" & 
	"ApplicableHeaderTradeAgreement.ram:SellerTradeParty.ram:" & 
	"SpecifiedTaxRegistration.ram:ID#schemeID"; 4; „VA")

20 years of the MBS FileMaker Plugin is not only an impressive number, but also a piece of FileMaker history. Since 2006, the plugin has grown continuously and has expanded FileMaker’s capabilities in countless ways. With over 7,960 functions, it is currently the largest FileMaker plugin available in the world. Some functions are small, while others make a huge difference. In my work, I’ve seen again and again how a seemingly small function can suddenly solve a problem quite easily. It’s precisely this mix of powerful tools, practical helpers, and constantly new possibilities that makes the MBS FileMaker Plugin so exciting. The functions in this article are therefore just a personal selection. With such an enormous number of functions, there are certainly many others that deserve to be mentioned here. And presumably, every FileMaker developer will have their very own list of favorites. Which functions are on your list?

20Years.jpg

If you haven't yet the luck to get a MBS Plugin license, you can order one this month with a 20% discount. Use coupon code Birthday at checkout in the web shop. The discount must show up in the shopping cart before you finish the order. We can't apply a coupon retroactive after the order was sent.

from Stefanie Juchmes-Simonis

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.