Robert Kidd Posted June 30, 2004 Posted June 30, 2004 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.
andygaunt Posted June 30, 2004 Posted June 30, 2004 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.
RalphL Posted June 30, 2004 Posted June 30, 2004 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.
QuinTech Posted June 30, 2004 Posted June 30, 2004 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 (
Robert Kidd Posted June 30, 2004 Author Posted June 30, 2004 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.
Neverland Posted June 30, 2004 Posted June 30, 2004 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.
QuinTech Posted June 30, 2004 Posted June 30, 2004 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
Recommended Posts
This topic is 7712 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