twmissmt Posted June 8, 2007 Posted June 8, 2007 (edited) Does anyone know of a script (or other method) to have the text color of one field reflect the contents of another in FM Pro 7? What I'm trying to accomplish is to have all my Sr. students show up in one color of text, my Jrs. another and so on and am looking for a script to execute this? Anyone? Edited June 8, 2007 by Guest
Raybaudi Posted June 8, 2007 Posted June 8, 2007 Hi there is no way to change the text color of a field in FM4 by script or calculation
Lee Smith Posted June 8, 2007 Posted June 8, 2007 I started to respond similarly as Danielle. There are a few treads about how to do this in v4, 5 and 6 using a global field and stacking them. In v7, you can use a calculation like this: Case ( Class = "Sr." ; TextColor ( Name_Last ; RGB ( 500 ; 0 ; 0 ) ); Class = "Jr." ; TextColor ( Name_Last ; RGB ( 0 ; 500 ; 0 ) ) ; Class = "S." ; TextColor ( Name_Last ; RGB ( 0 ; 0 ; 500 ) ); Class = "F." ; TextColor ( Name_Last ; RGB ( 0 ; 0 ; 0 ) ) ) In a separate field, or as and Auto Enter. I show both methods in the attached file. twmissmt.fp7.zip
twmissmt Posted June 8, 2007 Author Posted June 8, 2007 Thank you for your help. I thought I had an understanding for your calculation field which I thought changed the RGB value to designate a color for the text. However when I attempt to change that value to reflect a different color (exchanging the green for a purple 106-80-170) the text color remains the bright green. Any idea what I'm doing wrong or is it only possible to have all-or-nothing values (ie: 0-500-0)??
twmissmt Posted June 8, 2007 Author Posted June 8, 2007 Also, can you direct me to those threads about accomplishing this in FM 5.5? My file is in that older version and I would like to keep it there if possible so I can use it on older hardware. Thank you.
Lee Smith Posted June 8, 2007 Posted June 8, 2007 I could, but you can find them on your own too. To find Keywords, go into Search in the Menu, click on Advance Search. Note the ? in blue below the blank field asking for Keywords. This help will explain the different types of search you can perform. For this request, I would suggest the Keywords of Background, Color, Change, and Calculation to start with. Type in your keywords using the Pluses to make the search find only the topics that have all of the words, this will help to eliminate a lot of topic that really don't apply Example [color:blue]+Background +Color +Change +Calculation. If this fails, then eliminate one of the criteria like [color:blue]+Background +Color +Change or change the form of the word [color:blue]+Background +Color +Change +Calc etc. The files should have two fields. One would be a global container field with enough repetitions to provide a color for each Class, and a Calculation field with the result of Container that gets the right Repetition for the Class. HTH Lee
Lee Smith Posted June 8, 2007 Posted June 8, 2007 Using the Keywords I suggested will return four hits, follow the links that I have provided. Check the file ChangeBackground.fp5.zip Lee
Recommended Posts
This topic is 6379 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