Re: Calculation Field Comparing Calculation Fields?



In article <442980d3$0$29669$636a55ce@xxxxxxxxxxxx>, "Remi-Noel
Menegaux" <rnmenegaux@xxxxxxx> wrote:

"Eric" <nospam@xxxxxx> a écrit dans le message de news:
442977F2.11E02F04@xxxxxxxxx
Either FMP8 does not allow a Calculation Field to compare to another
Calculation Field, or perhaps there is a nifty trick to do so?

I've tried 'IF' and 'CASE' functions to no avail.

Field 1 = TextA
Field 2 = TextB
Field 3 = Text C (This is actully TextA + TextB from another source)
Field 4 = (Calculation Field)...I am trying to make this a "Flag"
notification field to display "DIFF" (text) if: TextA & " " & TextB are
NOT equal to Text C.

Am I out of luck?

You may try :

Field 4 = Case((Field 1 & " " & Field 2) <> Field 3, "DIFF"; "FLAG")

I don't see why it shouldn't work...
I suggest you show on the same layout Field 1, Field 2, Field 3 and Field 4,
just for checking.

My first guess would be that Eric doesn't have any brackets on his test.

The test
Field 1 & " " & Field 2 <> Field 3

could be a completely different one to
(Field 1 & " " & Field 2) <> Field 3

I'm not sure what the precedence order is here, so the first test could
actually be being calculated as
Field 1 & " " & (Field 2 <> Field 3)

which is not what you want.

It's always best to put the brackets in to make sure the calculation is
performed the way you want. As with all mathematics, the brackets (or
parentheses if you prefer) are EXTREMELY important - not having them or
having them in the wrong place can cause all sorts of strange results,
and is a very simple thing that we all get wrong from time to time.


A second guess would be an incorrect field - maybe a local field is
being used instead of a related one somewhere along the line, or
perhaps it is the correct related field, but via the wrong
relationship.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
.



Relevant Pages

  • Re: Overlaping conditions....may be
    ... It returns the higher value of your calculation and zero so that if the ... I have also removed several brackets, (there is no need to enclose 0.25 ... The result was in minus instead of 0. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Overlaping conditions....may be
    ... It returns the higher value of your calculation and zero so that if the ... and the crowning place of kings ... I have also removed several brackets, (there is no need to enclose 0.25 ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Simple sum
    ... The real answer would be 7 because thats the correct answer if no ... brackets are used in the calculation. ... would indicate a bracket thus changing the calculation. ... the other guy that the "real" answer is 7 aswell as being the ...
    (sci.math)
  • Re: Order of calculation
    ... What do the brackets around 10+10*2+2 tell Excel to do? ... Is it always the very last part of the calculation that doesn't ... As you read left to right, when you see a right parenthesis, ...
    (microsoft.public.excel.misc)
  • Re: Compound criteria
    ... I have this calculation. ... one for reporting the Order_Payment_Status ... TotalAmount - OrderDeposit ... the first test above which is matched, and it's irrelevant what data is ...
    (comp.databases.filemaker)

Loading