I am trying to trigger a dialog box for when an ID occurs more than once. The idea is that someone would create a new record and enter the ID. Upon tabbing to the next field, a dialog box would be triggered if the ID occurred more than once. If this is the initial entry of the ID, there should not be a dialog box.
Below is my script:
The script works on existing records; however, it does not work if I am still IN the record being entered. For example, if I am viewing a record that only has one occurrence and run the script, there is no dialog box and it has worked. When I am on a record that has multiple entries and run the script, the script prompts a dialog box. However, I would like the script to work when I am still entering a record. Even when I am still entering an ID and run the script, a dialog box still appears. I thought that "Commit Records/Requests" with Error Capture [ON} would solve this problem but it hasn't.