GetValue function returns a text result (and "10" is less than "7"). Use GetAsNumber function: GetAsNumber(GetValue(…))
10 > 7 is false when those values are text type.
So, the calc will be fair when you use something to transform the text to a number.
The second expression, using a minus operator, tells to FileMaker to get a number result, but this isn't the case of your third expression.
So, you could use:
GetAsNumber ( GetValue( $$Var ; 1 ) ) > GetAsNumber ( GetValue( $$Var ; 2 ) )
Thanks this helped me.
In my situation the two comparatives were Number fields in (different) related tables.
Filemaker would always evaluate incorrectly, even if I set my comparatives to variables.
Only when I added GetAsNumber did the calc evaluate correctly.
I wouldn't have thought that pulling data from an related table would negate it's field type (to text). Same goes for pulling the data into a variable.
Learning comething new everyday - this one is a pain because I'm going to need to go through the whole solution to see if this '<' or '>' issue appears elsewhere.