yknot Posted November 14, 2005 Posted November 14, 2005 Hi, I'm trying to make the color of a field conditional on the value entered in the field. If the value in field "test" is Y then i want the color of the field "test" to be green; if the value is N then I want it to be blue. I have read a number of posts but can't make anything work. I created a global container field gGreen and another one gBlue and formatted one to be green and the other one to be blue. Then I stacked on on top of the other and placed the "test" field on top of both of the container fields. I attempted various ways to put a calculation into the test field but had no success. Help is much appreciated, yknot
mr_vodka Posted November 14, 2005 Posted November 14, 2005 yknot, Try this. Create one repeating global container field. Lets call is gBackround. For the first global value, enter a blue image, for the second, a green image. Next create a calculation field that is something like, Case [Test="Yes"; gBackround; gBackround[2] ] Then put your field with transparent background ontop of the gBackground field. Lay it ontop of it.
yknot Posted November 14, 2005 Author Posted November 14, 2005 Thanks for the reply - when you say "image" please explain. I tried a repeating field before but when I format the field color I can not format different repetitions with different colors.
Lee Smith Posted November 14, 2005 Posted November 14, 2005 (edited) Hi yknot, Along with mr_vodka description, take a look at this file I posted to a similar question the other day. I used a mockup dog and Cat graphic, but it pretty much does what he just described. Click Here HTH Lee I also modified it to follow what you were describing initially. Lee yknotTest_.fp5.zip Edited November 14, 2005 by Guest added file
yknot Posted November 14, 2005 Author Posted November 14, 2005 Thanks Lee, I got myself tied up in trying to format the container field with different colors. Are you aware of someplace from where one can import images of color?? yknot
Lee Smith Posted November 14, 2005 Posted November 14, 2005 color is easy, go into layout mode, draw box (usually no lines is best), there is one in the sample I just posted, Fill the Box with the color of choice, Copy the box while in Layout Mode, Then switch to Browse mode, and paste it into the container field of choice. Lee
yknot Posted November 15, 2005 Author Posted November 15, 2005 Sooooo simple! But the devil is in the detail Thank you
Lee Smith Posted November 15, 2005 Posted November 15, 2005 You could also just change the color of the text. See attached Example. Use the Auto Enter Calculation, note that the "Do Not Replace existing values..." box is not checked. You can change the colors used in the sample by changing the RGB mix. HTH Lee ChangeTextColor.fp7.zip
yknot Posted November 16, 2005 Author Posted November 16, 2005 Hi, I got both the field color and the text color to work thanks to your help. However; when I switch to the "View as Table" mode, the field color method does not work anymore. Field1 separates from c_GraphicField. Any ideas? yknot
Lee Smith Posted November 16, 2005 Posted November 16, 2005 You can not see graphics like that in Table View (one on top of the other), FileMaker wants to line up your fields in a row, like you would see in Excel. I would just create a new layout using List View (aka Column View) , and incorporate all of this stuff in it. Lee
Recommended Posts
This topic is 6949 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