I have a view displaying several documents. If the RESOLVED field in any of those records = null, I’d like to make those specific records/rows stand out by using a different background or text color. Any suggestions?
Subject: Making a row in a view a different color by formula.
Create a new first column in your view and check the “Use value as color” and “Hide column” boxes in the properties. Give the column a formula which will produce a three-item list consisting of numbers from 0 to 255. The numbers represent RGB values, which will be used to set a background color for the row. For example, this will give you a red background if Resolved is null or white if it isn’t:
@If(Resolved = “”; 255:0:0 ; 255:255:255)
Subject: RE: Making a row in a view a different color by formula.
Thank you! Your suggestion works well for me. Since it changes the text color (instead of the background color), I changed the formula to red and black instead of red and white. ie. @If(lvchgResolvedOn = “”; 255:0:0 ; 1:1:1). I appreciate your willingness to share Designer secrets.
Subject: from the help file
Examples: Adding programming to columns
…
…
…
Setting column colors programmatically
In Notes client applications, you can set a column’s background color and text color programmatically by selecting the “Use value as color” option on the Info tab of the Column Properties box and then supplying RGB coordinates in the Programmer’s pane as the value for the column.
Note This feature is not supported on the Web.
If you specify one set of coordinates (three numbers separated by colons), the color defines the appearance of the text. If you specify two sets of coordinates (six numbers separated by colons), the first set of coordinates defines the background color for the column, and the second set of coordinates specifies the text color. The color affects the column where you set the color value and all columns to the right of that until another color is set.
Note Setting colors to -1:-1:-1 reverts to the view and column properties.
For example, the following formula example shows how RGB coordinates can be used in both single and paired sets.
red := 255:0:0;
blue := 0:0:255;
yellow := 255:255:0;
pink := 255:193:253;
white := 255:255:255;
black := 1:1:1;
apricot := 255:155:133;
plain:= 0:0:0;
@If (category = “cats”;blue:red ;subcategory = “collars”;pink;subcategory =“leashes”;black:plain;0:0:0);
Note You do not need to define the color names – you can enter the numeric combinations directly into a formula. However, defining the colors makes it easier to see what you are doing and reduces the possibility of a typing error if you are using the same color more than once.
You can also set the column value equal to a field value that supplies RGB coordinates. You can use this feature in conjunction with the color field to allow a user to set a color with a color picker. You can then apply that color to a view component – for example to the text in a column. For information on using this feature to make view colors customizable, see “Allowing users to set colors in a view.”
See Also
Selecting which documents display in a view
Glossary
Feedback on Help or Product Usability?
Subject: RE: from the help file
I tried using this from the help file, but it only changed the background or text color of the one column, not the whole row. Another user offered a solution that changes the text color for the whole row. Thanks anyway!
Subject: more info inside…
It will change all columns to the right of the hidden color column, until it meets another hidden colour column. So if you put this as the first column in the view and there are no others, than the whole row will appear the same color. (for example, look at the ND6 mail template’s inbox). Or you can change the value on a column by column basis, by having a hidden color column before each displayed column, for example: