I have a cck field "field_status" in my view. I can get table highlighting to work with the following code in the Table Highlighter area of my view:

if ($node_data_field_status_field_status_value == "OS") return 'red';
Here is my problem:it only highlights if I place this field in the first column of my view. If I move field_status to any other column in my view table, the highlighting stops working.

What am I doing wrong?

Comments

smokris’s picture

Status: Active » Postponed (maintainer needs more info)

@LunkRat, if you're still experiencing this problem, could you see if #692350: Not all fields (or no fields at all) are shown in "sample values from the first row of this view" solves it? If not, please paste the full exported view, so I can try to replicate the problem.

brmohan12’s picture

Had the same problem.

Node type Order has a field name Criticality which can be set to 0,1 or 2. Depending on the value the table entry needs to be colored.

When Criticality is the first field of the view the example is like this:
node_field_criticality_field_criticality_value == "02" return red;

However when this is not the first field the example shows the field differently as below:
$node_data_field_order_id_field_criticality_value == "02" ( in this case order_id was the first field of type content)

I just used the left hand side exactly as given in the example. It works for the present. This still looks like a bug to me.

smokris’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Discussed @brmohan12's issue offline — the problem was that the Highlighter code was being set in his "Default" Views Display and reused in other Views Displays, which had different internal names for the fields. Since the fields had different internal names, the conditionals in the Highlighter code no longer worked.

Closing this issue, since I can't reproduce @LunkRat's original issue and haven't received a response on the request for the exported view.