I just discovered something totally unexpected this week and I absolutely wanted to share it.
I worked in a customer's solution this week and saw a weird script step.
I asked myself: What kind of variable name is this? Then I noticed this was a field reference, so asked myself: Since when can we substitute a table name with a variable? I was puzzled. Then someone noticed there was a base table and table occurrence name called A&B… and it sunk in.
We've all seen this message right?
FileMaker deals with problematic table and field names by wrapping them this way: ${problematic_field_name}.
FileMaker says "cannot be easily used". This implied there could be limitations. I had a bit of fun. I created a small table in a test file with problematic field names and calculation fields.
I put the fields on a layout and added merge fields too – because why not?
And then came browse mode. (BTW: I noticed the merge field says ${B&N. I took this image before I changed the table name to A&B.)
FileMaker also automatically wraps the table and field names when you double-click them in a calculation or formula (in a field definition, in the data viewer, in a script, etc.) I would need to embed a video to show you and… well… I didn't feel like making one. (Sorry! I am somewhat lazy.)
It mostly works as you can see. I tried to coax the get (foundcount)
field to behave in the merge field but, alas, it was in vain.
This was all for fun. Seriously… don't do this at home, we're professionals. While it is nice to see that FileMaker does its best to handle newbie or non-programmer mistakes, we-who-know-better should stick to good naming practices.
What I don't get, though, is where on earth is the documentation for this? I mean… I could have saved all this trouble and avoided all this fun!