June 18, 200817 yr 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)
June 18, 200817 yr 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?
June 18, 200817 yr not ( InventorySold::Serial Number ≠ Serial Number ) is shorter InventorySold::Serial Number = Serial Number is even shorter.
June 18, 200817 yr 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
June 18, 200817 yr :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, 200817 yr by Guest Added Edit
June 18, 200817 yr 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.
June 18, 200817 yr 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
June 18, 200817 yr 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
June 19, 200817 yr 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