Goodies 3: Search script

For the Script Workspace on macOS, the MBS Plugin adds a control to the title bar to search the texts of the current script. You type something, we update the script view and show all lines in yellow with the matching text.

We can only search the visible text in the window, so if FileMaker doesn't include an option there, it can't be found.

You can reach this text field via keyboard by pressing Command-F key combinations.

⌘ Fto set focus to search field for current script.
⌘ ⇧ F to set focus to script list search.
⌘ +zooms in.
⌘ -zooms out.
⌘ =zooms to 100%.

Regular expressions

You are an advanced developer using FileMaker? Then you probably know regular expressions already. Where you can write search terms to find interesting things in texts. Let us use them for our search field.

The old way to search was to enter multiple texts. We split by space characters and take each word and search for all them in a line. If all are found, the line turns yellow. That is what you know and we expect that the majority of users only types one thing to find. But there is a small fraction of power users, that ask for more.

For version 13.1 we use regular expressions for each of this words, so you can do OR searches or search with wildcards better. But since you like to search for $ variables, we escape a $ or $$ on the beginning of the search word for you. Otherwise you may do backslashes for escaping some special characters like $ or brackets.

Let us show you a few examples:

If you search for a text, it finds all lines with this text.

Set $abc
Finds all lines, which contain set and $abc as text anywhere. e.g. a Set Field which uses the variable in the expression.

We use our first regular expression here. The caret character defines the beginning of a line, so this searches for all lines starting with Set, e.g. Set Variable or Set Field.

^Set $abc
This finds lines starting with Set and which have $abc somewhere too.

Find either Feld or Field in a script line.

This finds all lines ending with a square bracket. When we query text from FileMaker, the line gets an extra space, so we need to put a dot in the expression and find the all lines ending in the square bracket.

This finds variables with a name starting in m and ending in x.

Search for Error as text in front of a word. \b is the delimiter for a word boundary.

Find field access by index with a digit.

Find fmp URLs with optional the version or the claris scheme. And it must start with a word boundary.

This feature was added for macOS in version 13.1.

You can enable the feature either via preferences dialog or the SyntaxColoring.ScriptSearchBox.SetRegEx function.


You can get script search for Windows with our Search Scripts.fmp12 file. See article Search scripts in FileMaker for Windows.

Calculation Coloring 3 Search tables