3 Replies Latest reply on Dec 5, 2012 10:50 AM by philmodjunk

    Text field conditions



      Text field conditions


           Hi All! Is there a way to have text in a field change color based on a selected RGB value? I have an apple script that brings up the color picker and returns its RGB value. i would like to then take that and have the field next to it have the text be in that color.


           is this possible?



        • 1. Re: Text field conditions

               Do you want this color change only in this field for the current record, for the current found set of records or all records in the table?

               And if a new record is subsequently created, should it also receive this specified color?

               What you describe can be done using a combination of the TextColor and RGB functions (Look up TextColor in Help for the details), but this will format the data in the field, not set a format on the field itself, so the implementation details will vary depending on exactly how you want this color change to work.

          • 2. Re: Text field conditions

                 well i have two tables.

                 the first table has a text field and a web viewer

                 when i click a button a script runs and allows me to select a color from the color picker and then the web viewer gathers the RGB value from a field that the script sends it to and makes it the back ground color.

                 in the second table i have a text field that is a drop down menu that gets its value list from the text field in the first table.

                 what i would like is to have the user select the text from the drop down menu and then the text will be the color that is in the web viewer from the first table.

                 does that help make more sense?


            • 3. Re: Text field conditions

                   It doesn't fully answer my questions. Does this then only affect the text in the current record?

                   Assuming so, then an auto-enter calculation could be set up on this field such as:

                   TextColor ( Self ; RGB (       ) ) //put the needed reference to your RGB values in the empty parenthesis

                   provided that you clear the "do not replace existing values..." check box.

                   But if you want the text color to change if the back ground color is changed after data is entered into this field, you'll need to use a script with these funcitons in a Set Field step to update the color.