Set up a script to set that data, and then set it as a script trigger on the Kg2 field when it is modified, for example.
Better check your script. Does it use replace field contents by any chance? That step modifies every record in your found set. A script that uses Set field to enter the account name will only modify the current record so that's what you should use here in place of Replace Field contents.
Here is the script trigger I wrote:
Go to Field [Table::userV2]
Perform Script ["Calculate AccountName & write into field]"
"Calculate AccountName & write into field" = Replace Field Contents [Get(AccountName)]
Oops: post crossover.
You're too good, PhilModJunk (and Sorbsbuster)! I was still drafting the above, when you posted your solution.
Thanks again (assuming I'll be a success story with Set field.
Works fine with the correct trigger type (OnObjectExit). I assume that's the best one.
I often use OnObjectSave which only trips if the value in the field is changed. Much of the time, though, the results are identidal.