Yes, add a "commit record" script step after the clear step. This will exit all fields. If working from a portal row, however, this does not always work
"If working from a portal row, however, this does not always work" - you could drive the cursor to another non-portal field and Commit from there. Make sure the options are ticked bottom left (as long as that is what you want).
I didn't think about commit record! I was too focused on the field not the record!!
It's simple with a fresh pair of eyes. Thank you Regards Fluffy
Thanks for the comment about ...... "you could drive the cursor to another non-portal field and Commit from there".
BUT, it does not work
Set Field [table::fieldName ; ""]
This will leave the focus on the button and not put the cursor in the field being cleared in the first place.
I agree that works well and it keeps it simple with the button rather than as a script.
QUESTION: whereas "copy", "clear", "paste", "insert text' script steps REQUIRE that the field be physically present on the layout, Does using "Set Field" eliminate this need ?
Yes--which is one reason I only use Set Field or Set Variable in place of those options unless there is no alternative. There are a few uses for copy and paste, but none I can think of for clear--unless it's helpful to the user to clear a field and put the cursor in it to edit the field--even then, I'm more likely to use two steps--set field followed by go to field--but that's out of habit more than anything else.
For similar reason, I also make use of non-container field "insert" steps only for very specific cases such as modifiying a field from the current cursor position in that field.
Except for the set Field, Set Variable steps, all the steps I've mentioned here silently fail if the referenced field is removed from the current layout--something that might happen accidentally months after you set up your script. In addition, Copy destroys any data the user might have previously copied to the clip board. All of these issues are avoided with set field/set variable.
Thanks ,Phil, for your thorough answer. That has been EXCEEDINGLY helpful which I appreciate very much !