Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculations no longer working

Featured Replies

  • Newbies

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?

Yes, there are lots ( of reasons ) !

Post your calc before the conversion ...

  • Author
  • Newbies

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 by Guest

It seems the problem is you are dividing by zero (blank field) - but I believe you would get the same result in previous versions.

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 by Guest

  • Author
  • Newbies

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!

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 )

By the way, more often than not, question marks will appear when the result will not fit into the field provided.

  • Author
  • Newbies

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.

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 by Guest

Hmmmm, calculations can have errors. Cool

  • Author
  • Newbies

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.

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.

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

)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.