Jump to content
Salesforce and other SMB Solutions are coming soon. ×

New in version 11.5 of MBS FileMaker Plugin


Monkeybreadsoftware
 Share

Recommended Posts

  • Advertiser

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

Text

Let's start with the two functions that are new in the Text functions. With the function Text.Concat we create a text that writes all texts specified in the parameters one after the other. No space is set between the individual texts. Let's have a look at the sample. We have entered the words banana, orange and pineapple in the parameters of this function.

Set Variable [ $Concat ; Value: MBS("Text.Concat"; "Banana"; "Orange"; "Pineapple") ] 

In the dialog box we see the text we get back.

fm115a.png

The second new function is Text.List. It too will accept as many text parameters as we want. It creates a list from these text parameters. The individual parameters are then the elements of the list. Set Variable [ $List ; Value: MBS("Text.List"; "Banana"; "Orange"; "Pineapple") ]

fm115b.png

Excel

There are also a few new features for the XL functions. First, we have two new functions that affect the AutoFilter. The AutoFilter allows you to filter entries according to specified criteria. With the function XL.Sheet.IsAutoFilter we can determine if such a filter is set for this worksheet. If a filter is set, the function returns a 1. The XL.Sheet.AutoFilter.AddSort function adds a sort criteria to the AutoFilter. So you can decide if a result set should be sorted by a certain column in ascending or descending order.

There are also two new functions XL.Sheet.CellReadValues and XL.Sheet.GetCellPicture. With the XL.Sheet.GetCellPicture function we get the index number for a picture in a specific cell. All pictures in a worksheet get an index when the document is created, which is serial. This function returns the index to a specific picture. We can use this index in the XL.Book.GetPicture function to get the image data. 

The XL.Sheet.CellReadValues function reads the values from a specific range of the worksheet. The range is defined by start and destination row and column. As result we return a text with the values from this area. With which character the values are separated by rows and columns in this text, we can define in the parameters. 

XLStyledTextFileMaker.jpg

Recognize Mouse Buttons

Next, I would like to introduce you to the RemoteControl.MouseButtons function that works for FileMaker Pro on Windows and the Mac. This function indicates which mouse buttons are pressed at the time this function is called. Each mouse button has its own number. 

1: Left mouse button 
2: Right mouse button 
4: third mouse button 
8: fourth mouse button 
16: fifth mouse button

We can already see that the mouse button numbers have been assigned according to the binary system, this is because we can also see when two buttons or more are pressed at the same time. For example, if the left and right mouse buttons are pressed, we get a result of 1+2, i.e. a 3. 

If you query this in a script triggered by a button, you may be too late and the mouse already releases. For that case, please use EventMonitor.LastMouseClickButton instead.

DynaPDF

For DynaPDF we have a new DynaPDF.GetPDFVersionEx and DynaPDF.GetInPDFVersionEx functions to provide details on the PDF version of an import or the working PDF. The functions return a JSON which can contain different keys with the corresponding information depending on the type of PDF. For example, for a standard PDF there is information about the major and minor PDF version, whether the PDF is conform to a special standard and other information about this specific standard. Additionally there are the keys to special conform PDF formats like PDF/A. Here, for example, the conformance type and the PDF/A version are additionally specified. Here you can see the output of a simple PDF without an additional format: 

{ 
	"Major": 1, 
	"Minor": 4, 
	"MainVer": "", 
	"SubVer": ""
}

Already in version 11.3 of this year we have extended the functionality for Optional Content Groups (OCG) by making their renaming possible. With the new update we now have the possibility to create them directly with the function DynaPDF.CreateOCG. Content that belongs to an OCG can be made visible or invisible dynamically by users of conforming readers. OCGs are mostly called Layers because Optional Content and Layers share the same basic functionality. A layer is a piece of content that is associated with an OCG. 

