Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7449 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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 (

Posted

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.

Posted

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)! smile.gif

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

This topic is 7449 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.