Revert should delete the new record if it has never been committed. This should be the case regardless of the format used for the field.
I don't know. When it's just an edit box and I try to change the value, it won't let me but the record does not get deleted at all. Is there any way to make the lock work with a value list?
My point is that it IS working, just not the way that you want. Can you explain more fully what you are trying to accomplish here?
Field is either a pop up box or a drop down list (which ever works better) with a value list called Factory. I am trying to make it so that the user can select from the value list only once. After they click outside of the list, the factory they choose will not change if they try to select from the list again.
Revert reverts all fields since the last time the record was committed. If this is a new record that has never been committed, the entire record will be reverted and all data entry is lost.
I suggest a different approach to making this a "select only once" field.
The OnObjectEnter script trigger can capture the original value of the field if you put a reference to that field in the optional script parameter box. In your case, you can put: YourTable::Factory as the parameter passed to this trigger's script. The script would then be:
Set Variable [$$OldValue ; value: Get ( ScriptParameter ) ]
Then you can use a second script parameter: (OnObjectModify for pop up menus or OnObjectSave for drop down lists) to perform this script:
If [Not IsEmpty ( $$OldValue ) ]
Set Field [ YourTable::Factory ; $$OldValue ]
If you want to make the reference to Factory in this script indirect (only needed if you place this field on more than one layout and some layouts refer to a different table occurrence), you can pass the table occurrence and field names as a parameter: GetFIeldName ( YourTable::Factory ) and then use:
Set Field By Name [ Get ( ScriptParameter ) ; $$OldValue ]
Note: the reason for using GetFIeldName like this is that if you later rename either the table occurrence or the field, this function will still return the correct names for use by Set FIeld By Name.
Thank you for your response Phil!
I'll try out your suggestion.
I managed to get a lock to work and I would really like to know what you think.
I wrote this script and used OnObjectEnter on the pop up menu.
If [ Evaluate ( Get ( ActiveFieldTableName ) & "::Lock")=1]
Show Custom Dialog ["Select Factory" ; "Do you wish to select this factory?"] // 1.Yes 2. No
If [ Get (LastMessageChoice) = 1 ]
Commit Records/Requests 
Revert Record/ Request 
It works, the problem with OnObjectEnter and the pop up menu is that the value selection from the menu is handled before onObjectEnter performs the script--hence the need to revert.
The main possible draw back to your script is that revert record could revert more data than the data in the factory field.
Thank you for your help Phil! It's ok if it reverts more data. I was trying to lock that field to prevent users from adding additional lines into a portal. Not completely foolproof since they can just keep clicking yes and add more into the portal, but I'll keep working on it and try to find a way to prevent lines from being added to the portal.
You can set up a validation rule on fields in the portal that reject all input if a value in the parent record is set.
And The OnObjectScript Trigger can be set on the portal to check this value and use commit records to deny access to the portal.
Thank you for your advice! I don't really understand how the validation rules work on filemaker, so I'll go read up on it now and experiment.