Use value as color on category level only

I have entered a formula for changing the text color on a column preceding a categorized column. However, the color of the category remains, but the rows below are changed according to the formula.

I would prefer it the other way round - to keep the color of the individual rows and only change the color of the category, accordingly.

The values in the category match with the value of the Field “FC” below.

xmpl.

red := 255:0:0;

green :=0:128:0;

blue := 0:0:255;

black := 1:1:1;

FC:=“”;

@If(Status=“Waiting FPOC Action”;

 @If(@Contains(RCAType;"HW");FC:="Pending with HW team";@If((RCAReject != "" & RCAReject != "Not Applicable");FC:="Pending Rejection Confirmation";FC:=Status));FC:=Status);

@If(FC=“Pending Rejection Confirmation”;green;

 @If(FC="Developing Solution - (Testing Failed)"|FC="Waiting FPOC Action");red;-1:-1:-1)

exmpl.

The next column is the status column which is categorized.

Any ideas?

Thanks in advance.

Regards Joe

Subject: use value as color on category level only

Use @IsCategory in your formula.

Subject: RE: use value as color on category level only

Stan, thanks for your answer, but sorry, I don’t understand.The color of the category should only change if the text value of the category meets the FC definitions from my formula above.

If I only wanted to change the color of all category level entries, I could simply set the color on the tab.

But with @IsCategory I can only test if I’m at category level.

Subject: RE: use value as color on category level only

A color column changes the color of all columns which follow. So add another color column after your categorized cloumn containing -1:-1:-1.

Subject: RE: use value as color on category level only

Thanks also for that hint, but it is not helping either, because, while the individual rows do inherit the color change the category is not in the first place. So changing the color scheme back has no effect on the category as such.And the column that is supposed to change the color of the category is right in front of it.

Subject: RE: use value as color on category level only

Were you able to get this working? I am working on something very similar and would appreciate any ideas you can offer.

Subject: Category row displayed in different color - this works

Well, @IsCategory in 6.5 doesn’t do what the help says. At least when it returns a value, it’s not a string that can be evaluated as a string in any way.

Nevertheless, here is an akward method that works to color your category rows differently.

  1. Put a column before all the categorized columns. This will be your color column. Check the Use Value as Color property of the column properties.

  2. Use one of the functions below:

@If(@IsCategory(“any”)=“any”;any;1:1:1)

@If(@IsCategory(“x”)=“y”;z;1:1:1)

Note: in the function above, where the word “any” appears, or “x” “y” and “z”, it can be anything, matching or not. It will always evaluate to false. If you try just @IsCategory, it will error out because that doesn’t return true. And no match you try will ever cause a true comparison.

That said, the result is that all rows will be colored black if they are not categories. This overrides the default text color. If you want another color than black, then adjust the 1:1:1 accordingly (red:green:blue up to 255 for each position, red= 255:0:0)

  1. Now go to any column and set the text color to the row you want your categorized rows to appear in, and click Apply to All. Voila!

Quite odd that you have to jump through these hoops. It would have been much better if @IsCategory would have just returned a simple true or false (like @IsNewDoc, @IsDocBeingEdited, etc.) and then let us use @if to determine what to do with it rather than having it return an asterisk or a string that can’t be tested. Argh!!!

Here is the weird behavior of the @IsCategory function.

For example, to simply display the result of @IsCategory, all of the following three formulas display no in all rows, regardless of whether they are category rows:

@if(@IsCategory=“*”;“yes”;“no”)

@if(@IsCategory(“hello”)=“hello”;“yes”;“no”)

@if(@Text(@IsCategory(“hello”))=“hello”;“yes”;“no”)

The following formula returns an error:

@if(@IsCategory;“yes”;“no”)

The following formula displays nothing at all:

x:=@IsCategory;

x

The following formula displays the word “red” in all the category columns:

@IsCategory(“red”)

The following formula displays an error:

red:=255:0:0;

@IsCategory(red);