June 30, 200421 yr Why dosn't this work:- Case(1=1;TextColor ( "Red"; RGB (255 ; 0; 0);"Black" ) It displays nothing But Case(1=2;"Black";TextColor ( "Red"; RGB (255 ; 0; 0) )) "Works" ie displays red in red.
June 30, 200421 yr Robert - Is this the real calculation or have you simplified for here? Seeing as 1 always equals 1 why not just put the text color function in.
June 30, 200421 yr Tha calculation: Case ( 1 = 1 ; TextColor ( "Red" ; RGB ( 255 ; 0 ; 0 ) ) ; "Black" ) Produces the word Red in the color red. Case ( 1 = 2 ; TextColor ( "Red" ; RGB ( 255 ; 0 ; 0 ) ) ; "Black" ) Produces the word Black in the color black. I don't know why it would work differently for you.
June 30, 200421 yr Note your parentheses. The way you have it written, you are passing three arguments to the TextColor function. Now, i haven't worked in FM7 much; i know FM6 won't let you out of the calculation editor with such an error existing. I'd echo Andy's question of whether this is the exact calculation, but if it's not, try parsing it out in a programming style: Case (
June 30, 200421 yr Author You are correct my parenthesis was missing, BUT FileMaker didn't pick this up and allowed 3 ( and 2 ) in the calculation. A bug I assume.
June 30, 200421 yr Sure this is a bug? Isn't the "3rd" parameter actually part of your Case statement. Stripping out the Case part of it, FMP complains that passing 3 parameters to the TextColor function is a bad calculation.
June 30, 200421 yr Yeah, i'd call that a bug, too. Geez, if they're going to prevent us from coding things directly, they have to give us SOMETHING in return (like formula validation)! Unless Neverland is right... but i don't think so (someone check me): Case(1=1;TextColor ( "Red"; RGB (255 ; 0; 0);"Black" ) ==sub 'foo' for 'RGB(255;0;0)'== Case(1=1;TextColor ( "Red"; foo ;"Black" ) It looks, then, like we are passing 3 arguments to the TextColor function. But Neverland, you say that TextColor("Red";"RGB(255;0;0);"Black") is not accepted by FM, while Robert's initial calculation is? I'd test it myself, but don't have v7 within typing distance. J
Create an account or sign in to comment