Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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)

Posted

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?

Posted

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

Posted (edited)

: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
Posted

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.

Posted

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

  • Newbies
Posted

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.

This topic is 6061 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.