set_field_value_cf
Apply conditional formatting by using a measure's returned color to set column background, font, or icon directly.
Instructions
FORMAT BY FIELD VALUE conditional formatting on a table/matrix column: a measure that returns a hex/CSS colour drives the column's background, font or icon colour DIRECTLY (not a rule/gradient - the measure's returned colour IS the colour). target=background|font|icon. colorMeasure = "Table[Measure]" (or pass colorMeasureTable). column = the column's queryRef e.g. 'Dim_Product.Brand'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reportSessionId": "<reportSessionId>",
"page": "<page>",
"visual": "<visual>",
"column": "<column>",
"target": "<target>",
"colorMeasure": "<colorMeasure>"
},
"name": "set_field_value_cf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | page name or displayName | |
| column | Yes | the column's queryRef, e.g. Dim_Product.Brand | |
| target | Yes | background | font | icon | |
| visual | Yes | table/matrix visual name | |
| colorMeasure | Yes | colour measure, e.g. Fact[Colour] or just the measure name with colorMeasureTable | |
| reportSessionId | Yes | ||
| colorMeasureTable | No | table that owns the colour measure (if not in colorMeasure) |