Newbies sheridan Posted September 29, 2006 Newbies Posted September 29, 2006 Hi, I have a filemaker 8 database - recently upgraded from filemaker 6. The database contains a large number of calculations - 1 of which is no longer working. Comparing the old files to the new files there is no difference and i have made no changes - i just upgraded. however the FM6 files displays the result of the calculation and the FM8 files display a ?. The calculation is very large and complex and involves a lot of fields - not all of these fields will contain data, it depends on the job that the client needs to quote - is there any reason why upgrading to FM8 will prevent previously working calculations to no longer display results?
Raybaudi Posted September 29, 2006 Posted September 29, 2006 Yes, there are lots ( of reasons ) ! Post your calc before the conversion ...
Newbies sheridan Posted September 29, 2006 Author Newbies Posted September 29, 2006 (edited) Hi Daniele, thanks for your reply. The calculation is ((Job 1 Qty 1/Job 1 No Out Sheet Stock A) * (Job 1 No Leaves P1))*(1+Job 1 Allowable Waste Stock A) the figures are Job 1 Qty 1 = 1000 Job 1 No Out Sheet Stock A = not filled in Job 1 No Leaves P1 = not filled in Job 1 Allowable Waste Stock A = .05 This produces a result of zero (0) in the old version and produces a ? in the upgraded version. The blank fields are very common - this calculation impacts on another calc which further impacts on another 3/4 calculations, the results of these are all obviously ?. Further down the line there are another few calculations which behave similarly given the ? result,so hoping that there is a common reason for all of this. Any help would be greatly appreciated. Edited September 29, 2006 by Guest
comment Posted September 29, 2006 Posted September 29, 2006 It seems the problem is you are dividing by zero (blank field) - but I believe you would get the same result in previous versions.
Genx Posted September 29, 2006 Posted September 29, 2006 (edited) I think it may have to do with the fact that your fields have numbers in their names? Just a guess but... Another explanation could be that one or more of your fields are not numbers, or your result is text based? Edited September 29, 2006 by Guest
Newbies sheridan Posted September 29, 2006 Author Newbies Posted September 29, 2006 Hi Genx, thanks for that - the calculation actually works if you fill in numbers in all of the fields so its not looking at the numbers in the field names - but i changed the numbers to words anyway and no joy! The result field is defined as a number as are all the other fields in the calculation. Any other ideas more than welcome!
Genx Posted September 29, 2006 Posted September 29, 2006 Hmmmmmmmmmmmmmmmmm... 1) Are any of these fields related 2) Try copying the field 3) If no one can actually work out what the problem is you can always just cheat and use Substitute( YourWholeCalcAbove ; "?" ; 0 )
Genx Posted September 29, 2006 Posted September 29, 2006 By the way, more often than not, question marks will appear when the result will not fit into the field provided.
Newbies sheridan Posted September 29, 2006 Author Newbies Posted September 29, 2006 HI genx, no the fields are not related - i'm not sure how to use the substitue function, was thinking of inserting new fields using If statement but it would involve a lot of work - also as i have a lot of similar type FM solutions in various clients so would hate to have to do this with all of them once they upgrade. I have check that its not giving me a result that is too long for the field width and that's not the problem.
comment Posted September 29, 2006 Posted September 29, 2006 (edited) the calculation actually works if you fill in numbers in all of the fields That's another sign pointing to the same conclusion. If you want to be sure, duplicate the calculation field, and change the formula to: EvaluationError ( your Formula goes here ) You can lookup the result in Help > Functions reference ... Get(LastError) function. Error #15 is "Can't divide by zero". --- BTW, there's nothing wrong with your field names - Filemaker will warn you when you try to name a field with a problematic name. Edited September 29, 2006 by Guest
Newbies sheridan Posted September 29, 2006 Author Newbies Posted September 29, 2006 Hi, yes i understood that it was dividing by zero and as such couldn't perform this calculation. However it did perform and return a result of 0 in filemaker 6 so why not FM 8? In 6 the returned result of 0 was then used in the next calculation to get further info. Have duplicated and entered the formula you suggested and i now have a new field returning zero.
comment Posted September 29, 2006 Posted September 29, 2006 it did perform and return a result of 0 in filemaker 6 I don't have version 6, but since division by zero has been declared as undefined circa 850 A.D., I seriously doubt that.
Raybaudi Posted September 29, 2006 Posted September 29, 2006 The calculation is ((Job 1 Qty 1/Job 1 No Out Sheet Stock A) * (Job 1 No Leaves P1))*(1+Job 1 Allowable Waste Stock A) the figures are Job 1 Qty 1 = 1000 Job 1 No Out Sheet Stock A = not filled in Job 1 No Leaves P1 = not filled in Job 1 Allowable Waste Stock A = .05 This produces a result of zero (0) in the old version and produces a ? in the upgraded version. As comment said: that calculation produces a ? in the 6 version too ! ( I created a new file with FM6 to test ) So, to both the version, you have to use this calc: Case( Job 1 No Out Sheet Stock A ; Job 1 Qty 1 / Job 1 No Out Sheet Stock A * Job 1 No Leaves P1 * ( 1 + Job 1 Allowable Waste Stock A ); 0 )
Recommended Posts
This topic is 6691 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