As you probably already know, you have the possibility to create a form in a PDF using the functions of DynaPDF, where the user can enter information interactively. One of these forms elements is a push button. We can create such a button with DynaPDF.CreateButton. This is already possible since version 6.4. Since version 10.2 it was possible to create a button with an image from a file. With the new function DynaPDF.AddButtonImageEx2 this image does not have to be a file anymore, but can be read directly from a container. 

A little help for printing PDFs is available with the new function DynaPDF.Print.FormNames because this function gives us the possible predefined formats of a printer as a list. The entries can be used in combination with the function DynaPDF.Print.SetSetting to set the format for printing. 

MapView

The MapView component has two new conversion functions added to it. With the MapView component we can display map sections based on Apple Maps data in a control in our FileMaker database on Mac. Of course, this is all about coordinates. On the one hand there are the coordinates that describe a certain point on the control (x and y coordinates) and on the other hand there are longitudes and latitudes. In this update we provide you with the functions MapView.CoordinateForPoint and MapView.PointForCoordinate. This functions provide the longitude and latitude to the coordinates in the MapView control or in the opposite direction. The result is then a JSON that contains the respective data. 

MapKitRoute.jpg

XML

The XML component also has two new functions. The function XML.ItemRefs returns a reference to the individual nodes in the XML. That means the function splits the XML by nodes. Here you can see a small example. We have two nodes in this XML, one with the value Peter and one with the value Michael. When we pass the XML to the function, the function returns a list with two reference numbers. The individual nodes are then stored as separate XML at these reference numbers. 

Set Variable [ $xml ; Value: "<people><person><firstname>Peter</firstname></person><person><firstname>Michael</firstname></person></people>" ] 
Set Variable [ $List ; Value: MBS( "XML.ItemRefs"; $xml; 0 ) ] 
Set Variable [ $xml1 ; Value: GetValue($list; 1) ] 
Set Variable [ $xml2 ; Value: GetValue($list; 2) ] 
Show Custom Dialog [ "XML" ; 
	"XML 1: " &  MBS("XML.Format"; $xml1) & "¶¶" &
	"XML 2: " &  MBS("XML.Format"; $xml2) ] 

fm115c.png

Also new is the XML.ApplyStylesheet2 function, that apply the stylesheet to the document (XSLT transform). The function works similar to the XML.ApplyStylesheet function. But we set the keys and values separated in the parameters of the function. Here we set the values for the id and the name. 

MBS("XML.ApplyStylesheet2" ; $InputXML ; $XSLTransform ; "id"; "'123'"; "name"; "'Bob'")

WebView

For this release we rewrote our WebView functions to work with WebViewers using Microsoft Edge/Chromium as engine. To use the new plugin functions, you need the upcoming FileMaker Pro in version 19.4. On the way we got a WebView.ShowDevTools function to show the inspector and new preferences for WebView.SetPreferences function. If you still need Internet Explorer, you can use WebView.CreateWithControl function to create a plugin based WebViewer with this older engine.

In addition we have three new functions for the WebView component. For Mac and the iOS SDK we get the functions WebView.GetDrawsBackground and WebView.SetDrawsBackground that set and query whether the WebView draws the background. If background drawing is turned off, the web viewer should allow transparent backgrounds. e.g. a HTML site, where the body has a transparent background color in the CSS.

For Windows we have the new WebView.ShowDevTools function, that shows you the developer tolls window. You open that window by script and can then enjoy the pleasures of the inspector, the console and the debugger. This function runs with Microsoft Edge/Chrome on FileMaker Pro 19.4 or newer. 

Web Hooks

We can also welcome a cool new component to the plugin family: WebHook. With this component we can run a small web server in our solution on FileMaker Pro, Server or iOS SDK based applications to receive HTTP requests and trigger appropriate scripts. Many smart home devices work with this technology and you can process data from these devices directly in FileMaker. How to use WebHooks we have introduced in the blog article WebHook Introduction using a phone system. Feel free to take a look at this article and let the WebHooks hook you ;-)

WebHook.jpg

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

Written by Stefanie Juchmes. If you need help to get started with those functions, feel free to contact us and request assistance. Stefanie can help via screen sharing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use