« MBS Plugin Advent cal… | Home | Merry Christmas »

MBS Plugin Advent calendar: 24 - Goodies

Door 24 - Goodies

Fact of the day
Did you know that we have over 2000 functions in the plugin that you can use without a license?

Today we come to the last door of our Advent calendar. I would like to introduce you to some of the free developer functions. MBS has been providing free functions for a number of years to make life easier for you as a developer. Unfortunately, most of these functions only work on the Mac. This is not because we wouldn't like to make the features available to Windows users, but because we don't have the access to Windows, so we can only offer most things on Mac. This year, we were able to make one function available to Windows users. So if you have installed the plugin on Windows and the function is activated, there is an input field with which you can search in the relationship graph.

If you want to use the functions, you need to download and install the MBS FileMaker Plugin and the functions you want to use have to be activated. To do this, you have a checkbox in the Windows preferences dialog that you need to check.

On Mac, this dialog is a little more extensive and you can make several selections. You will find the dialog under Settings -> Plug-Ins and then click on the MBS plug-in and click on the Configure button. You get this dialog, which lists the developer goodies. In this dialog you can activate and deactivate the functions with the checkboxes.

First, you can color your scripts and formulas. This helps you to keep a better overview and find errors more easily

In this image you can see, for example, that the Perform Script on Server script step has been highlighted in red because no script has been set. The Set Field script step is orange because we have not yet entered a field. The special thing about the colouring of scripts is that you can change the colors yourself using the fmSyntaxColorizer database, which is included with the plugin in the examples.

Color highlighting of matching brackets also helps you to find errors in your calculations more quickly. This can be a blessing, especially with nested calculations or SQL commands. Simply click on a square, curly or regular bracket and the matching bracket will turn blue.


You will also see a blue background if you click on the appropriate structures in loops or conditions. The structures matching the appropriate script step are then highlighted in blue. This helps to maintain an overview, especially with nested loops or conditions.


While we're on the subject of loops and conditions, I don't want to leave our codefolding unmentioned, because here you can temporarily collapse parts of the script so that you can keep the overview in large scripts. Codefolding has no influence on the execution of the various parts.


Do you sometimes find it difficult to remember a variable name that you have previously used in your script and now need in your calculation?

With the auto-completion of variables, this should now be easier for you. If you have previously used the variable in your script, you only need to enter the first few letters and you will be shown a list of variables from which you can select the correct one.

There is also a completion for the MBS function name to make your work even easier.


If you make a mistake when entering a variable, you will see a note in red in the line that the variable you are currently using in the calculation does not yet exist if the variable has not yet been set.


If you do not know where your error is in the script and you want to share the script but not the whole file in a forum, or you write an article about a cool thing in FileMaker, then you do not have to type the script by hand, instead you can copy the text to the clipboard by clicking on the Copy Script Text button at the top right of the Script Workspace, and you can use it from there.

Very close to this button there are three more buttons with minus and plus. These buttons can be used to enlarge the font in the script area. This is particularly useful for presentations or when you are looking at a screen with several people. If your eyes are not getting any better, you can also set a font size for script texts and formulas directly in the dialog in which you can also activate the goodies. And if you no longer like the font, you can also change it here.


When I write a script, sometimes after several days I don't remember why I wrote the script the way I did and didn't choose another way. That's why comments in a script are essential. With the MBS FileMaker Plugin, you now also have the option of using links in your comments, which you can send directly to a suitable website with one click.


Since 13.5 you even have the possibility to jump to a certain line or to the end or the beginning of your script by clicking on the comment. Here you can see such a comment.

# History on the bottom goto:end ➜🌎 

# back to top: goto:start ➜🌎 

# * added loop in line 15   goto:15 ➜🌎 

Another very useful function is Tooltips for Script Debugger. When using other development tools, we frequently have a feature to inspect values for variables or fields. Just move the mouse over the variable or field and see what's inside. This is very convenient for debugging a script to quickly see values, especially if all the local variables and object properties don't fit a single variable viewer window.


I hope you enjoyed the journey to our Developer Goodies. There are many more of these goodies. You can find a list and an even more detailed description of these goodies here.

I wish you lots of fun trying them out.

The MonkeyBread Software team wishes you a Merry Christmas.


Monkeybread Software Logo with Monkey with Santa hat
23 👈 24 of 24

You can download the example file here: Advent2023.fmp12.

24 12 23 - 08:55