Set Field [YourTable::GlobalField ; "" ]
will clear it. OnRecordLoad should work as the script trigger to perform that script.
Phil....it works like a charm!!! thanks!
Similar to this, I am using a script to clear a global field upon a layout change. I have tried using "Set Field", "Clear Field", and "Replace Field Contents". They all work, but the problem is that they are all very slow. A dialog appears to show that records are updating while it clears the field for all records. Is there a more efficient way of clearing a global field?
Make sure that you are clearing a global field. Changing the value of a global field changes a single value a single time. What you describe is changing the value of a field that is not defined as global.
You don't need script for "clear (Global) Field when entering new record".
Use field option "Auto-Enter" > "Calculated Value" with "replace existing value", formula returning empty value.
(This formula is referring no other field, so calculated only on record creation)
That's a very valid point, but often the whole point behind using global fields is that you don't want to create a new record and then start filling in a global field but rather that you have the user fill in global fields and when they click "save" a script creates the global field at that point and "saves" the data in global fields by transferring the data from global fields to corresponding fields in the new record.
And our most recent person to ask about this is definitely not clearing a field with global storage specified or they would not be describing delays and progress bars.
I made comment to OP, but it is 3 years ago that I didn't think of
The global field is on a list view record and there is a redraw lag
The global field triggers relookup, calculation, and/or related fields or summary fields.
Any other variable that may actually involve a field with global storage.
Sent from my miPhone