Run script outside the lay out
I have a lay out, and on this lay out there is a field "Contract Code". After this Contract Code, I need a unique number, based on the existing number of records with the same value "Contract Code".
There is no problem with the script, I can find the number of records with "Contract Code", and get this number (+1) on a global field.
But, I want to run this script without effecting the lay out I am working on. I only want to perform a find to find the number of records with the same "Contract Code". I don't want to perform this find on my lay out. I think it is not to difficult, but I can't find the right way to this. (It can be a translation problem).
Can someone help me out?