outdoorsportz Posted May 24, 2002 Posted May 24, 2002 Hello, I have created an inventory control database. It seems to work fine most of the time, but occasionally, I get some funny results from my scripts. For instance, In the Purchase Orders database, a script takes the Qty and uses a SET FIELD in my master database to adjust the ON ORDER Qty. Occasionally there are numbers coming out that did not go in. My script is a very simple operation, mostly a SET FIELD and a FIND based on a Global Field. How can this happen to me? The script is only addition or subtraction. Thanks,
The Bridge Posted May 24, 2002 Posted May 24, 2002 Another user here on FMForums has often said, "What you know ain't so." I have made it my mantra when something goes wrong. I recommend going through your scripts line by line. Although this seems like a little more work, make a layout in each of the files that are called by your script and include all fields involved. Pepper your scripts with pauses and examine the results at each stage. This will help you pinpoint where things are going wrong.
goostree Posted May 28, 2002 Posted May 28, 2002 You mentioned that your find is based on a global field. If you db is multi-user remember that global fields can be set to a different value for each user, which might be why you get different results.
outdoorsportz Posted May 28, 2002 Author Posted May 28, 2002 My db is a multi-user system, but this problem started before I linked up to another user.
falkaholic Posted May 28, 2002 Posted May 28, 2002 I've found the FM sometimes has problems with floating point math, but it sounds like you an't doing that anyway. I've had FM tell me that 0.07 + 0.075 = 8450 Your could be somthing like that. Aswell, make sure all your layouts don't allow entry into fields that shouldn't
outdoorsportz Posted May 28, 2002 Author Posted May 28, 2002 I have been playing with my scripts using pauses and such. I can't see any particular problem. The real problem I have is that this only occurs in certain records. If it happened in all records then I would think that the script was at fault. But this problem picks certain records, and consistantly enters bad numbers, while other records have no problems. I have tried deleting the record and making a new one that is exectly the same, but it does not change the problem.
Anatoli Posted May 28, 2002 Posted May 28, 2002 RE: I've had FM tell me that 0.07 + 0.075 = 8450 ::?????? Why???????
Vaughan Posted May 28, 2002 Posted May 28, 2002 It sounds like a data-type mis-match problem -- text fields holding numbers that are then used in mat calculations. Is the ON ORDER field a number or text field? How about the global field?
Recommended Posts
This topic is 8219 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 accountSign in
Already have an account? Sign in here.
Sign In Now