By Daniel Wood, 21 May 2015
One of the coolest overhauls in FileMaker 14 is to the scripting area, now known as the Script Workspace. There are many cool new features here but the one we will focus on in this article is the ability to type script steps directly into a script. Further to this, we cover how FileMaker 14 attempts to auto-complete your entry to find the corresponding script step.
With a little practice and habit, you can find the best shortcuts to use for every script step that will allow you to type either the shortest, or the most intuitive shortcut to find the specific script step you wish to add.
There isn't really much to this article itself because the real benefit will come in downloading and viewing our associated reference file. In this file we have provided a number of shortcuts that can be used for every script step.
We provide what we believe to be the most intuitive shortcut you can use to auto-complete a script step. We also give you the shortest shortcut (in terms of characters required) to enter any script step. Finally, we give any useful variations on these that can also be used.
We hope this provides a useful resource for you starting out with FileMaker 14 and ease some of the burden of discovering these shortcuts yourself :)
Please Note: While this particular reference file will work in FileMaker 13, it works (and looks) best in FileMaker 14!
FileMakers auto-complete for script steps follows a couple of rules that help determine which script step(s) it finds as matching results to what you type.
If you are typing a word, then it will match any script steps that contain any word that begins with what you type. For example if we enter "insert" into the script workspace we get:
Every single script step with a word that begins with "insert" is found. Now this is quite a lot, and so trying to isolate a specific script step just with "insert" is not very useful, as it will require you to mouse/keyboard through the results.
Ideally what we want is a word that is used in a script step that better identifies that step. Let's say we wanted to find the "Insert from Device" step. Let's try the word "from":
Better, but not perfect. The next logical choice is to enter "Device":
Bingo! That is exactly what we are after - a single result. We can now just press return to auto-complete. You will find there are a large number of script steps that have an "intuitive" word in them that only exists in one script step, and can be used to isolate that step.
What about script steps that are more common? How about the classic "set field" ?
Ah, we have a problem here. There are a lot of script steps with the word "set" in it. Now, we can just continue typing "set field" and that will find our result, but can we type something else even quicker? How about just "field"?
Ah, well that is actually worse! What has happened here is all matches for the word "field" are shown, but the sort order here is interesting.
FileMaker will sort the results alphabetically starting from the first word, moving onto the second word, and so on. Export Field Contents is the first matching step that is first alphabetically, and so is the first result.
You will find that this sort order is both helpful and a hinderance depending on what script step you are trying to auto-complete, which makes it even more important to know how to best find the step you are after.
So far we have covered searching using keywords, and how FileMaker orders matching results. For most steps, simply entering an intuitive word, or typing enough of the step so that it is the only match is enough to find the right match.
There are some however that are a little trickier given their use of common words, or their length. There is another way we can find results using the first letter of script step words.
lets use the classic "Go to Related Record" as an example. Using our methods so far, we could find this step using the word "Related" because this is the only step with this full word in it.
However quite often people know this step as its abbreviation "GTRR". We can actually type this to find the step also as this follows the rule of using the first letter of script step words.
Something interesting has happened here! It has found the right script step, but we are also seeing "Go to Record/Request/Page" also, why? Well if we follow the rule, both script steps actually have words that begin with the letters "GTRR" in that order. If we followed the rule even further we could use "GTRRP" to find just the first step. Now, there are actually easier ways to find that step but the first letter rule can also be applied here (or to any script step).
Sometimes this first letter rule works nicely, other times it does not. There are a couple of things to note about using the first letters:
Below is an example of the alphabetical rule being applied:
All three steps have words that begin with G, T and R in that order. Note however that "Go to Portal Row" is the first match. This is because if we view them alphabetically the word "Portal" comes before "Record" and "Related". This seems odd that GTR would find this result, but based on the rules it is correct. A better abbreviation to use to find this step would be "GTP". It matches all of our rules, and there is only one script step whose words begin with G, T and P in that order.