I created a value list which has two items, 'Active' and 'Not Active'.
I would like to have the 'Not Active' to display a different color background.
Can someone help me with this?
You mean you would like the field to have a different background color after you chose "Not active"?
Select the field, click the right mouse button, and from the context menu, choose Conditional Formatting. In the dialog, Click Add, choose Formula is, click Specify, and write Self = "Not Active". Then choose the desired Fill Color.
Note that this is independent of the Value List; it would also work on a field without a value list assigned and/or if you wrote the text manually.
On a side note, it is best to use a checkbox for this. If you use a checkbox all you need to mark is whether something is active, with a number one. Then you can just show the word from a calc: active or not active, based on whatever you like. Then you conditionally format that.
It's much easier to connect table occurrences, in case you want to see active items only from a different context.
Just my two cents.
agnes b. riley . filemaker and web development
T 201-299-6223 (NJ) . 212-842-8830 (NY) . 917-660-7221 (C)
FileMaker Certified in 10 and 11
Thank you Erolst and Ariley.
@ nella: You're welcome
FWIW, I second ariley in that it's better to use a number field if you only want to hold a simple boolean fact (Yes/No).
This not only makes it easier programmatically to use the field in relationships, but also reduces boolean tests (like for
Conditional Formatting) simply to [If] Self … (if you wanted to format the checkbox, that is; since you probably want to
format something else based on the checkbox field, it's not that much of a gain). Lest you forget which value stands
for which fact, use the comment box in Manage Database.
@ ariley: it used to be even better before FM11, when you could match on empty in a relationship to only find/ show the
NON-active records (using a global on the “left” side). Now, depending on what your checkbox label says, you have to create
a workaround with a second field if you want to match the relationship result with the UI (and who wouldn't …).
This may be a more consistent/sensible/expected behavior, but it broke some of sour solutions when the customers upgraded to 11.
Retrieving data ...