Newbies BernieR Posted February 13, 2005 Newbies Posted February 13, 2005 I have a script that finds records by looking at a "date" field that are less than 3 years old. After the find, I want to be able to color the text red if any record that will be older than 3 years 6 months from now, blue if it will be older than 3 years 3 months form now, and yellow if it will be older than 3 years one month from now. Help is appreciated
dkemme Posted February 14, 2005 Posted February 14, 2005 I would create a calculated field that changes the color based upon your criteria. For example: A calculated field with this: TextColor ( Text_Field ; Case(Date_Field < get ( currentdate ) - (3.5*365) ; RGB ( 255;0;0 ) ; RGB ( 0;0;0 ) ) ) would text to red if date in above range, or black if not. You could add another case to change to blue, between black and red. (I have not verified the test for the date, I could be 180 degrees off, I always have to test) Using this approach you do not have to add anything to your scripted find. Just find what you want and put this calculation on the resulting layout. This approach has the disadvantage that the user will not be able to edit the text you need colored. If you need this do a replace with the same criteria to change the text color and then let the user edit the field.
Recommended Posts
This topic is 7225 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