Basso Tim Posted May 22, 2006 Posted May 22, 2006 I would like to change the background color in my contacts database to reflect if someone has died, i.e. when the radio button for Deceased? is marked Yes then the background colors would change to grey or black. Is this possible?
John Mark Osborne Posted May 22, 2006 Posted May 22, 2006 There are several ways to do this but the most straightforward method is to store your background swatch in a global container field. Just draw a small rectangle in layout mode with the color background you want. It can be as small as 1 pixel by 1 pixel if you want. Cut the rectangle from the layout to the clipboard. Enter browse mode and paste the swatch into the global container field. You don't need to display the global field on any layout. Then, create a calculation with the following formula: Case(RadioButton = "Deceased"; GlobalContainerField) Place the calculation field on the layout where you want the background displayed and make it as large as the entire layout area. Make sure to set the field to not allow entry in browse or find mode via the Field Behavior dialog. Also, make sure you send the calculation field to the back of all the other objects. Finally, with the calculation field selected, choose Graphic... from the Format menu and set it to Enlarge and uncheck the option to "maintain original proportions".
Basso Tim Posted May 23, 2006 Author Posted May 23, 2006 That is SO COOL! In my database your formula was actually Case(Deceased = "Yes"; BackgroundColor) because that is how I set up the fields. I include that because it might help clarify for others who are checking this out. Thank you very much.
Basso Tim Posted May 23, 2006 Author Posted May 23, 2006 What if I wanted the background color to be changed by more than one thing? For instance: radio button- Deceased (Yes, No) Grey drop down- Category (Alumnus, Friend, Family) Red, Green, Brown Of course deceased grey should take priority over the other colors. How could I do that?
John Mark Osborne Posted May 23, 2006 Posted May 23, 2006 Make your global container field a global container with as many repetitions as you want background colors. Paste the swatches into the different repetitions of the global field and then change your formula to something like this: GetRepetition( xGlobalContainerRepeatingField; Case(Category = "Alumnus"; 1; Category = "Friend"; 2; 3) )
Lee Smith Posted May 23, 2006 Posted May 23, 2006 This topic has come up many times in the past. Take a look at this post change background color, and the sample file by CobaltSky Lee
Basso Tim Posted May 23, 2006 Author Posted May 23, 2006 I think I must be doing something wrong- the container field I created, and then put a color into each repetition. I then resized it and made it into my background but the other colors were still present to the right. There must be a place where I choose only to view one repetition at a time, right? The calculation did not change anything probably because of the set up of the container field... As in the example from the other post, I changed the field setup to display 1 repetition. The calculation does not work yet though.
Basso Tim Posted May 23, 2006 Author Posted May 23, 2006 Aha! I had put the container field in the background instead of the calculation field- then changed the Graphic... to Enlarge. Now it works!
Recommended Posts
This topic is 6760 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