Format button for FileMaker

We got a new format button labeled with "ƒ" for the calculation dialog in FileMaker on macOS.

We parse the formula, detect which brackets belong together and then output the formula with additional whitespacing.

Let's start with a formula we found in our documentation:

You see the calculation has some spaces before and after the equal signs, but not much indention. Pressing the ƒ button on the bottom right toolbar, we get this output currently:

As you see we indent, add whitespace around operators and break up lines based on their length to show parameters. This is the first version and we have some rules on this, but may fine tune them in the next release to find a balanced formatting that most users are fine to use regularly.

Please try in our 13.5 version and please report problems you see. The toolbar appears in the dialog if you either enabled it with the SyntaxColoring.SetCustomFunctionToolsEnabled function or by the checkbox in the preferences dialog.

11 Likes

This format button is very good! I use it now every time.

1 Like

I like this capability, but can not use it in its current form as I always include spaces before and after all symbols such as [ ] ( ) and semicolons.

Is there any way spacing could be an option.