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.

Simple Boolean Calc not working

Featured Replies

For some reason, my calculation is not working, All I want to do is have a field that will have a 1 if my InventorySold::Serial Number ≠ Serial Number and a 0 if it is not. Below is what I came up with but I must have missed a ) or :) or ; along the way, any help? Thanks - Jeff

Case ( InventorySold::Serial Number ≠ Serial Number ; 0 ; InventorySold::Serial Number = Serial Number ; 1)

not ( InventorySold::Serial Number ≠ Serial Number ) is shorter and should work for you.

If the field unstored? "Not working" is such a general term. Could you elaborate?

not ( InventorySold::Serial Number ≠ Serial Number ) is shorter

InventorySold::Serial Number = Serial Number is even shorter.

  • Author

My Apologizes,

not ( InventorySold::Serial Number ≠ Serial Number )

That still doesn't work, but let me further explain. I have a field called instockcalc in my inventory table, it is the calculation that I want to mark InventorySold::Serial Number ≠ Serial Number as 1 and InventorySold::Serial Number = Serial Number as 0.

I then have a button that runs a script that finds values in the instockcalc that is 1 and that will tell me whether an item is in stock

So Any more suggestions, comments, grips, and help would be appreciated, thanks - Jeff

:bang: not not not

* Edit

Actually I copied and pasted the orig but upon re-reading it the TEXT portion of the OP, it should have been.

not ( InventorySold::Serial Number = Serial Number )

or simply...

InventorySold::Serial Number ≠ Serial Number

The first case calc that they used contradicts what they wanted in the text.

Edited by Guest
Added Edit

You still haven't told us what "doesn't work" means. Does it return 0 where the expected result is 1, or what?

If I understand your explanation correctly, I believe I would use:

GetAsBoolean ( InventorySold::Serial Number )

This returns 1 if there is a related record in InventorySold, 0 otherwise.

  • Author

Alright, everything works out just fine, but when I test it, by adding the same number in each the inventory and inventorysold table, it shows up as a 1, like everything else. It should come up as a 0, I've attached a few pictures to help explain my problems. Any more ideas would be great, thanks - Jeff

Slide1.jpg

Slide3.jpg

I don't know - does this work for you?

BTW, if the purpose of the field is to find sold/unsold items, you don't need any of this - you can search directly in the related field.

Sold.fp7.zip

  • Newbies

Hi- I'm just a beginner on all of this but I have used the Claris Works db for a long time (grandfather to FileMaker, judging from the similiarity of a lot of operations).

You might try something like "If( InventorySold::Serial Number = Serial Number;1;0". That approach works well for a lot of stuff that I do when I'm trying to keep track of what's going on in a particular field.

If that doesn't work, try unchecking the "do not evaluate if all referenced fields are empty" box at the bottom of the field "Specify Calculation" window.

Something else that I've run into in fooling around: "reusing" a field, for example by changing the field type from "text" to "calculation" and using it for something else can result in a lot of weird stuff due to "leftover" text or data.

if you are pretty sure that a particular approach should work, based upon your experience, but the results are flaky, make sure that you haven't accidentally "reused" a field left over from something else you might have been trying.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.