Articles, Tips, Techniques & Samples
FMT Member contributions including articles, tips, tricks & techniques. Please provide links to previously posted threads and demo or sample files.
588 topics in this forum
-
New in MBS FileMaker Plugin 12.2
by Monkeybreadsoftware- 1 follower
- 0 replies
- 33 views
In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 12.2. Error Count for MBS functions For years we already have the isError function in the MBS FileMaker Plugin. We can call this after a MBS function to see if the previous MBS function returned an error. If you use many MBS functions in a script this can get confusing and it might be enough for you, e.g. if you are testing a script, to know if a plugin function in the whole script throws an error at all. For this we have developed two new functions. With the HadErrors function you get back the number that is currently in the error counter. This will be incremented…
-
Comment Links in FileMaker ScriptWorkspace
by Monkeybreadsoftware- 1 follower
- 0 replies
- 28 views
At the dotfmp conference we got a nice idea for a feature: MBS FileMaker Plugin already scans script lines to find missing variables and show a little warning for undeclared variables. We added the feature to scan for comments containing URLs. If we find an URL, we add a little button to the end of the line, which currently shows an arrow and a globe:You may click on the line to select it and then click on the control we add. Maybe double click may also work directly. But only if the list of script steps doesn't consume the click, it will come to our control.You can configure this via our preferences dialog or the new SyntaxColoring.CommentLinks.SetEnabled function, so yo…
-
Transactions with SQL functions
by Monkeybreadsoftware- 1 follower
- 0 replies
- 107 views
By default our SQL functions work in auto commit mode. If you like to use transactions, you need to turn off auto commit mode. You may have a script to connect to a database and after the SQL.Connect call is successful, you turn off auto commit: Set Variable [ $r ; Value: MBS( "SQL.SetAutoCommit"; $Connection; "off" ) ] Now you can for example run INSERT SQL commands for multiple records. If all functions returned success, you may commit on the end: Set Variable [ $result2 ; Value: MBS("SQL.Commit"; $Connection) ] Or in case one of them failed, you can do a rollback: Set Variable [ $result2 ; Value: MBS("SQL.Ro…
-
Sorting Scripts by Name in FileMaker with MBS Plugin
by Monkeybreadsoftware- 1 follower
- 0 replies
- 149 views
On every travel you learn something new. At a FileMaker developer meeting in Montreal, we discussed about what people miss in FileMaker and a plugin could add. And the wish several people mentioned is to sort scripts in the Script Workspace.We got several challenges here to solve. First this is not like on the script, where we can just add a custom contextual menu. There is already a FileMaker contextual menu, so we have to intercept the menu and our own entries, which seems to work fine so far. Since the implementation depends on the things we made to show Script IDs, the two features are linked currently.The next one is to actually do the sort operation. There is not mu…
-
New in MBS FileMaker Plugin 12.1
by Monkeybreadsoftware- 1 follower
- 0 replies
- 144 views
In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 12.1. WebHook We already introduced the new WebHook component in the release 11.5. In the new release we provide a few new functions that should make your work with WebHooks easier. With the function WebHook.SetMaximumRequestSize we set the maximum allowed request size. This allows you to disconnect sockets, which send too much data. By default there is no limit, so people can send requests with several gigabytes of payload. Depending on your use can it may be worth to limit request size to a reasonable value. For example if you receive notifications from your pho…
-
Connect to an external database server in FileMaker with MBS Plugin
by Monkeybreadsoftware- 1 follower
- 0 replies
- 314 views
Your FileMaker solution may have a need to connect to another database. While you can do ESS, we offer an alternative way. You can connect via script to a database, run SQL statements and close the connection. That is a great way to move a few records in one direction or even implement a synchronization routine.Alternatively you can have a script to open the connection when the solution opens. Then just have various calculations and scripts refer to the open connection and run queries as needed. Like have a formula field on a layout to query a number for a value from the foreign table and show it to the user. Like a solution to manage shows and query from the web shop how…
-
Combined Components with MBS FileMaker Plugin
by Monkeybreadsoftware- 2 followers
- 2 replies
- 427 views
When using MBS FileMaker Plugin, you may need to combine a lot of functions together to get some work done. That makes our toolbox of functions so flexible to use for your needs. Let us show you four examples: Regularly import files from hot folder First you start with Schedule functions to run a script regularly every few minutes in FileMaker Pro. Independent of SetTimer script step, so you can have multiple of them. You look into a file path with Files.List to get a list of file names in the folder. By using our List functions you compare the current file list to the one from last run. For example List.And would find similar files in both files, wh…
-
Text alignment for alerts
by Monkeybreadsoftware- 1 follower
- 0 replies
- 233 views
Since Big Sur the text alignment for standard dialogs on macOS is centered, but we found a way to adjust that if needed:For FileMaker, you can use the new Dialog.SetTextAlignment function to change alignment.In both cases you can pass left, center and right as desired wish. You can also ask for natural alignment, which may do right or left depending on the locale. Also defined is the justified value, but not sure if the dialog honors it. You can try those in MBS FileMaker Plugin 12.1pr6 of our plugin or newer.
-
Have you tried Auto Complete in MBS Plugin?
by Monkeybreadsoftware- 1 follower
- 0 replies
- 180 views
We recently added auto complete for MBS function names for 12.1 pre-release, which is really handy. Just type the component name and once you got the right one, maybe with cursor down key, you can press the dot to complete. Then you continue to type and a new auto complete list shows the function names: Watch video on our blog. Once you got function name and there is not much text following, the MBS FileMaker Plugin will add the parameter names as placeholders. You can directly put in variables with same name or enter some value there. Available or recent FileMaker versions on macOS in MBS FileMaker Plugin 12.1.
-
Search styles in FileMaker
by Monkeybreadsoftware- 1 follower
- 0 replies
- 124 views
Did you know you can search styles list in FileMaker on macOS when MBS FileMaker Plugin is installed? In the layout editor in FileMaker, click on the list of styles to set focus there. Then press command key together with the F key. The search panel shows and you can enter a search term. When you press return, the next item in the list is highlighted. ⌘ F shows find bar. ⌘ G goes to next found text. This is the same search we implemented for other lists like fields, databases, accounts, privileges or layouts. Over 20 lists in the FileMaker user interface can be searched this way. For styles the ⌘ + and ⌘ -…
-
Install MBS Plugin on a FileMaker Server
by Monkeybreadsoftware- 1 follower
- 0 replies
- 123 views
Today we like to show you how to manually install the MBS FileMaker Plugin on a FileMaker Server. Let's start with a freshly installed FileMaker Server: Everything is off and we copy the MBS.fmplugin file on macOS to this folder: for Windows you copy MBS.fmx64: for Linux your copy MBS.fmx here: The first folder is for server scripting (scheduled and PSoS), the second folder is for WebDirect and the third one for Data API. Now we can turn on the switches for plugins. But the problem is that FileMaker doesn't notice yet that there is a new plugin. We restart the server. It may be enough to stop it, wait ten seconds till everyth…
-
Ways to import images to FileMaker
by Monkeybreadsoftware- 1 follower
- 0 replies
- 81 views
Several ways to import pictures via MBS FileMaker Plugin: Scanner 📠 🖨 Webcam 📹💻 Digital Camera 📷 iPhone 📱🤳 Import images from your flatbed scanner or document feeder. Quite a lot of printers now have built-in scanners to do photo copies. Record video from your webcam in the computer or from external video camera. Show preview and take pictures. Import pictures from your DSLR. Have it take a picture manually or every few seconds and download it to FileMaker…
-
Windows Photo Acquire for FileMaker
by Monkeybreadsoftware- 1 follower
- 0 replies
- 378 views
For MBS FileMaker Plugin 12.1, we have new WinPhotoAcquire functions to import images from digital cameras on Windows. You can take your DSLR, take a pictures, connect it to your PC and then directly import images to FileMaker. Our functions use the standard dialogs from Windows to perform the action and give the user the usual Windows workflow. The WinPhotoAcquire.ShowSelectDeviceDialog function can show the dialog to pick the device: Then the WinPhotoAcquire.Acquire function can start the import process. If a device is not selected, it may show the dialog from above. Then it may look for what images are on the camera: Next you see a dialog to p…
-
Query custom functions automatically in FileMaker
by Monkeybreadsoftware- 1 follower
- 0 replies
- 134 views
We have clients with lots of custom functions in various FileMaker databases. How would you automate this to track custom functions used in various files?For MBS FileMaker Plugin 12.1 we got two new functions for this: FM.CustomFunctionsList and FM.QueryCustomFunctionsList. Those functions do a bit of GUI scripting on macOS to get the list. The user needs of course permissions to open the dialog and the menu entry into the menubar for the plugin to click.The first example script will first trigger the seconds script to run in a second. Make sure the fmplugin extended privilege is checked, so the plugin is allowed to run a script. Once that is set, we run the FM.QueryCusto…
-
New in MBS FileMaker Plugin 12.0
by Monkeybreadsoftware- 1 follower
- 0 replies
- 308 views
In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 12.0. WebHook We have already introduced the WebHook component in the last release. It makes the connection between devices or systems that support the WebHook technology and your FileMaker application possible. In this release we added a few more functions to support you when working with WebHooks. Our WebHook functions got a new timeout property to prevent connections staying open forever without sending a request. You can set the time for the TimeOut yourself. To do this, use the new WebHook.SetTimeOut function. The default value is 5 minutes. The time is spe…
-
Trace with parameter names
by Monkeybreadsoftware- 1 follower
- 0 replies
- 310 views
Our MBS Trace function will get an upgrade for the version 12.1 of MBS FileMaker Plugin: Since we now sync parameter names as metadata into our C code, we can show it in the user interface on macOS, currently planned with a tooltip on function names:We add Plugin.GetFunctionParameters function to query it programmatically and we use it to annotate our trace logs: As you see the parameter names are now showing there right in the log. We hope this helps you debug the functions. Available now in 12.1pr1.
-
Our buttons to add or remove table occurrences
by Monkeybreadsoftware- 1 follower
- 0 replies
- 62 views
As you may know we have some tools in the plugin for macOS to make the live easier in FileMaker. For various dialogs to enter calculations we got check syntax and evaluate buttons. That is convenient to make a syntax check or to evaluate the current calculation in the current context to test it without closing the dialog. For MBS FileMaker Plugin in version 12.0 we change the buttons to be a segmented control with four segments to do the syntax check, evaluate and now adding and removing table occurrences: See video in our blog post. As you see we got a button labeled "+ TO" and one named "- TO". The labels may change later in case we localise i…
-
MBS @ FMTraining.TV
by Monkeybreadsoftware- 1 follower
- 0 replies
- 159 views
Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family. A few days ago Christian Schmitz from Monkeybread Software joined a live episode to talk a bit about the MBS FileMaker Plugin. Watch it on YouTube. This is the second day of our walk through of the goodies in MBS Plugin to enhance FileMaker on macOS. Monkeybread - 12 Functions for FileMaker - Day 2 Monkeybread - 12 Functions for FileMaker - Day 1 Monkeybread Plugin & FileMaker 19.4 - Q&A …
-
Upcoming FileMaker Training Live Broadcast
by Monkeybreadsoftware- 1 follower
- 0 replies
- 109 views
The new year is starting with a week of FileMaker broadcast sessions and you can watch them live for free or later on Youtube:We start on Monday with showing FileMaker enhancements on macOS. Since we have so many, we split it in two days with introduction on first day and second day for Script Workspace. This way we have more time to explain each feature in detail. Maybe you know a few, but I bet you find a new gem here!For Windows, we could do a session, too. Since we have hotkeys on Windows and can also inspect clipboard with the XML FileMaker stores there, it would be possible to make some nice things for FileMaker on Windows. e.g. press a hotkey, show a dialog with sn…
-
Variable Name Auto Completion
by Monkeybreadsoftware- 1 follower
- 0 replies
- 176 views
For a couple of years we do various things in FileMaker Script Workspace like syntax coloring. We got a copy command once we started to read all lines in a script. Later we added checks to find usage of undeclared variables, so you easier spot typos in your variable names. Now we go one step further: We scan for variables and present you a list of names we know.When you have a script open in the Script Workspace and you open a calculation dialog, you can now auto complete. Just go into a calculation dialog for a Set Variable or Set Field or any of the other script steps taking a calculation. Then type something. We have a switch there, so only when you type a $ symbol, ou…
-
Display Value List IDs
by Monkeybreadsoftware- 1 follower
- 0 replies
- 199 views
If you like to see the IDs for your value lists and later reference them in your scripts, check out the new option in the upcoming MBS FileMaker Plugin in version 11.6pr2 or newer:If enabled in preferences dialog or via SyntaxColoring.SetShowValueListIDs function, the MBS FileMaker Plugin will query FileMaker's ValueListNames and ValueListIDs functions to assemble the lists and show right in the table the ID.You can use FM.ValueListIDForValueListName and FM.ValueListNameForValueListID later in scripts to pick the name of a value list by ID or otherwise. Or just do the same via custom functions if you prefer that.We'll provide 11.6pr2 next week, so keep checking our blog o…
-
New in version 11.5 of MBS FileMaker Plugin
by Monkeybreadsoftware- 1 follower
- 0 replies
- 173 views
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. The second new function is Text.List. It too wi…
-
Extract and analyze images with DynaPDF
by Monkeybreadsoftware- 1 follower
- 0 replies
- 163 views
Did you know that you can extract and analyze images from a PDF file with DynaPDF? For this you can use the function DynaPDF.GetImage. In the parameters you can specify which information you want to get for an image. You can choose between the following values: BufSize The size of the image buffer in bytes. BufSize The size of the image buffer in bytes. Buffer The image data as JPEG or FILE. Picture The image as a picture container. Either JPEG or TIFF. Filter The format of image: Required decode filter if the image is compressed. Possible values are dfDCT…
-
WebHook Introduction
by Monkeybreadsoftware- 1 follower
- 0 replies
- 198 views
Nowadays we live in a connected world, so web services run on different computers and sometimes need to notify each other. They usually do that with sending a HTTP request to a given URL and pass on some data as part of the URL or e.g. a JSON block as payload. FileMaker has no built-in web hook feature and with FileMaker Server you can do some things with DATA API or a custom php script on the web server part. Our MBS FileMaker Plugin in version 11.5 comes with a new WebHook functionality. You can open a receiver to listen on a port for an incoming request and trigger a script to process the query. Our plugin provides maximum flexibility as you can create listeners as nee…
-
SyntaxColoring Updates
by Monkeybreadsoftware- 1 follower
- 0 replies
- 70 views
For MBS FileMaker Plugin version 11.5 we got a few new improvements for the syntax coloring.First, SyntaxColoring.AddTag can now do formula tags with wild cards. Just define a tag with stars on beginning and end to get that color rule applied on the end over all other rules:MBS( "SyntaxColoring.AddTag"; "formula"; "*deprecated*"; "red" )This rule would mark everything with deprecated in a formula text with red color. Great if you have fields you want to get rid off. Rename the field to have deprecated in the name and then walk your way through calculations to easily spot the field name.We got a new way to color comments in calculations. When we detect a comment with // or…
-
The magic of our XML.Import function
by Monkeybreadsoftware- 1 follower
- 0 replies
- 77 views
A client got a bit xml file from Swiss government with a list of all registered/permitted medications. A huge XML file with thousands of entries. In order to import those easily, we use our XML.Import function in MBS FileMaker Plugin. We copied the XML Import example database included with our plugin to desktop. We copied the xml file to desktop and renamed it test.xml. Then we open the database and run the script. Since we didn't change it, it will simply look for a file named test.xml and import it. Since the XML file is 50 MB, this takes a while, but the XML.Import function creates 18 new tables with a lot of fields:The example has "Import2" as prefix for reasons, but …
-
MBS FileMaker Plugin videos on YouTube
by Monkeybreadsoftware- 1 follower
- 0 replies
- 223 views
Have you watched recent videos about MBS FileMaker Plugin on YouTube? MBS and FileMaker Custom Functions Run Via Plug-In MBS Plugin Talk - Christian Schmitz FileMaker and MBS Functions Spotlight FileMaker and MBS DynaPDF Functions Spotlight MBS FileMaker Plugin 2021 FMDiSC Meeting 3/12/2021 Monkeybread Plugin for FileMaker FileMaker Developers in Southern California MBS FileMaker Plugin 11.1 We k…
-
Custom Functions stored in a database
by Monkeybreadsoftware- 1 follower
- 1 reply
- 194 views
Since we got this nice database for JavaScript to do custom functions (see blog article: Custom Functions in JavaScript), we further thought about doing this with FileMaker directly. Imaging to have your custom function in a central start database. Your solution opens, defines your own environment to store them and then loads all your custom functions from a table in the database. You may even have flags to define which are active vs. inactive, testing vs. production quality or maybe limited to admins. Once you have them loaded in memory, you can call them anywhere in any open file as long as FileMaker is running.Here is our example database:As you see we can define funct…
-
Custom Functions in JavaScript with MBS Plugin
by Monkeybreadsoftware- 1 follower
- 1 reply
- 257 views
We saw a presentation at dotfmp conference from Philipp Puls about him storing his custom functions in a table inside the database. With help of one custom function in FileMaker itself, he can run them all. This dispatcher function would use execute SQL functions in MBS FileMaker Plugin to query the expression by name, then add the parameter inside and evaluate it. Quite convenient to have all custom functions stored in one database. Based on that idea we developed two new ways at MBS to do custom functions in JavaScript and later without.Custom Functions in JavaScriptSince MBS FileMaker Plugin comes with a built-in JavaScript engine, which works without web viewer and ev…
-
Introducing Tesseract 4 to FileMaker
by Monkeybreadsoftware- 1 follower
- 1 reply
- 258 views
Years ago we added OCR functions to MBS FileMaker Plugin. We decided to go with the Tesseract engine, which was available as C++ library with an open source license. We integrated Tesseract in version 3.02 and stayed with that version for a long time. Since each version requires compatible data files, we could not easily change the library without you guys changing data files. That brings us to the version 4.11 of Tesseract. We had plans to use the new version and looked for a way to make the transition easy for our plugin users. But since the newer tesseract library exports a C interface, we can load it dynamically at runtime. This way we can give you a OCR.Load function…