I don't think you need a script here and I think you should reconsider your auto-save settings. How is it that auto-save is going to result in a blank record? A validation rule on fields that must contain data can be used to catch cases where the user did not enter any data.
If [Not ( IsEmpty ( TagInfo::Tag ) or IsEmpty ( TagInfo::Device Manuf ) or ( TagInfo::Serial ) ) ]
Commit Records [no dialog]
Is the script that will commit the record only if the listed fields are not empty.
Well it is not a blank record but the index numbers are skipped if they are not committed. I maybe weird on it but would like to keep it so that I can tell if their are records deleted or am I just worrying for no reason?
Where do I place this script? I would like to commit the record automatically after all fields are filed so that when a user goes to any of the other 10 fields for the location I do not get the " This field cannot be modified until __pkTagIndex is given a valid value."
Generally speaking, Primary Key serial numbers get gaps in their series all the time and it's no big deal. The exception to that are when the numbers are visible and represent actual financial transactions such as the number on an Invoice or Purchase Order. Financial auditors get real upset in those cases if you have a gap in the series.
That error message indicates that you are trying to enter data into a related table when your primary key field is still empty--probably because you set it up with the "on commit" option in field options. You have two script triggers that you can experiment with: OnObjectExit--to be set on the fields in your layout's table. Or OnObjectEnter to be set on the fields where you are getting this error message. If you use OnObjectEnter, you may need to modify the script in order to get the focus into the correct field after committing the record.
There are also ways you can use a related table and a script to generate a unique serial number "on demand". This can be an option that allows you to have an "on creation" serial number for your relationships, but also to have a second, "gap free" series of numbers for PO's, Invoices and the like in order to maintain proper "auditor friendly" control of your data.