Jredeemer14 Posted June 18, 2008 Posted June 18, 2008 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)
mr_vodka Posted June 18, 2008 Posted June 18, 2008 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?
comment Posted June 18, 2008 Posted June 18, 2008 not ( InventorySold::Serial Number ≠ Serial Number ) is shorter InventorySold::Serial Number = Serial Number is even shorter.
Jredeemer14 Posted June 18, 2008 Author Posted June 18, 2008 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
mr_vodka Posted June 18, 2008 Posted June 18, 2008 (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 June 18, 2008 by Guest Added Edit
comment Posted June 18, 2008 Posted June 18, 2008 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.
Jredeemer14 Posted June 18, 2008 Author Posted June 18, 2008 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
comment Posted June 18, 2008 Posted June 18, 2008 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 0db Posted June 19, 2008 Newbies Posted June 19, 2008 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now