Field Entry Script Triggers
There hasn't been a year, in the past six years or so, when some developer (actually many developers) weren't lamenting the fact that FileMaker doesn't support field entry/exit scripts. In fact, I was one of those very developers - and having used software like Servoy makes it really hard to come back to FileMaker and know you're working with so little when it comes to an event based environment.
When FileMaker introduced auto-enter calcs which would evaluate beyond initial data entry, the solution for exit field triggers became possible. Of course, you have to use one of the many script triggering plug-ins, but hey, they're there and they're stable (not to mention free).
With the introduction of yet another 8.5 feature, it's now possible to trigger scripts based on field entry. It's a hidden feature which you likely don't realize is there. Once you see how it works, there may be many more techniques upon which you can base new solutions. Watch this video for a great understanding of how to leverage entry based script triggers and add one more "technique know-how" to your overall FileMaker knowledge.
Comments
Does this work for portals?
This is great for working on layouts, honestly it should be native to Filemaker!
Unfortunately, try as I might, I can't get this to work consistently for fields on a portal.
I want to use a drop down list on a portal, but also use the tab key to select the highlighted value and move to the next field rather than the enter key.
It seemed as though a script should be able to accomplish this, but I can't figure out how to script the portal fields.
If a value in an drop down field of a portal is modified and carriage returned out of, the _field variable seems to evaluate and refresh appropriately showing the name of the field entered in the data viewer.
If no value in a field is modified, the variable doesn't seem to refresh regardless of the key used to exit the field.
If a value in an edit field is modified, the variable refreshes, but with the name of the edit field that was modified rather than the active one entered into by pressing carriage return or tab for exiting the modified one. However, if the enter key is used to exit the field, the variable shows as it does with tab or CR, but then almost immediately updates to the newly entered field.
Clicking refresh in the data viewer yields perfect results every time it is clicked; but I get the sense that the webviewer isn't quite the golden child of alertness we had hoped for.
I'm a little frustrated right now with finding a simple solution to a simple problem.