6 Replies Latest reply on Dec 9, 2011 9:28 AM by Stephen Huston

    FMPA doesn't like red today.

    donnyl

      Have a really odd one here:

       

      1. I have three fields that represent color values: Red, Green, Blue.

      2. I use those values to colorize other text fields using the text format function: TextColor ( text ; RGB ( red ; green ; blue ) ).

      3. Three of those fields use only one of the three color values fields: red, green, or blue respectively.

       

      This works as expected for green & blue, but not the red. It always returns black. I use the same calc for each field that needs colorizing save swapping out red, green or blue:

       

      1. TextColor ( TextField2BColorized ; RGB ( redField ; 0 ; 0 ) )

      2. TextColor ( TextField2BColorized ; RGB ( 0 ; greenField ; 0 ) )

      3. TextColor ( TextField2BColorized ; RGB ( 0 ; 0 ; blueField ) ).

       

      So why does the green and blue work as expected but not the red? I have checked and rechecked and rechecked my typing (actually it's really only copy-n-paste then swapping out the color values field). I have also made certain the fields I am colorizing are text fields. Am I overlooking something really simple?

       

      I'm using FMP Advanced 11.0v4 on a MacBook Pro, OS 10.6.8.

        • 1. Re: FMPA doesn't like red today.
          lexan

          Is your «redField» a NUMBER and not a DATE or SUMMARY field, because at some time you have absently typed any shorcut like <Cmd+D> in the database management pane?

          Shorcuts sometimes may be dangerous!

           

          Anyway your calculation works fine!

           

          /Stefano

          • 2. Re: FMPA doesn't like red today.
            RayCologon

            Donny Limbert wrote:

            Am I overlooking something really simple?

             

            Hi Donny,

             

            I was able to recreate what you've described without difficulty (see attached example) and it worked straight off. FWIW, the attached file was created using FMP Advanced 11.0v4 on a MacBook Pro running OS 10.6.8 - same as your setup.

             

            So yes, there probably is something simple that you're overlooking - but what it is is not clear from your description. As Lexan says, it is most likely that something is mis-configured, but we'd really need to see your file (or have you post a fair bit more detail) to work out exactly what it might be. It could even be a data problem (eg if you enter 256 as a color value for red, along with 0 for green and 0 for blue, it will produce black). But there are quite a few other possibilities.

             

            Perhaps if you compare the attached demo with your own file looking for differences, that will help you to pinpoint what is going on.

             

            Regards,

            Ray

            ------------------------------------------------

            R J Cologon, Ph.D.

            FileMaker Certified Developer

            Author, FileMaker Pro 10 Bible

            NightWing Enterprises, Melbourne, Australia

            http://www.nightwingenterprises.com

            ------------------------------------------------

            • 3. Re: FMPA doesn't like red today.
              s

              Hi Donny,

              If you have FileMaker Pro Advanced, use the Data Viewer to monitor the value of redField. A value of 0 would give you black text. Can you show us the calc or how you are setting redField?

              --

              Steve Moore

              Cumberland, Maine

              • 4. Re: FMPA doesn't like red today.
                Stephen Huston

                Hi Donny,

                 

                Be sure the "0" value of Red is actualy a Zero, not the letter "O" (OH ! as in OMG!).

                 

                I've done that a time or two over the years, and it's near impossible to spot when just reading your code.

                • 5. Re: FMPA doesn't like red today.
                  donnyl

                  I just wanted to thank everyone for your response. This forum rocks! And the file is working now as it should and the only "change" I did was a restart of my MacBook. Go figure.

                  • 6. Re: FMPA doesn't like red today.
                    Stephen Huston

                    The unwritten first rule of tech support: reboot and see if the problem goes away.