I have a situation on which I need ideas/guidance from some of you wise heads.
The Setup: In a Contacts DB I have an autoenter calc for name fields which replaces text entered with a formatted version of itself—basically Title Case with any extraneous spaces and carriage returns stripped out. This works fine, except that, like all rules, there are exceptions—eg. McCarthy, O'Brien, etc. To cover these I created a script which is triggered on entering the field to capture in a global variable any existing field content, then modified the autoenter calc to behave differently if the global variable is present. So if the field contained, say Mccarthy and the user changes it to McCarthy the autoenter rule is overridden and the revision is allowed to stand. A second script is triggered on exit to cancel the GV. So far so good.
The Problem: The above works when run within a file, but the problem arose when I decided to deploy it in a data-separated solution. For some reason I have not been able to put my finger on, the autoenter calc ignores the global variable when the field is edited in the UI file, so the user cannot override the standard autoenter.
I am hoping someone can shed some light for me by either (1) explaining why the GV approach does not work in the UI context, and (2) pointing me in another direction if you can see a better way to achieve the same objective. I have attached a pair of files which you can use to see the issue for yourself. File A is the UI file, File B is the Data file for the purpose of the exercise.