May 22, 200619 yr 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?
May 22, 200619 yr 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".
May 23, 200619 yr Author 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.
May 23, 200619 yr Author 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?
May 23, 200619 yr 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) )
May 23, 200619 yr 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
May 23, 200619 yr Author 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.
May 23, 200619 yr Author Aha! I had put the container field in the background instead of the calculation field- then changed the Graphic... to Enlarge. Now it works!
Create an account or sign in to comment