February 20, 200421 yr I have a script that before doing it's magic, checks to make sure that a specific record exists. Each record has a unique record number. I enter the find mode, set the record number to a global containing the number I am checking, and preform find. It works too well. If my record is 1001, and I enter a 1 in the global, it finds 1001. Any clues?
February 20, 200421 yr Author Solved my own problem by adding "==" & to the global record number before doing the find. Duh.
February 20, 200421 yr Another way of doing this job would be to make a self-join with your global entry field and your unique ID field. Your script would test: If (IsValid(g_Entry::UniqueID)) [do what you do when you have a match] else [do what you do when you don't have a match] End If IsValid will return a zero if it can't find a match and a one if it can. I use this in a script I'm working on to set up a book inventory. If the user inputs an ISBN that has already been inputted, my script finds the first record and ups the quantity by one, else it makes a new record & etc. Steve Brown
Create an account or sign in to comment