Jump to content
Server Maintenance This Week. ×

Problem with find script step.


This topic is 7371 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7371 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.