Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Recommended Posts

Posted

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

Barcode

Let's start with a really cool new function. The Barcode.DetectAsJSON function. This function can recognize multiple barcodes on an image and then returns a JSON with the appropriate information. You can even limit the selection of barcodes to be recognized to its type. The following types are available: Aztec, Codabar, Code39, Code93, Code128, DataMatrix, EAN8, EAN13, ITF, PDF417, QRCode, UPCA and UPCE. But you do not have to limit the recognition and so different types of barcodes can be recognized at one time. As a result, we have a lot of information about the individual barcodes in the JSON. Here you can see an output of a barcode of type UPCE that was recognized.

R14.5_B1.jpg

[
	{
		"format":	"UPC-A",
		"text":	"725272702703",
		"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":	149,
		"position":	{
			"topLeft":	{
				"x":	33,
				"y":	16
			},
			"topRight":	{
				"x":	241,
				"y":	16
			},
			"bottomLeft":	{
				"x":	33,
				"y":	164
			},
			"bottomRight":	{
				"x":	241,
				"y":	164
			}
		},
		"bytes":	[55, 50, 53, 50, 55, 50, 55, 48, 50, 55, 48, 51]
	}
]

Insert Records with JSON

Let's stay with JSON because we also have a new function with which we can insert several records into our table with the help of JSON. To do this, we first enter the database file as the name in the JSON.InsertRecordsfunction and then the table name in which we want to insert the records. Last but not least, we can then insert the JSON that describes our records. This can then look like this, for example: 

MBS("JSON.InsertRecords"; 
	""; "Contacts"; 
	"[{\"FirstName\": \"John\", \"TheNumber\": 123}, 
	  {\"FirstName\": \"Thom\", \"TheNumber\": 234}]")

In this example, the persons John and Thom are added to the Contacts table in the current database as records, each with an entry in the TheNumber field.

Update Records

In the FMSQL topic, we have for many years already functions with which we can update one or more data records with just one function. In the past, we already had functions for 1, 2 and 3 key fields, which enabled us to identify the exact data records to be changed. We have now extended this option to include key fields 4 and 5. You can now use the functions FM.UpdateRecord4, FM.UpdateRecords4, FM.UpdateRecord5 and FM.UpdateRecords5.

DynaPDF

In this release, DynaPDF once again brings us a number of new features. On the one hand, we have new parser functions with which we can remove all or individual images from a page of a document. We can also use DynaPDF.Parser.ListImages to get a list of all images on a page.

We also have two new functions that deal with glyphs. With DynaPDF.GetGlyphIndex we can get the glyph index of the given code page or Unicode index. The function DynaPDF.GetGlyphOutline returns the outline of a glyph of the active font as JSON. This is the following information you can find in such a JSON:

AdvanceX Glyph width in horizontal writing mode.
AdvanceY Glyph height in vertical writing mode.
OriginX Placement vector (vertical writing mode only).
OriginY Placement vector (vertical writing mode only).
Lsb Left side bearing (already applied, info only).
Tsb Top side bearing (already applied, info only).
HaveBBox If true, BBox was computed.
BBox Bounding box of the glyph outline.
Outline Outlines.
Size Number of points.

If you are juggling with different DynaPDF licenses or often have to perform tests, you will certainly be happy about the next function. With DynaPDF.ClearLicense you can remove an initialized license from the working memory, so that the initialization of a new license or the test version becomes easier. 

Then we have a few new Get functions with which we can query settings. With DynaPDF.GetAnnotColor we retrieves the color of an annotation. The function DynaPDF.GetAnnotTextAlign returns us the text alignment of an annotation. Last but not least, DynaPDF.GetTextBBox calculates the exact bounding box of a text string.

List

In our list functions we have some functions that merge lists without duplication, entries that are exclusively in one of the two lists, etc. This time we want to extend these list functions with the List.Intersection function. This function can search for values that occur in all the specified lists, from any number of lists that you specify in the parameters. This function has the same effect for two lists as the List.And function, except that you can use the new function to check multiple lists at the same time.

SwissQR Code

The next function I will introduce is particularly interesting for our Swiss customers, because we have a function that filters the allowed characters for the Swiss QR code. If the text contains characters that are not allowed, we try to translate them: e.g ¼ is changed to 1/4.

Check the new Text.FilterSwissQRCode function.

Math

For the mathematicians among us, we also have a new function. With Math.Rate we can return the interest rate per period of an annuity.

WordFile

With Word files we can now set and query metadata properties. In the new functions WordFile.GetProperty and WordFile.SetProperty you can specify the desired field name in the parameters. This allows you to query it or assign a new value to it.

For example we can set the creator field:

Set Variable [ $c ; Value: MBS( "WordFile.SetProperty"; $w; "creator"; "Joe" ) ]

Audit

The new function Audit.BuildCaches builds caches for further audit caches. This can take some time. Normally we build the caches on the fly when they are needed. But calling this function allows you to do it at a time the user has time to wait, like on startup after opening all files.

SharedMemory

You may already be familiar with our SharedMemory functions, which we have included in our plugin since 2020. With this component you can exchange data between processes. In this release, we would now like to give you the option of deleting these values again. To do this, we provide you with the SharedMemory.DeleteValue function. In the parameters of this function, you only need to specify the name of the value you want to delete. 

Mac

There are also new features for Mac and the iOS SDK

Vision

We have an interesting new feature in the Vision section. With the Vision.RectifyDocument function you can perform a document detection and segmentation in an image, so the image is cropped and straightened. The same functionality can also be found in the DocumentCameraScan functions. But this could only be used on iOS, so we are now more flexible with Vision.RectifyDocument because this function also works on MacOS.

Rectify2.jpg Rectify1.jpg

ScriptWorkspace

The ScriptWorkspace.ScriptPaths function is a function that may be very helpful to you at some point, e.g. when documenting your solution. This shows us the individual scripts in our solution as a list. Even the folder structure is recognizable. We applied this function to our Advent calendar published in December because there are a lot of scripts in this solution that we have sorted into folders. This is a piece of our sample output: 

R14.5_B2.jpg

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